package options
import "github.com/ydb-platform/ydb-go-sdk/v3/table/options"
Index ¶
- Constants
- func ReadColumn(name string) readColumnsOption
- func ReadColumns(names ...string) readColumnsOption
- func WithCallOptions(opts ...grpc.CallOption) withCallOptions
- type AlterTableDesc
- type AlterTableOption
- func WithAddAttribute(key, value string) AlterTableOption
- func WithAddColumn(name string, typ types.Type) AlterTableOption
- func WithAddColumnFamilies(cf ...ColumnFamily) AlterTableOption
- func WithAddColumnMeta(column Column) AlterTableOption
- func WithAddIndex(name string, opts ...IndexOption) AlterTableOption
- func WithAlterAttribute(key, value string) AlterTableOption
- func WithAlterColumnFamilies(cf ...ColumnFamily) AlterTableOption
- func WithAlterKeyBloomFilter(f FeatureFlag) AlterTableOption
- func WithAlterPartitionSettingsObject(ps PartitioningSettings) AlterTableOption
- func WithAlterReadReplicasSettings(rr ReadReplicasSettings) AlterTableOption
- func WithAlterStorageSettings(ss StorageSettings) AlterTableOption
- func WithDropAttribute(key string) AlterTableOption
- func WithDropColumn(name string) AlterTableOption
- func WithDropIndex(name string) AlterTableOption
- func WithDropTimeToLive() AlterTableOption
- func WithSetTimeToLiveSettings(settings TimeToLiveSettings) AlterTableOption
- type BulkUpsertOption
- type CachingPolicyDescription
- type CachingPolicyOption
- type ChangefeedDescription
- type ChangefeedFormat
- type ChangefeedMode
- type ChangefeedState
- type Column
- type ColumnFamily
- type ColumnFamilyCompression
- type CommitTransactionDesc
- type CommitTransactionOption
- func WithCommitCollectStatsModeBasic() CommitTransactionOption
- func WithCommitCollectStatsModeNone() CommitTransactionOption
- type CompactionPolicyDescription
- type CompactionPolicyOption
- type CopyTableDesc
- type CopyTableOption
- type CopyTablesDesc
- type CopyTablesOption
- type CreateTableDesc
- type CreateTableOption
- func WithAttribute(key, value string) CreateTableOption
- func WithColumn(name string, typ types.Type) CreateTableOption
- func WithColumnFamilies(cf ...ColumnFamily) CreateTableOption
- func WithColumnMeta(column Column) CreateTableOption
- func WithIndex(name string, opts ...IndexOption) CreateTableOption
- func WithKeyBloomFilter(f FeatureFlag) CreateTableOption
- func WithPartitioningSettings(opts ...PartitioningSettingsOption) CreateTableOption
- func WithPartitioningSettingsObject(ps PartitioningSettings) CreateTableOption
- func WithPartitions(p Partitions) CreateTableOption
- func WithPrimaryKeyColumn(columns ...string) CreateTableOption
- func WithProfile(opts ...ProfileOption) CreateTableOption
- func WithReadReplicasSettings(rr ReadReplicasSettings) CreateTableOption
- func WithStorageSettings(ss StorageSettings) CreateTableOption
- func WithTimeToLiveSettings(settings TimeToLiveSettings) CreateTableOption
- type DescribeTableDesc
- type DescribeTableOption
- func WithPartitionStats() DescribeTableOption
- func WithShardKeyBounds() DescribeTableOption
- func WithShardNodesInfo() DescribeTableOption
- func WithTableStats() DescribeTableOption
- type Description
- type DropTableDesc
- type DropTableOption
- type ExecuteDataQueryDesc
- type ExecuteDataQueryOption
- func WithCollectStatsModeBasic() ExecuteDataQueryOption
- func WithCollectStatsModeNone() ExecuteDataQueryOption
- func WithCommit() ExecuteDataQueryOption
- func WithIgnoreTruncated() ExecuteDataQueryOption
- func WithKeepInCache(keepInCache bool) ExecuteDataQueryOption
- func WithQueryCachePolicy(opts ...QueryCachePolicyOption) ExecuteDataQueryOption
- type ExecuteScanQueryDesc
- type ExecuteScanQueryOption
- func WithExecuteScanQueryMode(m ExecuteScanQueryRequestMode) ExecuteScanQueryOption
- func WithExecuteScanQueryStats(stats ExecuteScanQueryStatsType) ExecuteScanQueryOption
- type ExecuteScanQueryRequestMode
- type ExecuteScanQueryStatsType
- type ExecuteSchemeQueryDesc
- type ExecuteSchemeQueryOption
- type ExecutionPolicyDescription
- type ExecutionPolicyOption
- type FeatureFlag
- type IndexDescription
- type IndexOption
- func WithDataColumns(columns ...string) IndexOption
- func WithIndexColumns(columns ...string) IndexOption
- func WithIndexType(t IndexType) IndexOption
- type IndexType
- func GlobalAsyncIndex() IndexType
- func GlobalIndex() IndexType
- func (t IndexType) ApplyIndexOption(d *indexDesc)
- type KeyRange
- type PartitionStats
- type PartitioningMode
- type PartitioningPolicyDescription
- type PartitioningPolicyOption
- func WithPartitioningPolicyExplicitPartitions(splitPoints ...value.Value) PartitioningPolicyOption
- func WithPartitioningPolicyMode(mode PartitioningMode) PartitioningPolicyOption
- func WithPartitioningPolicyPreset(name string) PartitioningPolicyOption
- func WithPartitioningPolicyUniformPartitions(n uint64) PartitioningPolicyOption
- type PartitioningSettings
- type PartitioningSettingsOption
- func WithMaxPartitionsCount(maxPartitionsCount uint64) PartitioningSettingsOption
- func WithMinPartitionsCount(minPartitionsCount uint64) PartitioningSettingsOption
- func WithPartitionSizeMb(partitionSizeMb uint64) PartitioningSettingsOption
- func WithPartitioningBy(columns []string) PartitioningSettingsOption
- func WithPartitioningByLoad(flag FeatureFlag) PartitioningSettingsOption
- func WithPartitioningBySize(flag FeatureFlag) PartitioningSettingsOption
- type Partitions
- func WithExplicitPartitions(splitPoints ...value.Value) Partitions
- func WithUniformPartitions(n uint64) Partitions
- type ProfileOption
- func WithCachingPolicy(opts ...CachingPolicyOption) ProfileOption
- func WithCompactionPolicy(opts ...CompactionPolicyOption) ProfileOption
- func WithExecutionPolicy(opts ...ExecutionPolicyOption) ProfileOption
- func WithPartitioningPolicy(opts ...PartitioningPolicyOption) ProfileOption
- func WithProfilePreset(name string) ProfileOption
- func WithReplicationPolicy(opts ...ReplicationPolicyOption) ProfileOption
- func WithStoragePolicy(opts ...StoragePolicyOption) ProfileOption
- type QueryCachePolicyOption
- type ReadReplicasSettings
- func NewReadReplicasSettings(rr *Ydb_Table.ReadReplicasSettings) ReadReplicasSettings
- func (rr ReadReplicasSettings) ToYDB() *Ydb_Table.ReadReplicasSettings
- type ReadReplicasType
- type ReadRowsDesc
- type ReadRowsOption
- type ReadTableDesc
- type ReadTableOption
- func ReadFromSnapshot(b bool) ReadTableOption
- func ReadGreater(x value.Value) ReadTableOption
- func ReadGreaterOrEqual(x value.Value) ReadTableOption
- func ReadKeyRange(x KeyRange) ReadTableOption
- func ReadLess(x value.Value) ReadTableOption
- func ReadLessOrEqual(x value.Value) ReadTableOption
- func ReadOrdered() ReadTableOption
- func ReadRowLimit(n uint64) ReadTableOption
- type RenameTablesDesc
- type RenameTablesOption
- type ReplicationPolicyDescription
- type ReplicationPolicyOption
- func WithReplicationPolicyAllowPromotion(flag FeatureFlag) ReplicationPolicyOption
- func WithReplicationPolicyCreatePerAZ(flag FeatureFlag) ReplicationPolicyOption
- func WithReplicationPolicyPreset(name string) ReplicationPolicyOption
- func WithReplicationPolicyReplicasCount(n uint32) ReplicationPolicyOption
- type StoragePolicyDescription
- type StoragePolicyOption
- func WithStoragePolicyData(kind string) StoragePolicyOption
- func WithStoragePolicyExternal(kind string) StoragePolicyOption
- func WithStoragePolicyKeepInMemory(flag FeatureFlag) StoragePolicyOption
- func WithStoragePolicyLog(kind string) StoragePolicyOption
- func WithStoragePolicyPreset(name string) StoragePolicyOption
- func WithStoragePolicySyslog(kind string) StoragePolicyOption
- type StoragePool
- type StorageSettings
- func NewStorageSettings(ss *Ydb_Table.StorageSettings) StorageSettings
- func (ss StorageSettings) ToYDB() *Ydb_Table.StorageSettings
- type StoreType
- type TTLSettings
- type TableOptionsDescription
- type TableProfileDescription
- type TableStats
- type TimeToLiveMode
- type TimeToLiveSettings
- func NewTTLSettings() TimeToLiveSettings
- func (ttl TimeToLiveSettings) ColumnDateType(columnName string) TimeToLiveSettings
- func (ttl TimeToLiveSettings) ColumnMicroseconds(columnName string) TimeToLiveSettings
- func (ttl TimeToLiveSettings) ColumnMilliseconds(columnName string) TimeToLiveSettings
- func (ttl TimeToLiveSettings) ColumnNanoseconds(columnName string) TimeToLiveSettings
- func (ttl TimeToLiveSettings) ColumnSeconds(columnName string) TimeToLiveSettings
- func (ttl TimeToLiveSettings) ExpireAfter(expireAfter time.Duration) TimeToLiveSettings
- func (ttl *TimeToLiveSettings) ToYDB() *Ydb_Table.TtlSettings
- type TimeToLiveUnit
Constants ¶
const ( ChangefeedStateUnspecified = ChangefeedState(Ydb_Table.ChangefeedDescription_STATE_UNSPECIFIED) ChangefeedStateEnabled = ChangefeedState(Ydb_Table.ChangefeedDescription_STATE_ENABLED) ChangefeedStateDisabled = ChangefeedState(Ydb_Table.ChangefeedDescription_STATE_DISABLED) )
const ( ChangefeedModeUnspecified = ChangefeedMode(Ydb_Table.ChangefeedMode_MODE_UNSPECIFIED) ChangefeedModeKeysOnly = ChangefeedMode(Ydb_Table.ChangefeedMode_MODE_KEYS_ONLY) ChangefeedModeUpdates = ChangefeedMode(Ydb_Table.ChangefeedMode_MODE_UPDATES) ChangefeedModeNewImage = ChangefeedMode(Ydb_Table.ChangefeedMode_MODE_NEW_IMAGE) ChangefeedModeOldImage = ChangefeedMode(Ydb_Table.ChangefeedMode_MODE_OLD_IMAGE) ChangefeedModeNewAndOldImages = ChangefeedMode(Ydb_Table.ChangefeedMode_MODE_NEW_AND_OLD_IMAGES) )
const ( ChangefeedFormatUnspecified = ChangefeedFormat(Ydb_Table.ChangefeedFormat_FORMAT_UNSPECIFIED) ChangefeedFormatJSON = ChangefeedFormat(Ydb_Table.ChangefeedFormat_FORMAT_JSON) ChangefeedFormatDynamoDBStreamsJSON = ChangefeedFormat(Ydb_Table.ChangefeedFormat_FORMAT_DYNAMODB_STREAMS_JSON) )
const ( StoreTypeUnspecified = StoreType(Ydb_Table.StoreType_STORE_TYPE_UNSPECIFIED) StoreTypeRow = StoreType(Ydb_Table.StoreType_STORE_TYPE_ROW) StoreTypeColumn = StoreType(Ydb_Table.StoreType_STORE_TYPE_COLUMN) )
const ( ExecuteScanQueryStatsTypeNone = iota ExecuteScanQueryStatsTypeBasic ExecuteScanQueryStatsTypeFull )
Functions ¶
func ReadColumn ¶
func ReadColumn(name string) readColumnsOption
func ReadColumns ¶
func ReadColumns(names ...string) readColumnsOption
func WithCallOptions ¶
func WithCallOptions(opts ...grpc.CallOption) withCallOptions
WithCallOptions appends flag of commit transaction with executing query
Types ¶
type AlterTableDesc ¶
type AlterTableDesc Ydb_Table.AlterTableRequest
type AlterTableOption ¶
type AlterTableOption interface { ApplyAlterTableOption(desc *AlterTableDesc, a *allocator.Allocator) }
func WithAddAttribute ¶
func WithAddAttribute(key, value string) AlterTableOption
WithAddAttribute adds attribute to table in AlterTable request
func WithAddColumn ¶
func WithAddColumn(name string, typ types.Type) AlterTableOption
WithAddColumn adds column in AlterTable request
func WithAddColumnFamilies ¶
func WithAddColumnFamilies(cf ...ColumnFamily) AlterTableOption
func WithAddColumnMeta ¶
func WithAddColumnMeta(column Column) AlterTableOption
func WithAddIndex ¶
func WithAddIndex(name string, opts ...IndexOption) AlterTableOption
func WithAlterAttribute ¶
func WithAlterAttribute(key, value string) AlterTableOption
WithAlterAttribute changes attribute in AlterTable request
func WithAlterColumnFamilies ¶
func WithAlterColumnFamilies(cf ...ColumnFamily) AlterTableOption
func WithAlterKeyBloomFilter ¶
func WithAlterKeyBloomFilter(f FeatureFlag) AlterTableOption
func WithAlterPartitionSettingsObject ¶
func WithAlterPartitionSettingsObject(ps PartitioningSettings) AlterTableOption
func WithAlterReadReplicasSettings ¶
func WithAlterReadReplicasSettings(rr ReadReplicasSettings) AlterTableOption
func WithAlterStorageSettings ¶
func WithAlterStorageSettings(ss StorageSettings) AlterTableOption
func WithDropAttribute ¶
func WithDropAttribute(key string) AlterTableOption
WithDropAttribute drops attribute from table in AlterTable request
func WithDropColumn ¶
func WithDropColumn(name string) AlterTableOption
func WithDropIndex ¶
func WithDropIndex(name string) AlterTableOption
func WithDropTimeToLive ¶
func WithDropTimeToLive() AlterTableOption
WithDropTimeToLive drops TTL settings in AlterTable request
func WithSetTimeToLiveSettings ¶
func WithSetTimeToLiveSettings(settings TimeToLiveSettings) AlterTableOption
WithSetTimeToLiveSettings appends TTL settings in AlterTable request
type BulkUpsertOption ¶
type BulkUpsertOption interface { ApplyBulkUpsertOption() []grpc.CallOption }
type CachingPolicyDescription ¶
type CachingPolicyOption ¶
type CachingPolicyOption func(*cachingPolicy)
func WithCachingPolicyPreset ¶
func WithCachingPolicyPreset(name string) CachingPolicyOption
type ChangefeedDescription ¶
type ChangefeedDescription struct { Name string Mode ChangefeedMode Format ChangefeedFormat State ChangefeedState VirtualTimestamp bool }
func NewChangefeedDescription ¶
func NewChangefeedDescription(proto *Ydb_Table.ChangefeedDescription) ChangefeedDescription
type ChangefeedFormat ¶
type ChangefeedFormat int
type ChangefeedMode ¶
type ChangefeedMode int
type ChangefeedState ¶
type ChangefeedState int
type Column ¶
func NewTableColumn ¶
type ColumnFamily ¶
type ColumnFamily struct { Name string Data StoragePool Compression ColumnFamilyCompression KeepInMemory FeatureFlag }
func NewColumnFamily ¶
func NewColumnFamily(c *Ydb_Table.ColumnFamily) ColumnFamily
type ColumnFamilyCompression ¶
type ColumnFamilyCompression byte
const ( ColumnFamilyCompressionUnknown ColumnFamilyCompression = iota ColumnFamilyCompressionNone ColumnFamilyCompressionLZ4 )
func (ColumnFamilyCompression) String ¶
func (c ColumnFamilyCompression) String() string
type CommitTransactionDesc ¶
type CommitTransactionDesc Ydb_Table.CommitTransactionRequest
type CommitTransactionOption ¶
type CommitTransactionOption func(*CommitTransactionDesc)
func WithCommitCollectStatsModeBasic ¶
func WithCommitCollectStatsModeBasic() CommitTransactionOption
func WithCommitCollectStatsModeNone ¶
func WithCommitCollectStatsModeNone() CommitTransactionOption
type CompactionPolicyDescription ¶
type CompactionPolicyOption ¶
type CompactionPolicyOption func(*compactionPolicy)
func WithCompactionPolicyPreset ¶
func WithCompactionPolicyPreset(name string) CompactionPolicyOption
type CopyTableDesc ¶
type CopyTableDesc Ydb_Table.CopyTableRequest
type CopyTableOption ¶
type CopyTableOption func(*CopyTableDesc)
type CopyTablesDesc ¶
type CopyTablesDesc Ydb_Table.CopyTablesRequest
type CopyTablesOption ¶
type CopyTablesOption func(*CopyTablesDesc)
func CopyTablesItem ¶
func CopyTablesItem(src, dst string, omitIndexes bool) CopyTablesOption
type CreateTableDesc ¶
type CreateTableDesc Ydb_Table.CreateTableRequest
type CreateTableOption ¶
type CreateTableOption interface { ApplyCreateTableOption(d *CreateTableDesc, a *allocator.Allocator) }
func WithAttribute ¶
func WithAttribute(key, value string) CreateTableOption
func WithColumn ¶
func WithColumn(name string, typ types.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 FeatureFlag) CreateTableOption
func WithPartitioningSettings ¶
func WithPartitioningSettings(opts ...PartitioningSettingsOption) CreateTableOption
func WithPartitioningSettingsObject ¶
func WithPartitioningSettingsObject(ps PartitioningSettings) CreateTableOption
func WithPartitions ¶
func WithPartitions(p Partitions) 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 WithTimeToLiveSettings ¶
func WithTimeToLiveSettings(settings TimeToLiveSettings) CreateTableOption
WithTimeToLiveSettings defines TTL settings in CreateTable request
type DescribeTableDesc ¶
type DescribeTableDesc Ydb_Table.DescribeTableRequest
type DescribeTableOption ¶
type DescribeTableOption func(d *DescribeTableDesc)
func WithPartitionStats ¶
func WithPartitionStats() DescribeTableOption
func WithShardKeyBounds ¶
func WithShardKeyBounds() DescribeTableOption
func WithShardNodesInfo ¶
func WithShardNodesInfo() 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 FeatureFlag PartitioningSettings PartitioningSettings Indexes []IndexDescription TimeToLiveSettings *TimeToLiveSettings Changefeeds []ChangefeedDescription Tiering string StoreType StoreType }
type DropTableDesc ¶
type DropTableDesc Ydb_Table.DropTableRequest
type DropTableOption ¶
type DropTableOption interface { ApplyDropTableOption(desc *DropTableDesc) }
type ExecuteDataQueryDesc ¶
type ExecuteDataQueryDesc struct { *Ydb_Table.ExecuteDataQueryRequest IgnoreTruncated bool }
type ExecuteDataQueryOption ¶
type ExecuteDataQueryOption interface { ApplyExecuteDataQueryOption(d *ExecuteDataQueryDesc, a *allocator.Allocator) []grpc.CallOption }
func WithCollectStatsModeBasic ¶
func WithCollectStatsModeBasic() ExecuteDataQueryOption
func WithCollectStatsModeNone ¶
func WithCollectStatsModeNone() ExecuteDataQueryOption
func WithCommit ¶
func WithCommit() ExecuteDataQueryOption
WithCommit appends flag of commit transaction with executing query
func WithIgnoreTruncated ¶
func WithIgnoreTruncated() ExecuteDataQueryOption
WithIgnoreTruncated mark truncated result as good (without error)
func WithKeepInCache ¶
func WithKeepInCache(keepInCache bool) ExecuteDataQueryOption
WithKeepInCache manages keep-in-cache flag in query cache policy
By default all data queries executes with keep-in-cache policy
func WithQueryCachePolicy ¶
func WithQueryCachePolicy(opts ...QueryCachePolicyOption) ExecuteDataQueryOption
WithQueryCachePolicy manages query cache policy
Deprecated: use WithKeepInCache for disabling keep-in-cache policy. Will be removed after Oct 2024. Read about versioning policy: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#deprecated
type ExecuteScanQueryDesc ¶
type ExecuteScanQueryDesc Ydb_Table.ExecuteScanQueryRequest
type ExecuteScanQueryOption ¶
type ExecuteScanQueryOption interface { ApplyExecuteScanQueryOption(d *ExecuteScanQueryDesc) []grpc.CallOption }
func WithExecuteScanQueryMode ¶
func WithExecuteScanQueryMode(m ExecuteScanQueryRequestMode) ExecuteScanQueryOption
WithExecuteScanQueryMode defines scan query mode: execute or explain
func WithExecuteScanQueryStats ¶
func WithExecuteScanQueryStats(stats ExecuteScanQueryStatsType) ExecuteScanQueryOption
WithExecuteScanQueryStats defines query statistics mode
type ExecuteScanQueryRequestMode ¶
type ExecuteScanQueryRequestMode byte
const ( ExecuteScanQueryRequestModeExec ExecuteScanQueryRequestMode = iota ExecuteScanQueryRequestModeExplain )
type ExecuteScanQueryStatsType ¶
type ExecuteScanQueryStatsType uint32
ExecuteScanQueryStatsType specified scan query mode
type ExecuteSchemeQueryDesc ¶
type ExecuteSchemeQueryDesc Ydb_Table.ExecuteSchemeQueryRequest
type ExecuteSchemeQueryOption ¶
type ExecuteSchemeQueryOption func(*ExecuteSchemeQueryDesc)
type ExecutionPolicyDescription ¶
type ExecutionPolicyOption ¶
type ExecutionPolicyOption func(*executionPolicy)
func WithExecutionPolicyPreset ¶
func WithExecutionPolicyPreset(name string) ExecutionPolicyOption
type FeatureFlag ¶
type IndexDescription ¶
type IndexDescription struct { Name string IndexColumns []string DataColumns []string Status Ydb_Table.TableIndexDescription_Status Type IndexType }
type IndexOption ¶
type IndexOption interface {
ApplyIndexOption(d *indexDesc)
}
func WithDataColumns ¶
func WithDataColumns(columns ...string) IndexOption
func WithIndexColumns ¶
func WithIndexColumns(columns ...string) IndexOption
func WithIndexType ¶
func WithIndexType(t IndexType) IndexOption
type IndexType ¶
type IndexType uint8
func GlobalAsyncIndex ¶
func GlobalAsyncIndex() IndexType
func GlobalIndex ¶
func GlobalIndex() IndexType
func (IndexType) ApplyIndexOption ¶
func (t IndexType) ApplyIndexOption(d *indexDesc)
type KeyRange ¶
func (KeyRange) String ¶
type PartitionStats ¶
type PartitioningMode ¶
type PartitioningMode byte
const ( PartitioningUnknown PartitioningMode = iota PartitioningDisabled PartitioningAutoSplit PartitioningAutoSplitMerge )
type PartitioningPolicyDescription ¶
type PartitioningPolicyOption ¶
func WithPartitioningPolicyExplicitPartitions ¶
func WithPartitioningPolicyExplicitPartitions(splitPoints ...value.Value) PartitioningPolicyOption
Deprecated: use WithExplicitPartitions instead. Will be removed after Oct 2024. Read about versioning policy: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#deprecated
func WithPartitioningPolicyMode ¶
func WithPartitioningPolicyMode(mode PartitioningMode) PartitioningPolicyOption
func WithPartitioningPolicyPreset ¶
func WithPartitioningPolicyPreset(name string) PartitioningPolicyOption
func WithPartitioningPolicyUniformPartitions ¶
func WithPartitioningPolicyUniformPartitions(n uint64) PartitioningPolicyOption
Deprecated: use WithUniformPartitions instead. Will be removed after Oct 2024. Read about versioning policy: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#deprecated
type PartitioningSettings ¶
type PartitioningSettings struct { PartitioningBySize FeatureFlag PartitionSizeMb uint64 PartitioningByLoad FeatureFlag MinPartitionsCount uint64 MaxPartitionsCount uint64 }
func NewPartitioningSettings ¶
func NewPartitioningSettings(ps *Ydb_Table.PartitioningSettings) PartitioningSettings
type PartitioningSettingsOption ¶
type PartitioningSettingsOption interface {
ApplyPartitioningSettingsOption(settings *ydbPartitioningSettings)
}
func WithMaxPartitionsCount ¶
func WithMaxPartitionsCount(maxPartitionsCount uint64) PartitioningSettingsOption
func WithMinPartitionsCount ¶
func WithMinPartitionsCount(minPartitionsCount uint64) PartitioningSettingsOption
func WithPartitionSizeMb ¶
func WithPartitionSizeMb(partitionSizeMb uint64) PartitioningSettingsOption
func WithPartitioningBy ¶
func WithPartitioningBy(columns []string) PartitioningSettingsOption
func WithPartitioningByLoad ¶
func WithPartitioningByLoad(flag FeatureFlag) PartitioningSettingsOption
func WithPartitioningBySize ¶
func WithPartitioningBySize(flag FeatureFlag) PartitioningSettingsOption
type Partitions ¶
type Partitions interface { CreateTableOption // contains filtered or unexported methods }
func WithExplicitPartitions ¶
func WithExplicitPartitions(splitPoints ...value.Value) Partitions
func WithUniformPartitions ¶
func WithUniformPartitions(n uint64) Partitions
type ProfileOption ¶
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 ¶
func WithQueryCachePolicyKeepInCache ¶
func WithQueryCachePolicyKeepInCache() QueryCachePolicyOption
WithQueryCachePolicyKeepInCache manages keep-in-cache policy
Deprecated: data queries always executes with enabled keep-in-cache policy. Will be removed after Oct 2024. Read about versioning policy: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#deprecated
type ReadReplicasSettings ¶
type ReadReplicasSettings struct { Type ReadReplicasType Count uint64 }
func NewReadReplicasSettings ¶
func NewReadReplicasSettings(rr *Ydb_Table.ReadReplicasSettings) ReadReplicasSettings
func (ReadReplicasSettings) ToYDB ¶
func (rr ReadReplicasSettings) ToYDB() *Ydb_Table.ReadReplicasSettings
type ReadReplicasType ¶
type ReadReplicasType byte
const ( ReadReplicasPerAzReadReplicas ReadReplicasType = iota ReadReplicasAnyAzReadReplicas )
type ReadRowsDesc ¶
type ReadRowsDesc Ydb_Table.ReadRowsRequest
type ReadRowsOption ¶
type ReadRowsOption interface { ApplyReadRowsOption(desc *ReadRowsDesc, a *allocator.Allocator) }
type ReadTableDesc ¶
type ReadTableDesc Ydb_Table.ReadTableRequest
type ReadTableOption ¶
type ReadTableOption interface { ApplyReadTableOption(desc *ReadTableDesc, a *allocator.Allocator) }
func ReadFromSnapshot ¶
func ReadFromSnapshot(b bool) ReadTableOption
func ReadGreater ¶
func ReadGreater(x value.Value) ReadTableOption
func ReadGreaterOrEqual ¶
func ReadGreaterOrEqual(x value.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 value.Value) ReadTableOption
func ReadLessOrEqual ¶
func ReadLessOrEqual(x value.Value) ReadTableOption
func ReadOrdered ¶
func ReadOrdered() ReadTableOption
func ReadRowLimit ¶
func ReadRowLimit(n uint64) ReadTableOption
type RenameTablesDesc ¶
type RenameTablesDesc Ydb_Table.RenameTablesRequest
type RenameTablesOption ¶
type RenameTablesOption func(desc *RenameTablesDesc)
func RenameTablesItem ¶
func RenameTablesItem(src, dst string, replaceDestination bool) RenameTablesOption
type ReplicationPolicyDescription ¶
type ReplicationPolicyOption ¶
type ReplicationPolicyOption func(*replicationPolicy)
func WithReplicationPolicyAllowPromotion ¶
func WithReplicationPolicyAllowPromotion(flag FeatureFlag) ReplicationPolicyOption
func WithReplicationPolicyCreatePerAZ ¶
func WithReplicationPolicyCreatePerAZ(flag FeatureFlag) ReplicationPolicyOption
func WithReplicationPolicyPreset ¶
func WithReplicationPolicyPreset(name string) ReplicationPolicyOption
func WithReplicationPolicyReplicasCount ¶
func WithReplicationPolicyReplicasCount(n uint32) ReplicationPolicyOption
type StoragePolicyDescription ¶
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 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 FeatureFlag }
func NewStorageSettings ¶
func NewStorageSettings(ss *Ydb_Table.StorageSettings) StorageSettings
func (StorageSettings) ToYDB ¶
func (ss StorageSettings) ToYDB() *Ydb_Table.StorageSettings
type StoreType ¶
type StoreType int
type TTLSettings ¶
Deprecated: use TimeToLiveSettings instead. Will be removed after Oct 2024. Read about versioning policy: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#deprecated
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 // Mode specified mode Mode TimeToLiveMode // ExpireAfterSeconds specified expiration in seconds ExpireAfterSeconds uint32 // ColumnUnit valid with Mode = TimeToLiveModeValueSinceUnixEpoch ColumnUnit *TimeToLiveUnit }
func NewTTLSettings ¶
func NewTTLSettings() TimeToLiveSettings
func (TimeToLiveSettings) ColumnDateType ¶
func (ttl TimeToLiveSettings) ColumnDateType(columnName string) TimeToLiveSettings
func (TimeToLiveSettings) ColumnMicroseconds ¶
func (ttl TimeToLiveSettings) ColumnMicroseconds(columnName string) TimeToLiveSettings
func (TimeToLiveSettings) ColumnMilliseconds ¶
func (ttl TimeToLiveSettings) ColumnMilliseconds(columnName string) TimeToLiveSettings
func (TimeToLiveSettings) ColumnNanoseconds ¶
func (ttl TimeToLiveSettings) ColumnNanoseconds(columnName string) TimeToLiveSettings
func (TimeToLiveSettings) ColumnSeconds ¶
func (ttl TimeToLiveSettings) ColumnSeconds(columnName string) TimeToLiveSettings
func (TimeToLiveSettings) ExpireAfter ¶
func (ttl TimeToLiveSettings) ExpireAfter(expireAfter time.Duration) TimeToLiveSettings
func (*TimeToLiveSettings) ToYDB ¶
func (ttl *TimeToLiveSettings) ToYDB() *Ydb_Table.TtlSettings
type TimeToLiveUnit ¶
type TimeToLiveUnit int32
const ( TimeToLiveUnitUnspecified TimeToLiveUnit = iota TimeToLiveUnitSeconds TimeToLiveUnitMilliseconds TimeToLiveUnitMicroseconds TimeToLiveUnitNanoseconds )
func (*TimeToLiveUnit) ToYDB ¶
func (unit *TimeToLiveUnit) ToYDB() Ydb_Table.ValueSinceUnixEpochModeSettings_Unit
Source Files ¶
feature.go models.go options.go
- Version
- v3.105.2
- Published
- Apr 3, 2025
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 1 hour ago –
Tools for package owners.