package tx
import "github.com/ydb-platform/ydb-go-sdk/v3/internal/tx"
Index ¶
- Constants
- type Identifier
- type LazyID
- type OnTransactionBeforeCommit
- type OnTransactionCompletedFunc
- type Transaction
Constants ¶
const (
LazyTxID = "LAZY_TX"
)
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 ¶
- Version
- v3.91.0
- Published
- Nov 8, 2024
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 7 minutes ago –
Tools for package owners.