table

package
v2.12.15 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultSessionPoolKeepAliveTimeout     = 500 * time.Millisecond
	DefaultSessionPoolDeleteTimeout        = 500 * time.Millisecond
	DefaultSessionPoolCreateSessionTimeout = 5 * time.Second
	DefaultSessionPoolIdleThreshold        = 5 * time.Minute
	DefaultSessionPoolSizeLimit            = 50
	DefaultKeepAliveMinSize                = 10
	DefaultIdleKeepAliveThreshold          = 2

	// Deprecated: has no effect now
	DefaultSessionPoolBusyCheckInterval = 1 * time.Second
)
View Source
var (
	// ErrSessionPoolClosed is returned by a SessionPool instance to indicate
	// that pool is closed and not able to complete requested operation.
	ErrSessionPoolClosed = errors.New("ydb: table: session pool is closed")

	// ErrSessionPoolOverflow is returned by a SessionPool instance to indicate
	// that the pool is full and requested operation is not able to complete.
	ErrSessionPoolOverflow = errors.New("ydb: table: session pool overflow")

	// ErrSessionUnknown is returned by a SessionPool instance to indicate that
	// requested session does not exist within the pool.
	ErrSessionUnknown = errors.New("ydb: table: unknown session")

	// ErrNoProgress is returned by a SessionPool instance to indicate that
	// operation could not be completed.
	ErrNoProgress = errors.New("ydb: table: no progress")
)
View Source
var DefaultMaxQueryCacheSize = 1000

Deprecated: use server-side query cache with keep-in-memory flag control instead

Functions

func GetTransactionID

func GetTransactionID(txr *Transaction) string

func Retry

func Retry(ctx context.Context, s SessionProvider, op Operation) error

Retry calls Retryer.Do() configured with default values.

func WithClientTrace

func WithClientTrace(ctx context.Context, t ClientTrace) context.Context

WithClientTrace returns context which has associated ClientTrace with it.

func WithRetryTrace

func WithRetryTrace(ctx context.Context, t RetryTrace) context.Context

WithRetryTrace returns context which has associated RetryTrace with it.

func WithSessionPoolTrace

func WithSessionPoolTrace(ctx context.Context, t SessionPoolTrace) context.Context

WithSessionPoolTrace returns context which has associated SessionPoolTrace with it.

Types

type AlterTableOption

type AlterTableOption func(*alterTableDesc)

func WithAddColumn

func WithAddColumn(name string, typ ydb.Type) AlterTableOption

func WithAddColumnFamilies

func WithAddColumnFamilies(cf ...ColumnFamily) AlterTableOption

func WithAddColumnMeta

func WithAddColumnMeta(column Column) AlterTableOption

func WithAlterAttribute

func WithAlterAttribute(key, value string) AlterTableOption

func WithAlterColumnFamilies

func WithAlterColumnFamilies(cf ...ColumnFamily) AlterTableOption

func WithAlterKeyBloomFilter

func WithAlterKeyBloomFilter(f ydb.FeatureFlag) AlterTableOption

func WithAlterPartitionSettingsObject

func WithAlterPartitionSettingsObject(ps PartitioningSettings) AlterTableOption

func WithAlterPartitioningSettings deprecated

func WithAlterPartitioningSettings(opts ...PartitioningSettingsOption) AlterTableOption

Deprecated: use WithAlterPartitionSettingsObject instead. Will be removed after Jan 2021.

func WithAlterReadReplicasSettings

func WithAlterReadReplicasSettings(rr ReadReplicasSettings) AlterTableOption

func WithAlterStorageSettings

func WithAlterStorageSettings(ss StorageSettings) AlterTableOption

func WithDropColumn

func WithDropColumn(name string) AlterTableOption

func WithDropTTL deprecated

func WithDropTTL() AlterTableOption

Deprecated: use WithDropTimeToLive instead. Will be removed after Jan 2022.

func WithDropTimeToLive

func WithDropTimeToLive() AlterTableOption

func WithSetTTL deprecated

func WithSetTTL(settings TTLSettings) AlterTableOption

Deprecated: use WithSetTimeToLiveSettings instead. Will be removed after Jan 2022.

func WithSetTimeToLiveSettings

func WithSetTimeToLiveSettings(settings TimeToLiveSettings) AlterTableOption

type BeginTransactionDoneInfo

type BeginTransactionDoneInfo struct {
	Context context.Context
	Session *Session
	TxID    string
	Error   error
}

type BeginTransactionStartInfo

type BeginTransactionStartInfo struct {
	Context context.Context
	Session *Session
}

type CachingPolicyDescription

type CachingPolicyDescription struct {
	Name   string
	Labels map[string]string
}

type CachingPolicyOption

type CachingPolicyOption func(*cachingPolicy)

func WithCachingPolicyPreset

func WithCachingPolicyPreset(name string) CachingPolicyOption

type Client

type Client struct {
	Driver ydb.Driver
	Trace  ClientTrace

	// Deprecated: use server-side query cache with keep-in-memory flag control instead
	// MaxQueryCacheSize limits maximum number of queries which able to live in
	// cache. Note that cache is not shared across sessions.
	//
	// If MaxQueryCacheSize equal to zero, then the DefaultMaxQueryCacheSize is used.
	//
	// If MaxQueryCacheSize is less than zero, then client not used query cache.
	MaxQueryCacheSize int
}

Client contains logic of creation of ydb table sessions.

func (*Client) CreateSession

func (t *Client) CreateSession(ctx context.Context) (s *Session, err error)

CreateSession creates new session instance. Unused sessions must be destroyed.

type ClientTrace

type ClientTrace struct {
	OnCreateSession func(CreateSessionStartInfo) func(CreateSessionDoneInfo)

	OnKeepAlive func(KeepAliveStartInfo) func(KeepAliveDoneInfo)

	OnDeleteSession func(DeleteSessionStartInfo) func(DeleteSessionDoneInfo)

	OnPrepareDataQuery func(PrepareDataQueryStartInfo) func(PrepareDataQueryDoneInfo)

	OnExecuteDataQuery func(ExecuteDataQueryStartInfo) func(ExecuteDataQueryDoneInfo)

	OnStreamReadTable func(StreamReadTableStartInfo) func(StreamReadTableDoneInfo)

	OnStreamExecuteScanQuery func(StreamExecuteScanQueryStartInfo) func(StreamExecuteScanQueryDoneInfo)

	OnBeginTransaction func(BeginTransactionStartInfo) func(BeginTransactionDoneInfo)

	OnCommitTransaction func(CommitTransactionStartInfo) func(CommitTransactionDoneInfo)

	OnRollbackTransaction func(RollbackTransactionStartInfo) func(RollbackTransactionDoneInfo)
}

func ContextClientTrace

func ContextClientTrace(ctx context.Context) ClientTrace

ContextClientTrace returns ClientTrace associated with ctx. If there is no ClientTrace associated with ctx then zero value of ClientTrace is returned.

func (ClientTrace) Compose

func (t ClientTrace) Compose(x ClientTrace) (ret ClientTrace)

Compose returns a new ClientTrace which has functional fields composed both from t and x.

type Column

type Column struct {
	Name   string
	Type   ydb.Type
	Family string
}

type ColumnFamily

type ColumnFamily struct {
	Name         string
	Data         StoragePool
	Compression  ColumnFamilyCompression
	KeepInMemory ydb.FeatureFlag
}

type ColumnFamilyCompression

type ColumnFamilyCompression byte
const (
	ColumnFamilyCompressionUnknown ColumnFamilyCompression = iota
	ColumnFamilyCompressionNone
	ColumnFamilyCompressionLZ4
)

func (ColumnFamilyCompression) String

func (c ColumnFamilyCompression) String() string

type CommitTransactionDoneInfo

type CommitTransactionDoneInfo struct {
	Context context.Context
	Session *Session
	TxID    string
	Error   error
}

type CommitTransactionOption

type CommitTransactionOption func(*commitTransactionDesc)

func WithCommitCollectStatsModeBasic

func WithCommitCollectStatsModeBasic() CommitTransactionOption

func WithCommitCollectStatsModeNone

func WithCommitCollectStatsModeNone() CommitTransactionOption

type CommitTransactionStartInfo

type CommitTransactionStartInfo struct {
	Context context.Context
	Session *Session
	TxID    string
}

type CompactionPolicyDescription

type CompactionPolicyDescription struct {
	Name   string
	Labels map[string]string
}

type CompactionPolicyOption

type CompactionPolicyOption func(*compactionPolicy)

func WithCompactionPolicyPreset

func WithCompactionPolicyPreset(name string) CompactionPolicyOption

type CompilationStats

type CompilationStats struct {
	FromCache bool
	Duration  time.Duration
	CPUTime   time.Duration
}

CompilationStats holds query compilation statistics.

type CopyTableOption

type CopyTableOption func(*copyTableDesc)

type CreateSessionDoneInfo

type CreateSessionDoneInfo struct {
	Context  context.Context
	Session  *Session
	Endpoint string
	Latency  time.Duration
	Error    error
}

type CreateSessionStartInfo

type CreateSessionStartInfo struct {
	Context context.Context
}

type CreateTableOption

type CreateTableOption func(d *createTableDesc)

func WithAttribute

func WithAttribute(key, value string) CreateTableOption

func WithColumn

func WithColumn(name string, typ ydb.Type) CreateTableOption

func WithColumnFamilies

func WithColumnFamilies(cf ...ColumnFamily) CreateTableOption

func WithColumnMeta

func WithColumnMeta(column Column) CreateTableOption

func WithIndex

func WithIndex(name string, opts ...IndexOption) CreateTableOption

func WithKeyBloomFilter

func WithKeyBloomFilter(f ydb.FeatureFlag) CreateTableOption

func WithPartitioningSettings deprecated

func WithPartitioningSettings(opts ...PartitioningSettingsOption) CreateTableOption

Deprecated: use WithPartitioningSettingsObject instead. Will be removed after Jan 2021.

func WithPartitioningSettingsObject

func WithPartitioningSettingsObject(ps PartitioningSettings) CreateTableOption

func WithPrimaryKeyColumn

func WithPrimaryKeyColumn(columns ...string) CreateTableOption

func WithProfile

func WithProfile(opts ...ProfileOption) CreateTableOption

func WithReadReplicasSettings

func WithReadReplicasSettings(rr ReadReplicasSettings) CreateTableOption

func WithStorageSettings

func WithStorageSettings(ss StorageSettings) CreateTableOption

func WithTTL deprecated

func WithTTL(settings TTLSettings) CreateTableOption

Deprecated: use WithTimeToLiveSettings instead. Will be removed after Jan 2022.

func WithTimeToLiveSettings

func WithTimeToLiveSettings(settings TimeToLiveSettings) CreateTableOption

type DataQuery

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

func (*DataQuery) ID

func (q *DataQuery) ID() string

func (*DataQuery) String

func (q *DataQuery) String() string

func (*DataQuery) YQL

func (q *DataQuery) YQL() string

type DataQueryExplanation

type DataQueryExplanation struct {
	AST  string
	Plan string
}

DataQueryExplanation is a result of ExplainDataQuery call.

type DeleteSessionDoneInfo

type DeleteSessionDoneInfo struct {
	Context context.Context
	Session *Session
	Latency time.Duration
	Error   error
}

type DeleteSessionStartInfo

type DeleteSessionStartInfo struct {
	Context context.Context
	Session *Session
}

type DescribeTableOption

type DescribeTableOption func(d *describeTableDesc)

func WithPartitionStats

func WithPartitionStats() DescribeTableOption

func WithShardKeyBounds

func WithShardKeyBounds() DescribeTableOption

func WithTableStats

func WithTableStats() DescribeTableOption

type Description

type Description struct {
	Name                 string
	Columns              []Column
	PrimaryKey           []string
	KeyRanges            []KeyRange
	Stats                *TableStats
	ColumnFamilies       []ColumnFamily
	Attributes           map[string]string
	ReadReplicaSettings  ReadReplicasSettings
	StorageSettings      StorageSettings
	KeyBloomFilter       ydb.FeatureFlag
	PartitioningSettings PartitioningSettings
	Indexes              []IndexDescription

	// Deprecated: use TimeToLiveSettings instead.
	// Will be removed after Jan 2022.
	TTLSettings        *TTLSettings
	TimeToLiveSettings *TimeToLiveSettings
}

type DropTableOption

type DropTableOption func(*dropTableDesc)

type ExecuteDataQueryDoneInfo

type ExecuteDataQueryDoneInfo struct {
	Context    context.Context
	Session    *Session
	TxID       string
	Query      *DataQuery
	Parameters *QueryParameters
	Prepared   bool
	Result     *Result
	Error      error
}

type ExecuteDataQueryOption

type ExecuteDataQueryOption func(*executeDataQueryDesc)

func WithCollectStatsModeBasic

func WithCollectStatsModeBasic() ExecuteDataQueryOption

func WithCollectStatsModeNone

func WithCollectStatsModeNone() ExecuteDataQueryOption

func WithQueryCachePolicy

func WithQueryCachePolicy(opts ...QueryCachePolicyOption) ExecuteDataQueryOption

type ExecuteDataQueryStartInfo

type ExecuteDataQueryStartInfo struct {
	Context    context.Context
	Session    *Session
	TxID       string
	Query      *DataQuery
	Parameters *QueryParameters
}

type ExecuteScanQueryOption

type ExecuteScanQueryOption func(*executeScanQueryDesc)

type ExecuteScanQueryRequestMode

type ExecuteScanQueryRequestMode byte
const (
	ExecuteScanQueryRequestModeExec ExecuteScanQueryRequestMode = iota
	ExecuteScanQueryRequestModeExplain
)

type ExecuteSchemeQueryOption

type ExecuteSchemeQueryOption func(*executeSchemeQueryDesc)

type ExecutionPolicyDescription

type ExecutionPolicyDescription struct {
	Name   string
	Labels map[string]string
}

type ExecutionPolicyOption

type ExecutionPolicyOption func(*executionPolicy)

func WithExecutionPolicyPreset

func WithExecutionPolicyPreset(name string) ExecutionPolicyOption

type IndexDescription added in v2.7.0

type IndexDescription struct {
	Name         string
	IndexColumns []string
	Status       Ydb_Table.TableIndexDescription_Status
}

type IndexOption

type IndexOption func(d *indexDesc)

func WithIndexColumns

func WithIndexColumns(columns ...string) IndexOption

func WithIndexType

func WithIndexType(t IndexType) IndexOption

type IndexType

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

func GlobalAsyncIndex added in v2.10.0

func GlobalAsyncIndex() IndexType

func GlobalIndex

func GlobalIndex() IndexType

type KeepAliveDoneInfo

type KeepAliveDoneInfo struct {
	Context     context.Context
	Session     *Session
	SessionInfo SessionInfo
	Error       error
}

type KeepAliveStartInfo

type KeepAliveStartInfo struct {
	Context context.Context
	Session *Session
}

type KeyRange

type KeyRange struct {
	From ydb.Value
	To   ydb.Value
}

type Operation

type Operation interface {
	// Do prepares actions need to be done for this operation.
	//
	// Implementations MUST NOT wrap ydb/table errors in order to leave the
	// ability to distinguish error type and make a decision about the next
	// retry attempt.
	Do(context.Context, *Session) error
}

Operation is the interface that holds an operation for retry.

type OperationFunc

type OperationFunc func(context.Context, *Session) error

OperationFunc is an adapter to allow the use of ordinary functions as Operation.

func (OperationFunc) Do

func (f OperationFunc) Do(ctx context.Context, s *Session) error

Do implements Operation interface.

type OperationStats

type OperationStats struct {
	Rows  uint64
	Bytes uint64
}

type ParameterOption

type ParameterOption func(queryParams)

func ValueParam

func ValueParam(name string, v ydb.Value) ParameterOption

type PartitionStats

type PartitionStats struct {
	RowsEstimate uint64
	StoreSize    uint64
}

type PartitioningMode

type PartitioningMode byte
const (
	PartitioningUnknown PartitioningMode = iota
	PartitioningDisabled
	PartitioningAutoSplit
	PartitioningAutoSplitMerge
)

type PartitioningPolicyDescription

type PartitioningPolicyDescription struct {
	Name   string
	Labels map[string]string
}

type PartitioningPolicyOption

type PartitioningPolicyOption func(*partitioningPolicy)

func WithPartitioningPolicyExplicitPartitions

func WithPartitioningPolicyExplicitPartitions(splitPoints ...ydb.Value) PartitioningPolicyOption

func WithPartitioningPolicyMode

func WithPartitioningPolicyMode(mode PartitioningMode) PartitioningPolicyOption

func WithPartitioningPolicyPreset

func WithPartitioningPolicyPreset(name string) PartitioningPolicyOption

func WithPartitioningPolicyUniformPartitions

func WithPartitioningPolicyUniformPartitions(n uint64) PartitioningPolicyOption

type PartitioningSettings

type PartitioningSettings struct {
	PartitioningBySize ydb.FeatureFlag
	PartitionSizeMb    uint64
	PartitioningByLoad ydb.FeatureFlag
	MinPartitionsCount uint64
	MaxPartitionsCount uint64
}

type PartitioningSettingsOption

type PartitioningSettingsOption func(settings *ydbPartitioningSettings)

func WithMaxPartitionsCount

func WithMaxPartitionsCount(maxPartitionsCount uint64) PartitioningSettingsOption

func WithMinPartitionsCount

func WithMinPartitionsCount(minPartitionsCount uint64) PartitioningSettingsOption

func WithPartitionSizeMb

func WithPartitionSizeMb(partitionSizeMb uint64) PartitioningSettingsOption

func WithPartitioningByLoad

func WithPartitioningByLoad(flag ydb.FeatureFlag) PartitioningSettingsOption

func WithPartitioningBySize

func WithPartitioningBySize(flag ydb.FeatureFlag) PartitioningSettingsOption

type PrepareDataQueryDoneInfo

type PrepareDataQueryDoneInfo struct {
	Context context.Context
	Session *Session
	Query   string
	Result  *DataQuery
	Cached  bool
	Error   error
}

type PrepareDataQueryStartInfo

type PrepareDataQueryStartInfo struct {
	Context context.Context
	Session *Session
	Query   string
}

type ProfileOption

type ProfileOption func(p *profile)

func WithCachingPolicy

func WithCachingPolicy(opts ...CachingPolicyOption) ProfileOption

func WithCompactionPolicy

func WithCompactionPolicy(opts ...CompactionPolicyOption) ProfileOption

func WithExecutionPolicy

func WithExecutionPolicy(opts ...ExecutionPolicyOption) ProfileOption

func WithPartitioningPolicy

func WithPartitioningPolicy(opts ...PartitioningPolicyOption) ProfileOption

func WithProfilePreset

func WithProfilePreset(name string) ProfileOption

func WithReplicationPolicy

func WithReplicationPolicy(opts ...ReplicationPolicyOption) ProfileOption

func WithStoragePolicy

func WithStoragePolicy(opts ...StoragePolicyOption) ProfileOption

type QueryCachePolicyOption

type QueryCachePolicyOption func(*queryCachePolicy)

func WithQueryCachePolicyKeepInCache

func WithQueryCachePolicyKeepInCache() QueryCachePolicyOption

type QueryParameters

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

func NewQueryParameters

func NewQueryParameters(opts ...ParameterOption) *QueryParameters

func (*QueryParameters) Add

func (q *QueryParameters) Add(opts ...ParameterOption)

func (*QueryParameters) Each

func (q *QueryParameters) Each(it func(name string, value ydb.Value))

func (*QueryParameters) String

func (q *QueryParameters) String() string

type QueryPhase

type QueryPhase struct {
	Duration       time.Duration
	CPUTime        time.Duration
	AffectedShards uint64
	// contains filtered or unexported fields
}

QueryPhase holds query execution phase statistics.

func (*QueryPhase) NextTableAccess

func (q *QueryPhase) NextTableAccess() (t TableAccess, ok bool)

NextTableAccess returns next accessed table within query execution phase.

If ok flag is false, then there are no more accessed tables and t is invalid.

type QueryStats

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

QueryStats holds query execution statistics.

func (*QueryStats) Compilation

func (s *QueryStats) Compilation() (c *CompilationStats)

func (*QueryStats) NextPhase

func (s *QueryStats) NextPhase() (p QueryPhase, ok bool)

NextPhase returns next execution phase within query. If ok flag is false, then there are no more phases and p is invalid.

func (*QueryStats) ProcessCPUTime

func (s *QueryStats) ProcessCPUTime() time.Duration

type ReadReplicasSettings

type ReadReplicasSettings struct {
	Type  ReadReplicasType
	Count uint64
}

type ReadReplicasType

type ReadReplicasType byte
const (
	ReadReplicasPerAzReadReplicas ReadReplicasType = iota
	ReadReplicasAnyAzReadReplicas
)

type ReadTableOption

type ReadTableOption func(*readTableDesc)

Read table options

func ReadColumn

func ReadColumn(name string) ReadTableOption

func ReadGreater

func ReadGreater(x ydb.Value) ReadTableOption

func ReadGreaterOrEqual

func ReadGreaterOrEqual(x ydb.Value) ReadTableOption

func ReadKeyRange

func ReadKeyRange(x KeyRange) ReadTableOption

ReadKeyRange returns ReadTableOption which makes ReadTable read values in range [x.From, x.To).

Both x.From and x.To may be nil.

func ReadLess

func ReadLess(x ydb.Value) ReadTableOption

func ReadLessOrEqual

func ReadLessOrEqual(x ydb.Value) ReadTableOption

func ReadOrdered

func ReadOrdered() ReadTableOption

func ReadRowLimit

func ReadRowLimit(n uint64) ReadTableOption

type ReplicationPolicyDescription

type ReplicationPolicyDescription struct {
	Name   string
	Labels map[string]string
}

type ReplicationPolicyOption

type ReplicationPolicyOption func(*replicationPolicy)

func WithReplicationPolicyAllowPromotion

func WithReplicationPolicyAllowPromotion(flag ydb.FeatureFlag) ReplicationPolicyOption

func WithReplicationPolicyCreatePerAZ

func WithReplicationPolicyCreatePerAZ(flag ydb.FeatureFlag) ReplicationPolicyOption

func WithReplicationPolicyPreset

func WithReplicationPolicyPreset(name string) ReplicationPolicyOption

func WithReplicationPolicyReplicasCount

func WithReplicationPolicyReplicasCount(n uint32) ReplicationPolicyOption

type Result

type Result struct {
	result.Scanner
	// contains filtered or unexported fields
}

Result is a result of a query.

Use NextResultSet(), NextRow() and Scan() to advance through the result sets, its rows and row's items.

res, err := s.Execute(ctx, txc, "SELECT ...")
defer res.Close()
for res.NextResultSet() {
    for res.NextRow() {
        var id int64
        var name *string //optional value
        res.Scan(&id,&name)
    }
}
if err := res.Err() { // get any error encountered during iteration
    // handle error
}

If current value under scan is not requested type, then res.Err() become non-nil. After that, NextResultSet(), NextRow() will return false.

func (*Result) Close

func (r *Result) Close() error

Close closes the Result, preventing further iteration.

func (*Result) Columns

func (r *Result) Columns(it func(Column))

Columns allows to iterate over all columns of the current result set.

func (*Result) Err

func (r *Result) Err() error

Err return scanner error To handle errors, do not need to check after scanning each row It is enough to check after reading all ResultSet

func (*Result) HasNextResultSet added in v2.8.0

func (r *Result) HasNextResultSet() bool

HasNextResultSet reports whether result set may be advanced.

It may be useful to call HasNextResultSet() instead of NextResultSet() to look ahead without advancing the result set.

Note that it does not work with sets from stream.

func (*Result) HasNextSet deprecated

func (r *Result) HasNextSet() bool

Deprecated: Use HasNextResultSet

func (*Result) NextResultSet added in v2.8.0

func (r *Result) NextResultSet(ctx context.Context, columns ...string) bool

NextResultSet selects next result set in the result. columns - names of columns in the resultSet that will be scanned It returns false if there are no more result sets. Stream sets are supported.

func (*Result) NextSet deprecated

func (r *Result) NextSet(columns ...string) bool

Deprecated: Use only NextResultSet with context

func (*Result) NextStreamSet deprecated

func (r *Result) NextStreamSet(ctx context.Context, columns ...string) bool

Deprecated: Use only NextResultSet with context

func (*Result) RowCount

func (r *Result) RowCount() (n int)

RowCount returns the number of rows among the all result sets. Deprecated: RowCount with multiple result sets from different queries are misleads Instead - must iterate over result sets and ask SetRowCount() for each current result set

func (*Result) SetCount

func (r *Result) SetCount() int

SetCount returns number of result sets. Note that it does not work if r is the result of streaming operation.

func (*Result) SetRowCount

func (r *Result) SetRowCount() int

SetRowCount returns number of rows in the current result set.

func (*Result) SetRowItemCount

func (r *Result) SetRowItemCount() int

SetRowItemCount returns number of items in the current row.

func (*Result) Stats

func (r *Result) Stats() (stats QueryStats)

Stats returns query execution stats.

func (*Result) Truncated

func (r *Result) Truncated() bool

Truncated returns true if current result set has been truncated by server.

type RetryLoopDoneInfo

type RetryLoopDoneInfo struct {
	Context  context.Context
	Latency  time.Duration
	Attempts int
}

type RetryLoopStartInfo

type RetryLoopStartInfo struct {
	Context context.Context
}

type RetryTrace

type RetryTrace struct {
	OnLoop func(RetryLoopStartInfo) func(RetryLoopDoneInfo)
}

func ContextRetryTrace

func ContextRetryTrace(ctx context.Context) RetryTrace

ContextRetryTrace returns RetryTrace associated with ctx. If there is no RetryTrace associated with ctx then zero value of RetryTrace is returned.

func (RetryTrace) Compose

func (t RetryTrace) Compose(x RetryTrace) (ret RetryTrace)

Compose returns a new RetryTrace which has functional fields composed both from t and x.

type Retryer

type Retryer struct {
	// SessionProvider is an interface capable for management of ydb sessions.
	// SessionProvider must not be nil.
	SessionProvider SessionProvider

	// MaxRetries is a number of maximum attempts to retry a failed operation.
	// If MaxRetries is zero then no attempts will be made.
	MaxRetries int

	// RetryChecker contains options of mapping errors to retry mode.
	//
	// Note that if RetryChecker's RetryNotFound field is set to true, creation
	// of prepared statements must always be included in the Operation logic.
	// Otherwise when prepared statement become removed by any reason from the
	// server, Retryer will just repeat MaxRetries times reception of statement
	// not found error.
	RetryChecker ydb.RetryChecker

	// Backoff is a selected backoff policy.
	// Deprecated: use FastBackoff and SlowBackoff instead, has no effect now
	Backoff ydb.Backoff

	// FastBackoff is a selected backoff policy.
	// If backoff is nil, then the ydb.DefaultFastBackoff is used.
	FastBackoff ydb.Backoff

	// SlowBackoff is a selected backoff policy.
	// If backoff is nil, then the ydb.DefaultSlowBackoff is used.
	SlowBackoff ydb.Backoff

	// Trace provide tracing of retry logic
	Trace RetryTrace
}

Retryer contains logic of retrying operations failed with retriable errors.

func (Retryer) Do

func (r Retryer) Do(ctx context.Context, op Operation) (err error)

Do calls op.Do until it return nil or not retriable error.

type RollbackTransactionDoneInfo

type RollbackTransactionDoneInfo struct {
	Context context.Context
	Session *Session
	TxID    string
	Error   error
}

type RollbackTransactionStartInfo

type RollbackTransactionStartInfo struct {
	Context context.Context
	Session *Session
	TxID    string
}

type Session

type Session struct {
	ID string
	// contains filtered or unexported fields
}

Session represents a single table API session.

Session methods are not goroutine safe. Simultaneous execution of requests are forbidden within a single session.

Note that after Session is no longer needed it should be destroyed by Close() call.

func (*Session) Address

func (s *Session) Address() string

func (*Session) AlterTable

func (s *Session) AlterTable(ctx context.Context, path string, opts ...AlterTableOption) (err error)

AlterTable modifies schema of table at given path with given options.

func (*Session) BeginTransaction

func (s *Session) BeginTransaction(ctx context.Context, tx *TransactionSettings) (x *Transaction, err error)

BeginTransaction begins new transaction within given session with given settings.

func (*Session) BulkUpsert

func (s *Session) BulkUpsert(ctx context.Context, table string, rows ydb.Value) (err error)

BulkUpsert uploads given list of ydb struct values to the table.

func (*Session) Close

func (s *Session) Close(ctx context.Context) (err error)

func (*Session) CopyTable

func (s *Session) CopyTable(ctx context.Context, dst, src string, _ ...CopyTableOption) (err error)

CopyTable creates copy of table at given path.

func (*Session) CreateTable

func (s *Session) CreateTable(ctx context.Context, path string, opts ...CreateTableOption) (err error)

CreateTable creates table at given path with given options.

func (*Session) DescribeTable

func (s *Session) DescribeTable(ctx context.Context, path string, opts ...DescribeTableOption) (desc Description, err error)

DescribeTable describes table at given path.

func (*Session) DescribeTableOptions

func (s *Session) DescribeTableOptions(ctx context.Context) (desc TableOptionsDescription, err error)

DescribeTableOptions describes supported table options.

func (*Session) DropTable

func (s *Session) DropTable(ctx context.Context, path string, opts ...DropTableOption) (err error)

DropTable drops table at given path with given options.

func (*Session) Execute

func (s *Session) Execute(
	ctx context.Context,
	tx *TransactionControl,
	query string,
	params *QueryParameters,
	opts ...ExecuteDataQueryOption,
) (
	txr *Transaction, r *Result, err error,
)

Execute executes given data query represented by text.

func (*Session) ExecuteSchemeQuery

func (s *Session) ExecuteSchemeQuery(
	ctx context.Context, query string,
	opts ...ExecuteSchemeQueryOption,
) (err error)

ExecuteSchemeQuery executes scheme query.

func (*Session) Explain

func (s *Session) Explain(ctx context.Context, query string) (exp DataQueryExplanation, err error)

Explain explains data query represented by text.

func (*Session) KeepAlive

func (s *Session) KeepAlive(ctx context.Context) (info SessionInfo, err error)

KeepAlive keeps idle session alive.

func (*Session) OnClose

func (s *Session) OnClose(cb func())

func (*Session) Prepare

func (s *Session) Prepare(
	ctx context.Context, query string,
) (
	stmt *Statement, err error,
)

Prepare prepares data query within session s.

func (*Session) StreamExecuteScanQuery

func (s *Session) StreamExecuteScanQuery(
	ctx context.Context,
	query string,
	params *QueryParameters,
	opts ...ExecuteScanQueryOption,
) (
	_ *Result, err error,
)

StreamExecuteScanQuery scan-reads table at given path with given options.

Note that given ctx controls the lifetime of the whole read, not only this StreamExecuteScanQuery() call; that is, the time until returned result is closed via Close() call or fully drained by sequential NextStreamSet() calls.

func (*Session) StreamReadTable

func (s *Session) StreamReadTable(ctx context.Context, path string, opts ...ReadTableOption) (r *Result, err error)

StreamReadTable reads table at given path with given options.

Note that given ctx controls the lifetime of the whole read, not only this StreamReadTable() call; that is, the time until returned result is closed via Close() call or fully drained by sequential NextStreamSet() calls.

type SessionBuilder

type SessionBuilder interface {
	CreateSession(context.Context) (*Session, error)
}

SessionBuilder is the interface that holds logic of creating or deleting sessions.

type SessionInfo

type SessionInfo struct {
	Status SessionStatus
}

type SessionPool

type SessionPool struct {
	// Trace is an optional session lifetime tracing options.
	Trace SessionPoolTrace

	// Builder holds an object capable for creating and deleting sessions.
	// It must not be nil.
	Builder SessionBuilder

	// SizeLimit is an upper bound of pooled sessions.
	// If SizeLimit is less than or equal to zero then the
	// DefaultSessionPoolSizeLimit variable is used as a limit.
	SizeLimit int

	// KeepAliveMinSize is a lower bound for sessions in the pool. If there are more sessions open, then
	// the excess idle ones will be closed and removed after IdleKeepAliveThreshold is reached for each of them.
	// If KeepAliveMinSize is less than zero, then no sessions will be preserved
	// If KeepAliveMinSize is zero, the DefaultKeepAliveMinSize is used
	KeepAliveMinSize int

	// IdleKeepAliveThreshold is a number of keepAlive messages to call before the
	// Session is removed if it is an excess session (see KeepAliveMinSize)
	// This means that session will be deleted after the expiration of lifetime = IdleThreshold * IdleKeepAliveThreshold
	// If IdleKeepAliveThreshold is less than zero then it will be treated as infinite and no sessions will
	// be removed ever.
	// If IdleKeepAliveThreshold is equal to zero, it will be set to DefaultIdleKeepAliveThreshold
	IdleKeepAliveThreshold int

	// IdleThreshold is a maximum duration between any activity within session.
	// If this threshold reached, KeepAlive() method will be called on idle
	// session.
	//
	// If IdleThreshold is less than zero then there is no idle limit.
	// If IdleThreshold is zero, then the DefaultSessionPoolIdleThreshold value
	// is used.
	IdleThreshold time.Duration

	// BusyCheckInterval is an interval between busy sessions status checks.
	// If BusyCheckInterval is less than zero then there busy checking is
	// disabled.
	// If BusyCheckInterval is equal to zero, then the
	// DefaultSessionPoolBusyCheckInterval value is used.
	// Deprecated: has no effect now
	BusyCheckInterval time.Duration

	// Deprecated: unnecessary parameter
	// it will be removed at next major release
	// KeepAliveBatchSize is a maximum number sessions taken from the pool to
	// prepare KeepAlive() call on them in background.
	// If KeepAliveBatchSize is less than or equal to zero, then there is no
	// batch limit.
	KeepAliveBatchSize int

	// KeepAliveTimeout limits maximum time spent on KeepAlive request
	// If KeepAliveTimeout is less than or equal to zero then the
	// DefaultSessionPoolKeepAliveTimeout is used.
	KeepAliveTimeout time.Duration

	// CreateSessionTimeout limits maximum time spent on Create session request
	// If CreateSessionTimeout is less than or equal to zero then the
	// DefaultSessionPoolCreateSessionTimeout is used.
	CreateSessionTimeout time.Duration

	// DeleteTimeout limits maximum time spent on Delete request
	// If DeleteTimeout is less than or equal to zero then the
	// DefaultSessionPoolDeleteTimeout is used.
	DeleteTimeout time.Duration
	// contains filtered or unexported fields
}

SessionPool is a set of Session instances that may be reused. A SessionPool is safe for use by multiple goroutines simultaneously.

func (*SessionPool) Close

func (p *SessionPool) Close(ctx context.Context) (err error)

Close deletes all stored sessions inside SessionPool. It also stops all underlying timers and goroutines. It returns first error occured during stale sessions deletion. Note that even on error it calls Close() on each session.

func (*SessionPool) CloseSession added in v2.6.0

func (p *SessionPool) CloseSession(ctx context.Context, s *Session) error

CloseSession provides the most effective way of session closing instead of plain session.Close. CloseSession must be fast. If necessary, can be async.

func (*SessionPool) Create

func (p *SessionPool) Create(ctx context.Context) (s *Session, err error)

Create creates new session and returns it. The intended way of Create() usage relates to Take() method.

func (*SessionPool) Get

func (p *SessionPool) Get(ctx context.Context) (s *Session, err error)

Get returns first idle session from the SessionPool and removes it from there. If no items stored in SessionPool it creates new one by calling Builder.CreateSession() method and returns it.

func (*SessionPool) Put

func (p *SessionPool) Put(ctx context.Context, s *Session) (err error)

Put returns session to the SessionPool for further reuse. If pool is already closed Put() calls s.Close(ctx) and returns ErrSessionPoolClosed. If pool is overflow calls s.Close(ctx) and returns ErrSessionPoolOverflow.

Note that Put() must be called only once after being created or received by Get() or Take() calls. In other way it will produce unexpected behavior or panic.

func (*SessionPool) PutBusy

func (p *SessionPool) PutBusy(ctx context.Context, s *Session) (err error)

PutBusy used for putting session into busy checker Deprecated: use Put() instead

func (*SessionPool) Stats

func (p *SessionPool) Stats() SessionPoolStats

func (*SessionPool) Take

func (p *SessionPool) Take(ctx context.Context, s *Session) (took bool, err error)

Take removes session s from the pool and ensures that s will not be returned by other Take() or Get() calls.

The intended way of Take() use is to create session by calling Create() and Put() it later to prepare KeepAlive tracking when session is idle. When Session becomes active, one should call Take() to stop KeepAlive tracking (simultaneous use of Session is prohibited).

After session returned to the pool by calling PutBusy() it can not be taken by Take() any more. That is, semantically PutBusy() is the same as session's Close().

It is assumed that Take() callers never call Get() method.

type SessionPoolBusyCheckDoneInfo

type SessionPoolBusyCheckDoneInfo struct {
	Context context.Context
	Session *Session
	Reused  bool
	Error   error
}

type SessionPoolBusyCheckStartInfo

type SessionPoolBusyCheckStartInfo struct {
	Context context.Context
	Session *Session
}

type SessionPoolCloseDoneInfo

type SessionPoolCloseDoneInfo struct {
	Context context.Context
	Error   error
}

type SessionPoolCloseSessionDoneInfo added in v2.6.0

type SessionPoolCloseSessionDoneInfo struct {
	Context context.Context
	Session *Session
	Error   error
}

type SessionPoolCloseSessionStartInfo added in v2.6.0

type SessionPoolCloseSessionStartInfo struct {
	Context context.Context
	Session *Session
}

type SessionPoolCloseStartInfo

type SessionPoolCloseStartInfo struct {
	Context context.Context
}

type SessionPoolCreateDoneInfo added in v2.6.0

type SessionPoolCreateDoneInfo struct {
	Context context.Context
	Session *Session
	Error   error
}

type SessionPoolCreateStartInfo added in v2.6.0

type SessionPoolCreateStartInfo struct {
	Context context.Context
}

type SessionPoolGetDoneInfo

type SessionPoolGetDoneInfo struct {
	Context       context.Context
	Session       *Session
	Latency       time.Duration
	RetryAttempts int
	Error         error
}

type SessionPoolGetStartInfo

type SessionPoolGetStartInfo struct {
	Context context.Context
}

type SessionPoolPutBusyDoneInfo added in v2.6.0

type SessionPoolPutBusyDoneInfo struct {
	Context context.Context
	Session *Session
	Error   error
}

type SessionPoolPutBusyStartInfo added in v2.6.0

type SessionPoolPutBusyStartInfo struct {
	Context context.Context
	Session *Session
}

type SessionPoolPutDoneInfo

type SessionPoolPutDoneInfo struct {
	Context context.Context
	Session *Session
	Error   error
}

type SessionPoolPutStartInfo

type SessionPoolPutStartInfo struct {
	Context context.Context
	Session *Session
}

type SessionPoolStats

type SessionPoolStats struct {
	Idle             int
	Index            int
	WaitQ            int
	MinSize          int
	MaxSize          int
	CreateInProgress int
	// Deprecated: always zero
	Ready int
	// Deprecated: always zero
	BusyCheck int
}

type SessionPoolTakeDoneInfo

type SessionPoolTakeDoneInfo struct {
	Context context.Context
	Session *Session
	Took    bool
	Error   error
}

type SessionPoolTakeStartInfo

type SessionPoolTakeStartInfo struct {
	Context context.Context
	Session *Session
}

type SessionPoolTakeWaitInfo

type SessionPoolTakeWaitInfo struct {
	Context context.Context
	Session *Session
}

type SessionPoolTrace

func ContextSessionPoolTrace

func ContextSessionPoolTrace(ctx context.Context) SessionPoolTrace

ContextSessionPoolTrace returns SessionPoolTrace associated with ctx. If there is no SessionPoolTrace associated with ctx then zero value of SessionPoolTrace is returned.

func (SessionPoolTrace) Compose

Compose returns a new SessionPoolTrace which has functional fields composed both from t and x.

type SessionPoolWaitDoneInfo

type SessionPoolWaitDoneInfo struct {
	Context context.Context
	Session *Session
	Error   error
}

type SessionPoolWaitStartInfo

type SessionPoolWaitStartInfo struct {
	Context context.Context
}

type SessionProvider

type SessionProvider interface {
	// Get returns alive idle session or creates new one.
	Get(context.Context) (*Session, error)

	// Put takes no longer needed session for reuse or deletion depending
	// on implementation.
	// Put must be fast, if necessary must be async
	Put(context.Context, *Session) (err error)

	// PutBusy takes session with not yet completed operation inside.
	// It gives full ownership of s to session provider.
	// PutBusy must be fast, if necessary must be async
	// Deprecated: use conditionally Put() or CloseSession() for uncertain
	// sessions instead
	PutBusy(context.Context, *Session) (err error)

	// CloseSession provides the most effective way of session closing
	// instead of plain session.Close.
	// CloseSession must be fast. If necessary, can be async.
	CloseSession(ctx context.Context, s *Session) error
}

SessionProvider is the interface that holds session lifecycle logic.

func SingleSession

func SingleSession(s *Session) SessionProvider

SingleSession returns SessionProvider that uses only given session durting retries.

type SessionProviderFunc

type SessionProviderFunc struct {
	OnGet func(context.Context) (*Session, error)
	OnPut func(context.Context, *Session) error
	// Deprecated: has no effect now
	OnPutBusy func(context.Context, *Session) error
}

func (SessionProviderFunc) CloseSession added in v2.6.0

func (f SessionProviderFunc) CloseSession(ctx context.Context, s *Session) error

func (SessionProviderFunc) Get

func (SessionProviderFunc) Put

func (SessionProviderFunc) PutBusy deprecated

func (f SessionProviderFunc) PutBusy(ctx context.Context, s *Session) error

Deprecated: wull be dropped at next major release

type SessionStatus

type SessionStatus byte
const (
	SessionStatusUnknown SessionStatus = iota
	SessionReady
	SessionBusy
)

func (SessionStatus) String

func (s SessionStatus) String() string

type Statement

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

Statement is a prepared statement. Like a single Session, it is not safe for concurrent use by multiple goroutines.

func (*Statement) Execute

func (s *Statement) Execute(
	ctx context.Context, tx *TransactionControl,
	params *QueryParameters,
	opts ...ExecuteDataQueryOption,
) (
	txr *Transaction, r *Result, err error,
)

Execute executes prepared data query.

func (*Statement) NumInput

func (s *Statement) NumInput() int

func (*Statement) Text

func (s *Statement) Text() string

type StoragePolicyDescription

type StoragePolicyDescription struct {
	Name   string
	Labels map[string]string
}

type StoragePolicyOption

type StoragePolicyOption func(*storagePolicy)

func WithStoragePolicyData

func WithStoragePolicyData(kind string) StoragePolicyOption

func WithStoragePolicyExternal

func WithStoragePolicyExternal(kind string) StoragePolicyOption

func WithStoragePolicyKeepInMemory

func WithStoragePolicyKeepInMemory(flag ydb.FeatureFlag) StoragePolicyOption

func WithStoragePolicyLog

func WithStoragePolicyLog(kind string) StoragePolicyOption

func WithStoragePolicyPreset

func WithStoragePolicyPreset(name string) StoragePolicyOption

func WithStoragePolicySyslog

func WithStoragePolicySyslog(kind string) StoragePolicyOption

type StoragePool

type StoragePool struct {
	Media string
}

type StorageSettings

type StorageSettings struct {
	TableCommitLog0    StoragePool
	TableCommitLog1    StoragePool
	External           StoragePool
	StoreExternalBlobs ydb.FeatureFlag
}

type StreamExecuteScanQueryDoneInfo

type StreamExecuteScanQueryDoneInfo struct {
	Context    context.Context
	Session    *Session
	Query      *DataQuery
	Parameters *QueryParameters
	Result     *Result
	Error      error
}

type StreamExecuteScanQueryStartInfo

type StreamExecuteScanQueryStartInfo struct {
	Context    context.Context
	Session    *Session
	Query      *DataQuery
	Parameters *QueryParameters
}

type StreamReadTableDoneInfo

type StreamReadTableDoneInfo struct {
	Context context.Context
	Session *Session
	Result  *Result
	Error   error
}

type StreamReadTableStartInfo

type StreamReadTableStartInfo struct {
	Context context.Context
	Session *Session
}

type TTLSettings

type TTLSettings struct {
	DateTimeColumn string
	TTLSeconds     uint32
}

Deprecated use TimeToLiveSettings instead. Will be removed after Jan 2022.

type TableAccess

type TableAccess struct {
	Name    string
	Reads   OperationStats
	Updates OperationStats
	Deletes OperationStats
}

TableAccess contains query execution phase's table access statistics.

type TableOptionsDescription

type TableOptionsDescription struct {
	TableProfilePresets       []TableProfileDescription
	StoragePolicyPresets      []StoragePolicyDescription
	CompactionPolicyPresets   []CompactionPolicyDescription
	PartitioningPolicyPresets []PartitioningPolicyDescription
	ExecutionPolicyPresets    []ExecutionPolicyDescription
	ReplicationPolicyPresets  []ReplicationPolicyDescription
	CachingPolicyPresets      []CachingPolicyDescription
}

type TableProfileDescription

type TableProfileDescription struct {
	Name   string
	Labels map[string]string

	DefaultStoragePolicy      string
	DefaultCompactionPolicy   string
	DefaultPartitioningPolicy string
	DefaultExecutionPolicy    string
	DefaultReplicationPolicy  string
	DefaultCachingPolicy      string

	AllowedStoragePolicies      []string
	AllowedCompactionPolicies   []string
	AllowedPartitioningPolicies []string
	AllowedExecutionPolicies    []string
	AllowedReplicationPolicies  []string
	AllowedCachingPolicies      []string
}

type TableStats

type TableStats struct {
	PartitionStats   []PartitionStats
	RowsEstimate     uint64
	StoreSize        uint64
	Partitions       uint64
	CreationTime     time.Time
	ModificationTime time.Time
}

type TimeToLiveMode

type TimeToLiveMode byte
const (
	TimeToLiveModeDateType TimeToLiveMode = iota
	TimeToLiveModeValueSinceUnixEpoch
)

type TimeToLiveSettings

type TimeToLiveSettings struct {
	ColumnName         string
	ExpireAfterSeconds uint32

	ColumnUnit *TimeToLiveUnit // valid with Mode = TimeToLiveModeValueSinceUnixEpoch
	// Specifies mode
	Mode TimeToLiveMode
}

func (*TimeToLiveSettings) ToYDB

type TimeToLiveUnit

type TimeToLiveUnit int32
const (
	TimeToLiveUnitUnspecified TimeToLiveUnit = iota
	TimeToLiveUnitSeconds
	TimeToLiveUnitMilliseconds
	TimeToLiveUnitMicroseconds
	TimeToLiveUnitNanoseconds
)

func (*TimeToLiveUnit) ToYDB

type Transaction

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

Transaction is a database transaction. Hence session methods are not goroutine safe, Transaction is not goroutine safe either.

func (*Transaction) Commit deprecated

func (tx *Transaction) Commit(ctx context.Context) (err error)

Deprecated: Use CommitTx instead Commit commits specified active transaction.

func (*Transaction) CommitTx

func (tx *Transaction) CommitTx(ctx context.Context, opts ...CommitTransactionOption) (result *Result, err error)

CommitTx commits specified active transaction.

func (*Transaction) Execute

func (tx *Transaction) Execute(
	ctx context.Context,
	query string, params *QueryParameters,
	opts ...ExecuteDataQueryOption,
) (r *Result, err error)

Execute executes query represented by text within transaction tx.

func (*Transaction) ExecuteStatement

func (tx *Transaction) ExecuteStatement(
	ctx context.Context,
	stmt *Statement, params *QueryParameters,
	opts ...ExecuteDataQueryOption,
) (r *Result, err error)

ExecuteStatement executes prepared statement stmt within transaction tx.

func (*Transaction) Rollback

func (tx *Transaction) Rollback(ctx context.Context) (err error)

Rollback performs a rollback of the specified active transaction.

type TransactionControl

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

func TxControl

func TxControl(opts ...TxControlOption) *TransactionControl

type TransactionSettings

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

func TxSettings

func TxSettings(opts ...TxOption) *TransactionSettings

type TxControlOption

type TxControlOption func(*txControlDesc)

func BeginTx

func BeginTx(opts ...TxOption) TxControlOption

func CommitTx

func CommitTx() TxControlOption

func WithTx

func WithTx(t *Transaction) TxControlOption

type TxOnlineReadOnlyOption

type TxOnlineReadOnlyOption func(*txOnlineReadOnly)

func WithInconsistentReads

func WithInconsistentReads() TxOnlineReadOnlyOption

type TxOption

type TxOption func(*txDesc)

Transaction control options

func WithOnlineReadOnly

func WithOnlineReadOnly(opts ...TxOnlineReadOnlyOption) TxOption

func WithSerializableReadWrite

func WithSerializableReadWrite() TxOption

func WithStaleReadOnly

func WithStaleReadOnly() TxOption

Jump to

Keyboard shortcuts

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