package tx
import "github.com/ydb-platform/ydb-go-sdk/v3/internal/tx"
Index ¶
- Constants
- func ToQueryTxControl(src *Ydb_Table.TransactionControl) (dst *Ydb_Query.TransactionControl)
- type Identifier
- type LazyID
- type OnTransactionBeforeCommit
- type OnTransactionCompletedFunc
- type Transaction
Constants ¶
const ( LazyTxID = "LAZY_TX" FakeTxID = "FAKE_TX" )
Functions ¶
func ToQueryTxControl ¶
func ToQueryTxControl(src *Ydb_Table.TransactionControl) (dst *Ydb_Query.TransactionControl)
Types ¶
type Identifier ¶
type Identifier interface { ID() string // contains filtered or unexported methods }
type LazyID ¶
type LazyID struct {
// contains filtered or unexported fields
}
func ID ¶
func (LazyID) ID ¶
func (*LazyID) SetTxID ¶
type OnTransactionBeforeCommit ¶
type OnTransactionCompletedFunc ¶
type OnTransactionCompletedFunc func(transactionResult error)
type Transaction ¶
type Transaction interface { Identifier UnLazy(ctx context.Context) error SessionID() string // OnBeforeCommit add callback, which will be called before commit transaction // the method will be not call the method if some error happen and transaction will not be committed OnBeforeCommit(f OnTransactionBeforeCommit) OnCompleted(f OnTransactionCompletedFunc) Rollback(ctx context.Context) error }
func AsTransaction ¶
func AsTransaction(id Identifier) (Transaction, error)
Source Files ¶
control.go id.go transaction.go
- Version
- v3.103.0
- Published
- Mar 14, 2025
- Platform
- js/wasm
- Imports
- 5 packages
- Last checked
- 6 minutes ago –
Tools for package owners.