tx

package
v3.95.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeginTx

func BeginTx(opts ...Option) beginTxOptions

BeginTx returns selector transaction control option

func WithOnlineReadOnly

func WithOnlineReadOnly(opts ...OnlineReadOnlyOption) onlineReadOnlySettingsOption

func WithTx

func WithTx(t tx.Identifier) txIDTxControlOption

func WithTxID

func WithTxID(txID string) txIDTxControlOption

Types

type Control

type Control struct {
	Commit bool
	// contains filtered or unexported fields
}

func DefaultTxControl

func DefaultTxControl() *Control

DefaultTxControl returns default transaction control with serializable read-write isolation mode and auto-commit

func NewControl

func NewControl(opts ...ControlOption) *Control

NewControl makes transaction control from given options

func NoTx

func NoTx() *Control

func OnlineReadOnlyTxControl

func OnlineReadOnlyTxControl(opts ...OnlineReadOnlyOption) *Control

OnlineReadOnlyTxControl returns online read-only transaction control

func SerializableReadWriteTxControl

func SerializableReadWriteTxControl(opts ...ControlOption) *Control

SerializableReadWriteTxControl returns transaction control with serializable read-write isolation mode

func SnapshotReadOnlyTxControl

func SnapshotReadOnlyTxControl() *Control

SnapshotReadOnlyTxControl returns snapshot read-only transaction control

func StaleReadOnlyTxControl

func StaleReadOnlyTxControl() *Control

StaleReadOnlyTxControl returns stale read-only transaction control

func (*Control) Selector added in v3.77.0

func (ctrl *Control) Selector() Selector

func (*Control) ToYDB

type ControlOption

type ControlOption interface {
	// contains filtered or unexported methods
}

func CommitTx

func CommitTx() ControlOption

CommitTx returns commit transaction control option

type OnlineReadOnlyOption

type OnlineReadOnlyOption interface {
	// contains filtered or unexported methods
}

func WithInconsistentReads

func WithInconsistentReads() OnlineReadOnlyOption

type Option

type Option interface {
	ApplyTxSettingsOption(a *allocator.Allocator, txSettings *Ydb_Query.TransactionSettings)
}

Transaction settings options

func WithDefaultTxMode

func WithDefaultTxMode() Option

func WithSerializableReadWrite

func WithSerializableReadWrite() Option

func WithSnapshotReadOnly

func WithSnapshotReadOnly() Option

func WithStaleReadOnly

func WithStaleReadOnly() Option

type Selector

type Selector interface {
	// contains filtered or unexported methods
}

type Settings

type Settings []Option

Transaction settings options

func NewSettings

func NewSettings(opts ...Option) Settings

NewSettings returns transaction settings

func (Settings) ToYDB

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL