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