package tx

import "github.com/ydb-platform/ydb-go-sdk/v3/internal/tx"

Index

Constants

const (
	LazyTxID = "LAZY_TX"
)

Types

type ID

type ID string

func NewID

func NewID(id string) ID

func (ID) ID

func (id ID) ID() string

type Identifier

type Identifier interface {
	ID() string
	// contains filtered or unexported methods
}

type LazyID

type LazyID struct {
	// contains filtered or unexported fields
}

func (*LazyID) ID

func (id *LazyID) ID() string

func (*LazyID) SetTxID

func (id *LazyID) SetTxID(txID string)

type OnTransactionCompletedFunc

type OnTransactionCompletedFunc func(transactionResult error)

type Transaction

type Transaction interface {
	Identifier
	UnLazy(ctx context.Context) error
	SessionID() string
	OnCompleted(f OnTransactionCompletedFunc)
	Rollback(ctx context.Context) error
}

func AsTransaction

func AsTransaction(id Identifier) (Transaction, error)

Source Files

id.go transaction.go

Version
v3.80.6
Published
Sep 17, 2024
Platform
darwin/amd64
Imports
3 packages
Last checked
4 minutes ago

Tools for package owners.