github.com/ydb-platform/ydb-go-sdk/v3@v3.57.0/query/session.go (about) 1 package query 2 3 import ( 4 "context" 5 ) 6 7 type ( 8 SessionInfo interface { 9 ID() string 10 NodeID() int64 11 Status() SessionStatus 12 } 13 14 Session interface { 15 SessionInfo 16 17 // Execute executes query. 18 // 19 // Execute used by default: 20 // - DefaultTxControl 21 // - flag WithKeepInCache(true) if params is not empty. 22 Execute(ctx context.Context, query string, opts ...ExecuteOption) (tx Transaction, r Result, err error) 23 24 Begin(ctx context.Context, txSettings TransactionSettings) (Transaction, error) 25 } 26 )