@ydbjs/api
Version:
TypeScript gRPC service definitions and protobuf types for all YDB APIs. Enables strongly-typed client generation and low-level protocol access.
1,645 lines (1,644 loc) • 114 kB
TypeScript
import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
import type { FeatureFlag_Status, VirtualTimestamp } from "./ydb_common_pb.js";
import type { IssueMessage } from "./ydb_issue_message_pb.js";
import type { Operation, OperationParams } from "./ydb_operation_pb.js";
import type { QueryStats } from "./ydb_query_stats_pb.js";
import type { ResultSet, Type, TypedValue } from "./ydb_value_pb.js";
import type { Entry } from "./ydb_scheme_pb.js";
import type { StatusIds_StatusCode } from "./ydb_status_codes_pb.js";
import type { PartitioningSettings as PartitioningSettings$1 } from "./ydb_topic_pb.js";
import type { ArrowBatchSettings, CsvSettings } from "./ydb_formats_pb.js";
import type { Empty } from "../google/protobuf/empty_pb.js";
import type { Duration } from "../google/protobuf/duration_pb.js";
import type { Timestamp } from "../google/protobuf/timestamp_pb.js";
import type { Message } from "@bufbuild/protobuf";
/**
* Describes the file protos/ydb_table.proto.
*/
export declare const file_protos_ydb_table: GenFile;
/**
* Create new session
*
* @generated from message Ydb.Table.CreateSessionRequest
*/
export type CreateSessionRequest = Message<"Ydb.Table.CreateSessionRequest"> & {
/**
* @generated from field: Ydb.Operations.OperationParams operation_params = 1;
*/
operationParams?: OperationParams;
};
/**
* Describes the message Ydb.Table.CreateSessionRequest.
* Use `create(CreateSessionRequestSchema)` to create a new message.
*/
export declare const CreateSessionRequestSchema: GenMessage<CreateSessionRequest>;
/**
* Create new session
*
* @generated from message Ydb.Table.CreateSessionResponse
*/
export type CreateSessionResponse = Message<"Ydb.Table.CreateSessionResponse"> & {
/**
* Holds CreateSessionResult in case of CreateSessionResult
*
* @generated from field: Ydb.Operations.Operation operation = 1;
*/
operation?: Operation;
};
/**
* Describes the message Ydb.Table.CreateSessionResponse.
* Use `create(CreateSessionResponseSchema)` to create a new message.
*/
export declare const CreateSessionResponseSchema: GenMessage<CreateSessionResponse>;
/**
* @generated from message Ydb.Table.CreateSessionResult
*/
export type CreateSessionResult = Message<"Ydb.Table.CreateSessionResult"> & {
/**
* Session identifier
*
* @generated from field: string session_id = 1;
*/
sessionId: string;
};
/**
* Describes the message Ydb.Table.CreateSessionResult.
* Use `create(CreateSessionResultSchema)` to create a new message.
*/
export declare const CreateSessionResultSchema: GenMessage<CreateSessionResult>;
/**
* Delete session with given id string
*
* @generated from message Ydb.Table.DeleteSessionRequest
*/
export type DeleteSessionRequest = Message<"Ydb.Table.DeleteSessionRequest"> & {
/**
* Session identifier
*
* @generated from field: string session_id = 1;
*/
sessionId: string;
/**
* @generated from field: Ydb.Operations.OperationParams operation_params = 2;
*/
operationParams?: OperationParams;
};
/**
* Describes the message Ydb.Table.DeleteSessionRequest.
* Use `create(DeleteSessionRequestSchema)` to create a new message.
*/
export declare const DeleteSessionRequestSchema: GenMessage<DeleteSessionRequest>;
/**
* @generated from message Ydb.Table.DeleteSessionResponse
*/
export type DeleteSessionResponse = Message<"Ydb.Table.DeleteSessionResponse"> & {
/**
* @generated from field: Ydb.Operations.Operation operation = 1;
*/
operation?: Operation;
};
/**
* Describes the message Ydb.Table.DeleteSessionResponse.
* Use `create(DeleteSessionResponseSchema)` to create a new message.
*/
export declare const DeleteSessionResponseSchema: GenMessage<DeleteSessionResponse>;
/**
* @generated from message Ydb.Table.GlobalIndex
*/
export type GlobalIndex = Message<"Ydb.Table.GlobalIndex"> & {};
/**
* Describes the message Ydb.Table.GlobalIndex.
* Use `create(GlobalIndexSchema)` to create a new message.
*/
export declare const GlobalIndexSchema: GenMessage<GlobalIndex>;
/**
* @generated from message Ydb.Table.GlobalAsyncIndex
*/
export type GlobalAsyncIndex = Message<"Ydb.Table.GlobalAsyncIndex"> & {};
/**
* Describes the message Ydb.Table.GlobalAsyncIndex.
* Use `create(GlobalAsyncIndexSchema)` to create a new message.
*/
export declare const GlobalAsyncIndexSchema: GenMessage<GlobalAsyncIndex>;
/**
* @generated from message Ydb.Table.GlobalUniqueIndex
*/
export type GlobalUniqueIndex = Message<"Ydb.Table.GlobalUniqueIndex"> & {};
/**
* Describes the message Ydb.Table.GlobalUniqueIndex.
* Use `create(GlobalUniqueIndexSchema)` to create a new message.
*/
export declare const GlobalUniqueIndexSchema: GenMessage<GlobalUniqueIndex>;
/**
* Represent secondary index
*
* @generated from message Ydb.Table.TableIndex
*/
export type TableIndex = Message<"Ydb.Table.TableIndex"> & {
/**
* Name of index
*
* @generated from field: string name = 1;
*/
name: string;
/**
* list of columns
*
* @generated from field: repeated string index_columns = 2;
*/
indexColumns: string[];
/**
* Type of index
*
* @generated from oneof Ydb.Table.TableIndex.type
*/
type: {
/**
* @generated from field: Ydb.Table.GlobalIndex global_index = 3;
*/
value: GlobalIndex;
case: "globalIndex";
} | {
/**
* @generated from field: Ydb.Table.GlobalAsyncIndex global_async_index = 4;
*/
value: GlobalAsyncIndex;
case: "globalAsyncIndex";
} | {
/**
* @generated from field: Ydb.Table.GlobalUniqueIndex global_unique_index = 6;
*/
value: GlobalUniqueIndex;
case: "globalUniqueIndex";
} | {
case: undefined;
value?: undefined;
};
/**
* list of columns content to be copied in to index table
*
* @generated from field: repeated string data_columns = 5;
*/
dataColumns: string[];
};
/**
* Describes the message Ydb.Table.TableIndex.
* Use `create(TableIndexSchema)` to create a new message.
*/
export declare const TableIndexSchema: GenMessage<TableIndex>;
/**
* Represent secondary index with index state
*
* @generated from message Ydb.Table.TableIndexDescription
*/
export type TableIndexDescription = Message<"Ydb.Table.TableIndexDescription"> & {
/**
* Name of index
*
* @generated from field: string name = 1;
*/
name: string;
/**
* list of columns
*
* @generated from field: repeated string index_columns = 2;
*/
indexColumns: string[];
/**
* Type of index
*
* @generated from oneof Ydb.Table.TableIndexDescription.type
*/
type: {
/**
* @generated from field: Ydb.Table.GlobalIndex global_index = 3;
*/
value: GlobalIndex;
case: "globalIndex";
} | {
/**
* @generated from field: Ydb.Table.GlobalAsyncIndex global_async_index = 5;
*/
value: GlobalAsyncIndex;
case: "globalAsyncIndex";
} | {
/**
* @generated from field: Ydb.Table.GlobalUniqueIndex global_unique_index = 8;
*/
value: GlobalUniqueIndex;
case: "globalUniqueIndex";
} | {
case: undefined;
value?: undefined;
};
/**
* @generated from field: Ydb.Table.TableIndexDescription.Status status = 4;
*/
status: TableIndexDescription_Status;
/**
* list of columns content to be copied in to index table
*
* @generated from field: repeated string data_columns = 6;
*/
dataColumns: string[];
/**
* Size of index data in bytes
*
* @generated from field: uint64 size_bytes = 7;
*/
sizeBytes: bigint;
};
/**
* Describes the message Ydb.Table.TableIndexDescription.
* Use `create(TableIndexDescriptionSchema)` to create a new message.
*/
export declare const TableIndexDescriptionSchema: GenMessage<TableIndexDescription>;
/**
* @generated from enum Ydb.Table.TableIndexDescription.Status
*/
export declare enum TableIndexDescription_Status {
/**
* @generated from enum value: STATUS_UNSPECIFIED = 0;
*/
UNSPECIFIED = 0,
/**
* Index is ready to use
*
* @generated from enum value: STATUS_READY = 1;
*/
READY = 1,
/**
* index is being built
*
* @generated from enum value: STATUS_BUILDING = 2;
*/
BUILDING = 2
}
/**
* Describes the enum Ydb.Table.TableIndexDescription.Status.
*/
export declare const TableIndexDescription_StatusSchema: GenEnum<TableIndexDescription_Status>;
/**
* State of index building operation
*
* @generated from message Ydb.Table.IndexBuildState
*/
export type IndexBuildState = Message<"Ydb.Table.IndexBuildState"> & {};
/**
* Describes the message Ydb.Table.IndexBuildState.
* Use `create(IndexBuildStateSchema)` to create a new message.
*/
export declare const IndexBuildStateSchema: GenMessage<IndexBuildState>;
/**
* @generated from enum Ydb.Table.IndexBuildState.State
*/
export declare enum IndexBuildState_State {
/**
* @generated from enum value: STATE_UNSPECIFIED = 0;
*/
UNSPECIFIED = 0,
/**
* @generated from enum value: STATE_PREPARING = 1;
*/
PREPARING = 1,
/**
* @generated from enum value: STATE_TRANSFERING_DATA = 2;
*/
TRANSFERING_DATA = 2,
/**
* @generated from enum value: STATE_APPLYING = 3;
*/
APPLYING = 3,
/**
* @generated from enum value: STATE_DONE = 4;
*/
DONE = 4,
/**
* @generated from enum value: STATE_CANCELLATION = 5;
*/
CANCELLATION = 5,
/**
* @generated from enum value: STATE_CANCELLED = 6;
*/
CANCELLED = 6,
/**
* @generated from enum value: STATE_REJECTION = 7;
*/
REJECTION = 7,
/**
* @generated from enum value: STATE_REJECTED = 8;
*/
REJECTED = 8
}
/**
* Describes the enum Ydb.Table.IndexBuildState.State.
*/
export declare const IndexBuildState_StateSchema: GenEnum<IndexBuildState_State>;
/**
* Description of index building operation
*
* @generated from message Ydb.Table.IndexBuildDescription
*/
export type IndexBuildDescription = Message<"Ydb.Table.IndexBuildDescription"> & {
/**
* @generated from field: string path = 1;
*/
path: string;
/**
* @generated from field: Ydb.Table.TableIndex index = 2;
*/
index?: TableIndex;
};
/**
* Describes the message Ydb.Table.IndexBuildDescription.
* Use `create(IndexBuildDescriptionSchema)` to create a new message.
*/
export declare const IndexBuildDescriptionSchema: GenMessage<IndexBuildDescription>;
/**
* @generated from message Ydb.Table.IndexBuildMetadata
*/
export type IndexBuildMetadata = Message<"Ydb.Table.IndexBuildMetadata"> & {
/**
* @generated from field: Ydb.Table.IndexBuildDescription description = 1;
*/
description?: IndexBuildDescription;
/**
* @generated from field: Ydb.Table.IndexBuildState.State state = 2;
*/
state: IndexBuildState_State;
/**
* @generated from field: float progress = 3;
*/
progress: number;
};
/**
* Describes the message Ydb.Table.IndexBuildMetadata.
* Use `create(IndexBuildMetadataSchema)` to create a new message.
*/
export declare const IndexBuildMetadataSchema: GenMessage<IndexBuildMetadata>;
/**
* @generated from message Ydb.Table.ChangefeedMode
*/
export type ChangefeedMode = Message<"Ydb.Table.ChangefeedMode"> & {};
/**
* Describes the message Ydb.Table.ChangefeedMode.
* Use `create(ChangefeedModeSchema)` to create a new message.
*/
export declare const ChangefeedModeSchema: GenMessage<ChangefeedMode>;
/**
* @generated from enum Ydb.Table.ChangefeedMode.Mode
*/
export declare enum ChangefeedMode_Mode {
/**
* @generated from enum value: MODE_UNSPECIFIED = 0;
*/
UNSPECIFIED = 0,
/**
* Only the key component of the modified row
*
* @generated from enum value: MODE_KEYS_ONLY = 1;
*/
KEYS_ONLY = 1,
/**
* Updated columns
*
* @generated from enum value: MODE_UPDATES = 2;
*/
UPDATES = 2,
/**
* The entire row, as it appears after it was modified
*
* @generated from enum value: MODE_NEW_IMAGE = 3;
*/
NEW_IMAGE = 3,
/**
* The entire row, as it appeared before it was modified
*
* @generated from enum value: MODE_OLD_IMAGE = 4;
*/
OLD_IMAGE = 4,
/**
* Both new and old images of the row
*
* @generated from enum value: MODE_NEW_AND_OLD_IMAGES = 5;
*/
NEW_AND_OLD_IMAGES = 5
}
/**
* Describes the enum Ydb.Table.ChangefeedMode.Mode.
*/
export declare const ChangefeedMode_ModeSchema: GenEnum<ChangefeedMode_Mode>;
/**
* @generated from message Ydb.Table.ChangefeedFormat
*/
export type ChangefeedFormat = Message<"Ydb.Table.ChangefeedFormat"> & {};
/**
* Describes the message Ydb.Table.ChangefeedFormat.
* Use `create(ChangefeedFormatSchema)` to create a new message.
*/
export declare const ChangefeedFormatSchema: GenMessage<ChangefeedFormat>;
/**
* @generated from enum Ydb.Table.ChangefeedFormat.Format
*/
export declare enum ChangefeedFormat_Format {
/**
* @generated from enum value: FORMAT_UNSPECIFIED = 0;
*/
UNSPECIFIED = 0,
/**
* Change record in JSON format for common (row oriented) tables
*
* @generated from enum value: FORMAT_JSON = 1;
*/
JSON = 1,
/**
* Change record in JSON format for document (DynamoDB-compatible) tables
*
* @generated from enum value: FORMAT_DYNAMODB_STREAMS_JSON = 2;
*/
DYNAMODB_STREAMS_JSON = 2,
/**
* Debezium-like change record JSON format for common (row oriented) tables
*
* @generated from enum value: FORMAT_DEBEZIUM_JSON = 3;
*/
DEBEZIUM_JSON = 3
}
/**
* Describes the enum Ydb.Table.ChangefeedFormat.Format.
*/
export declare const ChangefeedFormat_FormatSchema: GenEnum<ChangefeedFormat_Format>;
/**
* @generated from message Ydb.Table.Changefeed
*/
export type Changefeed = Message<"Ydb.Table.Changefeed"> & {
/**
* Name of the feed
*
* @generated from field: string name = 1;
*/
name: string;
/**
* Mode specifies the information that will be written to the feed
*
* @generated from field: Ydb.Table.ChangefeedMode.Mode mode = 2;
*/
mode: ChangefeedMode_Mode;
/**
* Format of the data
*
* @generated from field: Ydb.Table.ChangefeedFormat.Format format = 3;
*/
format: ChangefeedFormat_Format;
/**
* How long data in changefeed's underlying topic should be stored
*
* @generated from field: google.protobuf.Duration retention_period = 4;
*/
retentionPeriod?: Duration;
/**
* Emit virtual timestamps of changes along with data or not
*
* @generated from field: bool virtual_timestamps = 5;
*/
virtualTimestamps: boolean;
/**
* Initial scan will output the current state of the table first
*
* @generated from field: bool initial_scan = 6;
*/
initialScan: boolean;
/**
* Attributes. Total size is limited to 10 KB.
*
* @generated from field: map<string, string> attributes = 7;
*/
attributes: {
[key: string]: string;
};
/**
* Value that will be emitted in the `awsRegion` field of the record in DYNAMODB_STREAMS_JSON format
*
* @generated from field: string aws_region = 8;
*/
awsRegion: string;
/**
* Periodically emit resolved timestamps. If unspecified, resolved timestamps are not emitted.
*
* @generated from field: google.protobuf.Duration resolved_timestamps_interval = 9;
*/
resolvedTimestampsInterval?: Duration;
/**
* Partitioning settings of underlying topic.
*
* @generated from field: Ydb.Topic.PartitioningSettings topic_partitioning_settings = 10;
*/
topicPartitioningSettings?: PartitioningSettings$1;
};
/**
* Describes the message Ydb.Table.Changefeed.
* Use `create(ChangefeedSchema)` to create a new message.
*/
export declare const ChangefeedSchema: GenMessage<Changefeed>;
/**
* @generated from message Ydb.Table.ChangefeedDescription
*/
export type ChangefeedDescription = Message<"Ydb.Table.ChangefeedDescription"> & {
/**
* Name of the feed
*
* @generated from field: string name = 1;
*/
name: string;
/**
* Mode specifies the information that will be written to the feed
*
* @generated from field: Ydb.Table.ChangefeedMode.Mode mode = 2;
*/
mode: ChangefeedMode_Mode;
/**
* Format of the data
*
* @generated from field: Ydb.Table.ChangefeedFormat.Format format = 3;
*/
format: ChangefeedFormat_Format;
/**
* State of the feed
*
* @generated from field: Ydb.Table.ChangefeedDescription.State state = 4;
*/
state: ChangefeedDescription_State;
/**
* State of emitting of virtual timestamps along with data
*
* @generated from field: bool virtual_timestamps = 5;
*/
virtualTimestamps: boolean;
/**
* Attributes
*
* @generated from field: map<string, string> attributes = 6;
*/
attributes: {
[key: string]: string;
};
/**
* Value that will be emitted in the `awsRegion` field of the record in DYNAMODB_STREAMS_JSON format
*
* @generated from field: string aws_region = 7;
*/
awsRegion: string;
/**
* Interval of emitting of resolved timestamps. If unspecified, resolved timestamps are not emitted.
*
* @generated from field: google.protobuf.Duration resolved_timestamps_interval = 8;
*/
resolvedTimestampsInterval?: Duration;
};
/**
* Describes the message Ydb.Table.ChangefeedDescription.
* Use `create(ChangefeedDescriptionSchema)` to create a new message.
*/
export declare const ChangefeedDescriptionSchema: GenMessage<ChangefeedDescription>;
/**
* @generated from enum Ydb.Table.ChangefeedDescription.State
*/
export declare enum ChangefeedDescription_State {
/**
* @generated from enum value: STATE_UNSPECIFIED = 0;
*/
UNSPECIFIED = 0,
/**
* Normal state, from this state changefeed can be disabled
*
* @generated from enum value: STATE_ENABLED = 1;
*/
ENABLED = 1,
/**
* No new change records are generated, but the old ones remain available
* From this state changefeed cannot be switched to any other state
*
* @generated from enum value: STATE_DISABLED = 2;
*/
DISABLED = 2,
/**
* An initial scan is being performed.
* After its completion changefeed will switch to the normal state
*
* @generated from enum value: STATE_INITIAL_SCAN = 3;
*/
INITIAL_SCAN = 3
}
/**
* Describes the enum Ydb.Table.ChangefeedDescription.State.
*/
export declare const ChangefeedDescription_StateSchema: GenEnum<ChangefeedDescription_State>;
/**
* @generated from message Ydb.Table.StoragePool
*/
export type StoragePool = Message<"Ydb.Table.StoragePool"> & {
/**
* @generated from field: string media = 1;
*/
media: string;
};
/**
* Describes the message Ydb.Table.StoragePool.
* Use `create(StoragePoolSchema)` to create a new message.
*/
export declare const StoragePoolSchema: GenMessage<StoragePool>;
/**
* @generated from message Ydb.Table.StoragePolicy
*/
export type StoragePolicy = Message<"Ydb.Table.StoragePolicy"> & {
/**
* @generated from field: string preset_name = 1;
*/
presetName: string;
/**
* @generated from field: Ydb.Table.StoragePool syslog = 2;
*/
syslog?: StoragePool;
/**
* @generated from field: Ydb.Table.StoragePool log = 3;
*/
log?: StoragePool;
/**
* @generated from field: Ydb.Table.StoragePool data = 4;
*/
data?: StoragePool;
/**
* @generated from field: Ydb.Table.StoragePool external = 5;
*/
external?: StoragePool;
/**
* @generated from field: Ydb.FeatureFlag.Status keep_in_memory = 6;
*/
keepInMemory: FeatureFlag_Status;
/**
* @generated from field: repeated Ydb.Table.ColumnFamilyPolicy column_families = 7;
*/
columnFamilies: ColumnFamilyPolicy[];
};
/**
* Describes the message Ydb.Table.StoragePolicy.
* Use `create(StoragePolicySchema)` to create a new message.
*/
export declare const StoragePolicySchema: GenMessage<StoragePolicy>;
/**
* @generated from message Ydb.Table.ColumnFamilyPolicy
*/
export type ColumnFamilyPolicy = Message<"Ydb.Table.ColumnFamilyPolicy"> & {
/**
* Name of the column family, the name "default" must be used for the
* primary column family that contains as least primary key columns
*
* @generated from field: string name = 1;
*/
name: string;
/**
* Storage settings for the column group (default to values in storage policy)
*
* @generated from field: Ydb.Table.StoragePool data = 2;
*/
data?: StoragePool;
/**
* @generated from field: Ydb.Table.StoragePool external = 3;
*/
external?: StoragePool;
/**
* When enabled table data will be kept in memory
* WARNING: DO NOT USE
*
* @generated from field: Ydb.FeatureFlag.Status keep_in_memory = 4;
*/
keepInMemory: FeatureFlag_Status;
/**
* Optionally specify whether data should be compressed
*
* @generated from field: Ydb.Table.ColumnFamilyPolicy.Compression compression = 5;
*/
compression: ColumnFamilyPolicy_Compression;
};
/**
* Describes the message Ydb.Table.ColumnFamilyPolicy.
* Use `create(ColumnFamilyPolicySchema)` to create a new message.
*/
export declare const ColumnFamilyPolicySchema: GenMessage<ColumnFamilyPolicy>;
/**
* @generated from enum Ydb.Table.ColumnFamilyPolicy.Compression
*/
export declare enum ColumnFamilyPolicy_Compression {
/**
* @generated from enum value: COMPRESSION_UNSPECIFIED = 0;
*/
COMPRESSION_UNSPECIFIED = 0,
/**
* @generated from enum value: UNCOMPRESSED = 1;
*/
UNCOMPRESSED = 1,
/**
* @generated from enum value: COMPRESSED = 2;
*/
COMPRESSED = 2
}
/**
* Describes the enum Ydb.Table.ColumnFamilyPolicy.Compression.
*/
export declare const ColumnFamilyPolicy_CompressionSchema: GenEnum<ColumnFamilyPolicy_Compression>;
/**
* @generated from message Ydb.Table.CompactionPolicy
*/
export type CompactionPolicy = Message<"Ydb.Table.CompactionPolicy"> & {
/**
* @generated from field: string preset_name = 1;
*/
presetName: string;
};
/**
* Describes the message Ydb.Table.CompactionPolicy.
* Use `create(CompactionPolicySchema)` to create a new message.
*/
export declare const CompactionPolicySchema: GenMessage<CompactionPolicy>;
/**
* @generated from message Ydb.Table.ExplicitPartitions
*/
export type ExplicitPartitions = Message<"Ydb.Table.ExplicitPartitions"> & {
/**
* Specify key values used to split table into partitions.
* Each value becomes the first key of a new partition.
* Key values should go in ascending order.
* Total number of created partitions is number of specified
* keys + 1.
*
* @generated from field: repeated Ydb.TypedValue split_points = 1;
*/
splitPoints: TypedValue[];
};
/**
* Describes the message Ydb.Table.ExplicitPartitions.
* Use `create(ExplicitPartitionsSchema)` to create a new message.
*/
export declare const ExplicitPartitionsSchema: GenMessage<ExplicitPartitions>;
/**
* @generated from message Ydb.Table.PartitionStats
*/
export type PartitionStats = Message<"Ydb.Table.PartitionStats"> & {
/**
* Approximate number of rows in shard
*
* @generated from field: uint64 rows_estimate = 1;
*/
rowsEstimate: bigint;
/**
* Approximate size of shard (bytes)
*
* @generated from field: uint64 store_size = 2;
*/
storeSize: bigint;
/**
* id of node that serve shard key range
*
* @generated from field: uint32 leader_node_id = 3;
*/
leaderNodeId: number;
};
/**
* Describes the message Ydb.Table.PartitionStats.
* Use `create(PartitionStatsSchema)` to create a new message.
*/
export declare const PartitionStatsSchema: GenMessage<PartitionStats>;
/**
* @generated from message Ydb.Table.TableStats
*/
export type TableStats = Message<"Ydb.Table.TableStats"> & {
/**
* Stats for each partition
*
* @generated from field: repeated Ydb.Table.PartitionStats partition_stats = 1;
*/
partitionStats: PartitionStats[];
/**
* Approximate number of rows in table
*
* @generated from field: uint64 rows_estimate = 2;
*/
rowsEstimate: bigint;
/**
* Approximate size of table (bytes)
*
* @generated from field: uint64 store_size = 3;
*/
storeSize: bigint;
/**
* Number of partitions in table
*
* @generated from field: uint64 partitions = 4;
*/
partitions: bigint;
/**
* Timestamp of table creation
*
* @generated from field: google.protobuf.Timestamp creation_time = 5;
*/
creationTime?: Timestamp;
/**
* Timestamp of last modification
*
* @generated from field: google.protobuf.Timestamp modification_time = 6;
*/
modificationTime?: Timestamp;
};
/**
* Describes the message Ydb.Table.TableStats.
* Use `create(TableStatsSchema)` to create a new message.
*/
export declare const TableStatsSchema: GenMessage<TableStats>;
/**
* @generated from message Ydb.Table.PartitioningPolicy
*/
export type PartitioningPolicy = Message<"Ydb.Table.PartitioningPolicy"> & {
/**
* @generated from field: string preset_name = 1;
*/
presetName: string;
/**
* @generated from field: Ydb.Table.PartitioningPolicy.AutoPartitioningPolicy auto_partitioning = 2;
*/
autoPartitioning: PartitioningPolicy_AutoPartitioningPolicy;
/**
* @generated from oneof Ydb.Table.PartitioningPolicy.partitions
*/
partitions: {
/**
* Allows to enable uniform sharding using given shards number.
* The first components of primary key must have Uint32/Uint64 type.
*
* @generated from field: uint64 uniform_partitions = 3;
*/
value: bigint;
case: "uniformPartitions";
} | {
/**
* Explicitly specify key values which are used as borders for
* created partitions.
*
* @generated from field: Ydb.Table.ExplicitPartitions explicit_partitions = 4;
*/
value: ExplicitPartitions;
case: "explicitPartitions";
} | {
case: undefined;
value?: undefined;
};
};
/**
* Describes the message Ydb.Table.PartitioningPolicy.
* Use `create(PartitioningPolicySchema)` to create a new message.
*/
export declare const PartitioningPolicySchema: GenMessage<PartitioningPolicy>;
/**
* @generated from enum Ydb.Table.PartitioningPolicy.AutoPartitioningPolicy
*/
export declare enum PartitioningPolicy_AutoPartitioningPolicy {
/**
* @generated from enum value: AUTO_PARTITIONING_POLICY_UNSPECIFIED = 0;
*/
AUTO_PARTITIONING_POLICY_UNSPECIFIED = 0,
/**
* @generated from enum value: DISABLED = 1;
*/
DISABLED = 1,
/**
* @generated from enum value: AUTO_SPLIT = 2;
*/
AUTO_SPLIT = 2,
/**
* @generated from enum value: AUTO_SPLIT_MERGE = 3;
*/
AUTO_SPLIT_MERGE = 3
}
/**
* Describes the enum Ydb.Table.PartitioningPolicy.AutoPartitioningPolicy.
*/
export declare const PartitioningPolicy_AutoPartitioningPolicySchema: GenEnum<PartitioningPolicy_AutoPartitioningPolicy>;
/**
* @generated from message Ydb.Table.ExecutionPolicy
*/
export type ExecutionPolicy = Message<"Ydb.Table.ExecutionPolicy"> & {
/**
* @generated from field: string preset_name = 1;
*/
presetName: string;
};
/**
* Describes the message Ydb.Table.ExecutionPolicy.
* Use `create(ExecutionPolicySchema)` to create a new message.
*/
export declare const ExecutionPolicySchema: GenMessage<ExecutionPolicy>;
/**
* @generated from message Ydb.Table.ReplicationPolicy
*/
export type ReplicationPolicy = Message<"Ydb.Table.ReplicationPolicy"> & {
/**
* @generated from field: string preset_name = 1;
*/
presetName: string;
/**
* If value is non-zero then it specifies a number of read-only
* replicas to create for a table. Zero value means preset
* setting usage.
*
* @generated from field: uint32 replicas_count = 2;
*/
replicasCount: number;
/**
* If this feature in enabled then requested number of replicas
* will be created in each availability zone.
*
* @generated from field: Ydb.FeatureFlag.Status create_per_availability_zone = 3;
*/
createPerAvailabilityZone: FeatureFlag_Status;
/**
* If this feature in enabled then read-only replicas can be promoted
* to leader.
*
* @generated from field: Ydb.FeatureFlag.Status allow_promotion = 4;
*/
allowPromotion: FeatureFlag_Status;
};
/**
* Describes the message Ydb.Table.ReplicationPolicy.
* Use `create(ReplicationPolicySchema)` to create a new message.
*/
export declare const ReplicationPolicySchema: GenMessage<ReplicationPolicy>;
/**
* @generated from message Ydb.Table.CachingPolicy
*/
export type CachingPolicy = Message<"Ydb.Table.CachingPolicy"> & {
/**
* @generated from field: string preset_name = 1;
*/
presetName: string;
};
/**
* Describes the message Ydb.Table.CachingPolicy.
* Use `create(CachingPolicySchema)` to create a new message.
*/
export declare const CachingPolicySchema: GenMessage<CachingPolicy>;
/**
* @generated from message Ydb.Table.TableProfile
*/
export type TableProfile = Message<"Ydb.Table.TableProfile"> & {
/**
* @generated from field: string preset_name = 1;
*/
presetName: string;
/**
* @generated from field: Ydb.Table.StoragePolicy storage_policy = 2;
*/
storagePolicy?: StoragePolicy;
/**
* @generated from field: Ydb.Table.CompactionPolicy compaction_policy = 3;
*/
compactionPolicy?: CompactionPolicy;
/**
* @generated from field: Ydb.Table.PartitioningPolicy partitioning_policy = 4;
*/
partitioningPolicy?: PartitioningPolicy;
/**
* @generated from field: Ydb.Table.ExecutionPolicy execution_policy = 5;
*/
executionPolicy?: ExecutionPolicy;
/**
* @generated from field: Ydb.Table.ReplicationPolicy replication_policy = 6;
*/
replicationPolicy?: ReplicationPolicy;
/**
* @generated from field: Ydb.Table.CachingPolicy caching_policy = 7;
*/
cachingPolicy?: CachingPolicy;
};
/**
* Describes the message Ydb.Table.TableProfile.
* Use `create(TableProfileSchema)` to create a new message.
*/
export declare const TableProfileSchema: GenMessage<TableProfile>;
/**
* @generated from message Ydb.Table.SequenceDescription
*/
export type SequenceDescription = Message<"Ydb.Table.SequenceDescription"> & {
/**
* mandatorys
*
* @generated from field: optional string name = 1;
*/
name?: string;
/**
* minimum value, defaults to 1 or Min<i64>
*
* @generated from field: optional sint64 min_value = 2;
*/
minValue?: bigint;
/**
* maximum value, defaults to Max<i64> or -1
*
* @generated from field: optional sint64 max_value = 3;
*/
maxValue?: bigint;
/**
* start value, defaults to min_value
*
* @generated from field: optional sint64 start_value = 4;
*/
startValue?: bigint;
/**
* number of items to cache, defaults to 1
*
* @generated from field: optional uint64 cache = 5;
*/
cache?: bigint;
/**
* increment at each call, defaults to 1
*
* @generated from field: optional sint64 increment = 6;
*/
increment?: bigint;
/**
* true when cycle on overflow is allowed
*
* @generated from field: optional bool cycle = 7;
*/
cycle?: boolean;
/**
* set_val(next_value, next_used) is executed atomically when creating
*
* @generated from field: optional Ydb.Table.SequenceDescription.SetVal set_val = 8;
*/
setVal?: SequenceDescription_SetVal;
};
/**
* Describes the message Ydb.Table.SequenceDescription.
* Use `create(SequenceDescriptionSchema)` to create a new message.
*/
export declare const SequenceDescriptionSchema: GenMessage<SequenceDescription>;
/**
* @generated from message Ydb.Table.SequenceDescription.SetVal
*/
export type SequenceDescription_SetVal = Message<"Ydb.Table.SequenceDescription.SetVal"> & {
/**
* @generated from field: optional sint64 next_value = 1;
*/
nextValue?: bigint;
/**
* @generated from field: optional bool next_used = 2;
*/
nextUsed?: boolean;
};
/**
* Describes the message Ydb.Table.SequenceDescription.SetVal.
* Use `create(SequenceDescription_SetValSchema)` to create a new message.
*/
export declare const SequenceDescription_SetValSchema: GenMessage<SequenceDescription_SetVal>;
/**
* @generated from message Ydb.Table.ColumnMeta
*/
export type ColumnMeta = Message<"Ydb.Table.ColumnMeta"> & {
/**
* Name of column
*
* @generated from field: string name = 1;
*/
name: string;
/**
* Type of column
*
* @generated from field: Ydb.Type type = 2;
*/
type?: Type;
/**
* Column family name of the column
*
* @generated from field: string family = 3;
*/
family: string;
/**
* Column nullability
*
* @generated from field: optional bool not_null = 4;
*/
notNull?: boolean;
/**
* Column default value option
*
* @generated from oneof Ydb.Table.ColumnMeta.default_value
*/
defaultValue: {
/**
* @generated from field: Ydb.TypedValue from_literal = 5;
*/
value: TypedValue;
case: "fromLiteral";
} | {
/**
* @generated from field: Ydb.Table.SequenceDescription from_sequence = 6;
*/
value: SequenceDescription;
case: "fromSequence";
} | {
case: undefined;
value?: undefined;
};
};
/**
* Describes the message Ydb.Table.ColumnMeta.
* Use `create(ColumnMetaSchema)` to create a new message.
*/
export declare const ColumnMetaSchema: GenMessage<ColumnMeta>;
/**
* The row will be considered as expired at the moment of time, when the value
* stored in <column_name> is less than or equal to the current time (in epoch
* time format), and <expire_after_seconds> has passed since that moment;
* i.e. the expiration threshold is the value of <column_name> plus <expire_after_seconds>.
*
* @generated from message Ydb.Table.DateTypeColumnModeSettings
*/
export type DateTypeColumnModeSettings = Message<"Ydb.Table.DateTypeColumnModeSettings"> & {
/**
* The column type must be a date type
*
* @generated from field: string column_name = 1;
*/
columnName: string;
/**
* @generated from field: uint32 expire_after_seconds = 2;
*/
expireAfterSeconds: number;
};
/**
* Describes the message Ydb.Table.DateTypeColumnModeSettings.
* Use `create(DateTypeColumnModeSettingsSchema)` to create a new message.
*/
export declare const DateTypeColumnModeSettingsSchema: GenMessage<DateTypeColumnModeSettings>;
/**
* Same as DateTypeColumnModeSettings (above), but useful when type of the
* value stored in <column_name> is not a date type.
*
* @generated from message Ydb.Table.ValueSinceUnixEpochModeSettings
*/
export type ValueSinceUnixEpochModeSettings = Message<"Ydb.Table.ValueSinceUnixEpochModeSettings"> & {
/**
* The column type must be one of:
* - Uint32
* - Uint64
* - DyNumber
*
* @generated from field: string column_name = 1;
*/
columnName: string;
/**
* Interpretation of the value stored in <column_name>
*
* @generated from field: Ydb.Table.ValueSinceUnixEpochModeSettings.Unit column_unit = 2;
*/
columnUnit: ValueSinceUnixEpochModeSettings_Unit;
/**
* This option is always interpreted as seconds regardless of the
* <column_unit> value.
*
* @generated from field: uint32 expire_after_seconds = 3;
*/
expireAfterSeconds: number;
};
/**
* Describes the message Ydb.Table.ValueSinceUnixEpochModeSettings.
* Use `create(ValueSinceUnixEpochModeSettingsSchema)` to create a new message.
*/
export declare const ValueSinceUnixEpochModeSettingsSchema: GenMessage<ValueSinceUnixEpochModeSettings>;
/**
* @generated from enum Ydb.Table.ValueSinceUnixEpochModeSettings.Unit
*/
export declare enum ValueSinceUnixEpochModeSettings_Unit {
/**
* @generated from enum value: UNIT_UNSPECIFIED = 0;
*/
UNSPECIFIED = 0,
/**
* @generated from enum value: UNIT_SECONDS = 1;
*/
SECONDS = 1,
/**
* @generated from enum value: UNIT_MILLISECONDS = 2;
*/
MILLISECONDS = 2,
/**
* @generated from enum value: UNIT_MICROSECONDS = 3;
*/
MICROSECONDS = 3,
/**
* @generated from enum value: UNIT_NANOSECONDS = 4;
*/
NANOSECONDS = 4
}
/**
* Describes the enum Ydb.Table.ValueSinceUnixEpochModeSettings.Unit.
*/
export declare const ValueSinceUnixEpochModeSettings_UnitSchema: GenEnum<ValueSinceUnixEpochModeSettings_Unit>;
/**
* @generated from message Ydb.Table.TtlSettings
*/
export type TtlSettings = Message<"Ydb.Table.TtlSettings"> & {
/**
* @generated from oneof Ydb.Table.TtlSettings.mode
*/
mode: {
/**
* @generated from field: Ydb.Table.DateTypeColumnModeSettings date_type_column = 1;
*/
value: DateTypeColumnModeSettings;
case: "dateTypeColumn";
} | {
/**
* @generated from field: Ydb.Table.ValueSinceUnixEpochModeSettings value_since_unix_epoch = 2;
*/
value: ValueSinceUnixEpochModeSettings;
case: "valueSinceUnixEpoch";
} | {
case: undefined;
value?: undefined;
};
/**
* How often to run BRO on the same partition.
* BRO will not be started more often, but may be started less often.
*
* @generated from field: uint32 run_interval_seconds = 3;
*/
runIntervalSeconds: number;
};
/**
* Describes the message Ydb.Table.TtlSettings.
* Use `create(TtlSettingsSchema)` to create a new message.
*/
export declare const TtlSettingsSchema: GenMessage<TtlSettings>;
/**
* @generated from message Ydb.Table.StorageSettings
*/
export type StorageSettings = Message<"Ydb.Table.StorageSettings"> & {
/**
* This specifies internal channel 0 commit log storage pool
* Fastest available storage recommended, negligible amounts of short-lived data
*
* @generated from field: Ydb.Table.StoragePool tablet_commit_log0 = 1;
*/
tabletCommitLog0?: StoragePool;
/**
* This specifies internal channel 1 commit log storage pool
* Fastest available storage recommended, small amounts of short-lived data
*
* @generated from field: Ydb.Table.StoragePool tablet_commit_log1 = 2;
*/
tabletCommitLog1?: StoragePool;
/**
* This specifies external blobs storage pool
*
* @generated from field: Ydb.Table.StoragePool external = 4;
*/
external?: StoragePool;
/**
* Optionally store large values in "external blobs"
* WARNING: DO NOT USE
* This feature is experimental and should not be used, restrictions apply:
* * Table cannot split/merge when this is enabled
* * Table cannot be copied or backed up when this is enabled
* * This feature cannot be disabled once enabled for a table
*
* @generated from field: Ydb.FeatureFlag.Status store_external_blobs = 5;
*/
storeExternalBlobs: FeatureFlag_Status;
};
/**
* Describes the message Ydb.Table.StorageSettings.
* Use `create(StorageSettingsSchema)` to create a new message.
*/
export declare const StorageSettingsSchema: GenMessage<StorageSettings>;
/**
* @generated from message Ydb.Table.ColumnFamily
*/
export type ColumnFamily = Message<"Ydb.Table.ColumnFamily"> & {
/**
* Name of the column family, the name "default" must be used for the
* primary column family that contains at least primary key columns
*
* @generated from field: string name = 1;
*/
name: string;
/**
* This specifies data storage settings for column family
*
* @generated from field: Ydb.Table.StoragePool data = 2;
*/
data?: StoragePool;
/**
* Optionally specify how data should be compressed
*
* @generated from field: Ydb.Table.ColumnFamily.Compression compression = 3;
*/
compression: ColumnFamily_Compression;
/**
* When enabled table data will be kept in memory
* WARNING: DO NOT USE
*
* @generated from field: Ydb.FeatureFlag.Status keep_in_memory = 4;
*/
keepInMemory: FeatureFlag_Status;
};
/**
* Describes the message Ydb.Table.ColumnFamily.
* Use `create(ColumnFamilySchema)` to create a new message.
*/
export declare const ColumnFamilySchema: GenMessage<ColumnFamily>;
/**
* @generated from enum Ydb.Table.ColumnFamily.Compression
*/
export declare enum ColumnFamily_Compression {
/**
* @generated from enum value: COMPRESSION_UNSPECIFIED = 0;
*/
UNSPECIFIED = 0,
/**
* @generated from enum value: COMPRESSION_NONE = 1;
*/
NONE = 1,
/**
* @generated from enum value: COMPRESSION_LZ4 = 2;
*/
LZ4 = 2
}
/**
* Describes the enum Ydb.Table.ColumnFamily.Compression.
*/
export declare const ColumnFamily_CompressionSchema: GenEnum<ColumnFamily_Compression>;
/**
* @generated from message Ydb.Table.PartitioningSettings
*/
export type PartitioningSettings = Message<"Ydb.Table.PartitioningSettings"> & {
/**
* List of columns to partition by
*
* @generated from field: repeated string partition_by = 1;
*/
partitionBy: string[];
/**
* Enable auto partitioning on reaching upper or lower partition size bound
*
* @generated from field: Ydb.FeatureFlag.Status partitioning_by_size = 2;
*/
partitioningBySize: FeatureFlag_Status;
/**
* Preferred partition size for auto partitioning by size, Mb
*
* @generated from field: uint64 partition_size_mb = 3;
*/
partitionSizeMb: bigint;
/**
* Enable auto partitioning based on load on each partition
*
* @generated from field: Ydb.FeatureFlag.Status partitioning_by_load = 4;
*/
partitioningByLoad: FeatureFlag_Status;
/**
* Minimum partitions count auto merge would stop working at
*
* @generated from field: uint64 min_partitions_count = 6;
*/
minPartitionsCount: bigint;
/**
* Maximum partitions count auto split would stop working at
*
* @generated from field: uint64 max_partitions_count = 7;
*/
maxPartitionsCount: bigint;
};
/**
* Describes the message Ydb.Table.PartitioningSettings.
* Use `create(PartitioningSettingsSchema)` to create a new message.
*/
export declare const PartitioningSettingsSchema: GenMessage<PartitioningSettings>;
/**
* @generated from message Ydb.Table.AzReadReplicasSettings
*/
export type AzReadReplicasSettings = Message<"Ydb.Table.AzReadReplicasSettings"> & {
/**
* AZ name
*
* @generated from field: string name = 1;
*/
name: string;
/**
* Read replicas count in this AZ
*
* @generated from field: uint64 read_replicas_count = 2;
*/
readReplicasCount: bigint;
};
/**
* Describes the message Ydb.Table.AzReadReplicasSettings.
* Use `create(AzReadReplicasSettingsSchema)` to create a new message.
*/
export declare const AzReadReplicasSettingsSchema: GenMessage<AzReadReplicasSettings>;
/**
* @generated from message Ydb.Table.ClusterReplicasSettings
*/
export type ClusterReplicasSettings = Message<"Ydb.Table.ClusterReplicasSettings"> & {
/**
* List of read replicas settings for each AZ
*
* @generated from field: repeated Ydb.Table.AzReadReplicasSettings az_read_replicas_settings = 2;
*/
azReadReplicasSettings: AzReadReplicasSettings[];
};
/**
* Describes the message Ydb.Table.ClusterReplicasSettings.
* Use `create(ClusterReplicasSettingsSchema)` to create a new message.
*/
export declare const ClusterReplicasSettingsSchema: GenMessage<ClusterReplicasSettings>;
/**
* @generated from message Ydb.Table.ReadReplicasSettings
*/
export type ReadReplicasSettings = Message<"Ydb.Table.ReadReplicasSettings"> & {
/**
* @generated from oneof Ydb.Table.ReadReplicasSettings.settings
*/
settings: {
/**
* Set equal read replicas count for every AZ
*
* @generated from field: uint64 per_az_read_replicas_count = 1;
*/
value: bigint;
case: "perAzReadReplicasCount";
} | {
/**
* Set total replicas count between all AZs
*
* @generated from field: uint64 any_az_read_replicas_count = 2;
*/
value: bigint;
case: "anyAzReadReplicasCount";
} | {
case: undefined;
value?: undefined;
};
};
/**
* Describes the message Ydb.Table.ReadReplicasSettings.
* Use `create(ReadReplicasSettingsSchema)` to create a new message.
*/
export declare const ReadReplicasSettingsSchema: GenMessage<ReadReplicasSettings>;
/**
* @generated from message Ydb.Table.CreateTableRequest
*/
export type CreateTableRequest = Message<"Ydb.Table.CreateTableRequest"> & {
/**
* Session identifier
*
* @generated from field: string session_id = 1;
*/
sessionId: string;
/**
* Full path
*
* @generated from field: string path = 2;
*/
path: string;
/**
* Columns (name, type)
*
* @generated from field: repeated Ydb.Table.ColumnMeta columns = 3;
*/
columns: ColumnMeta[];
/**
* List of columns used as primary key
*
* @generated from field: repeated string primary_key = 4;
*/
primaryKey: string[];
/**
* Table profile
*
* @generated from field: Ydb.Table.TableProfile profile = 5;
*/
profile?: TableProfile;
/**
* @generated from field: Ydb.Operations.OperationParams operation_params = 6;
*/
operationParams?: OperationParams;
/**
* List of secondary indexes
*
* @generated from field: repeated Ydb.Table.TableIndex indexes = 7;
*/
indexes: TableIndex[];
/**
* Table rows time to live settings
*
* @generated from field: Ydb.Table.TtlSettings ttl_settings = 8;
*/
ttlSettings?: TtlSettings;
/**
* Storage settings for table
*
* @generated from field: Ydb.Table.StorageSettings storage_settings = 9;
*/
storageSettings?: StorageSettings;
/**
* Column families
*
* @generated from field: repeated Ydb.Table.ColumnFamily column_families = 10;
*/
columnFamilies: ColumnFamily[];
/**
* Attributes. Total size is limited to 10 KB.
*
* @generated from field: map<string, string> attributes = 11;
*/
attributes: {
[key: string]: string;
};
/**
* Predefined named set of settings for table compaction ["default", "small_table", "log_table"].
*
* @generated from field: string compaction_policy = 12;
*/
compactionPolicy: string;
/**
* Either one of the following partitions options can be specified
*
* @generated from oneof Ydb.Table.CreateTableRequest.partitions
*/
partitions: {
/**
* Enable uniform partitioning using given partitions count.
* The first components of primary key must have Uint32/Uint64 type.
*
* @generated from field: uint64 uniform_partitions = 13;
*/
value: bigint;
case: "uniformPartitions";
} | {
/**
* Explicitly specify key values which are used as borders for created partitions.
*
* @generated from field: Ydb.Table.ExplicitPartitions partition_at_keys = 14;
*/
value: ExplicitPartitions;
case: "partitionAtKeys";
} | {
case: undefined;
value?: undefined;
};
/**
* Partitioning settings for table
*
* @generated from field: Ydb.Table.PartitioningSettings partitioning_settings = 15;
*/
partitioningSettings?: PartitioningSettings;
/**
* Bloom filter by key
*
* @generated from field: Ydb.FeatureFlag.Status key_bloom_filter = 16;
*/
keyBloomFilter: FeatureFlag_Status;
/**
* Read replicas settings for table
*
* @generated from field: Ydb.Table.ReadReplicasSettings read_replicas_settings = 17;
*/
readReplicasSettings?: ReadReplicasSettings;
/**
* Tiering rules name. It specifies how data migrates from one tier (logical storage) to another.
*
* @generated from field: string tiering = 18;
*/
tiering: string;
/**
* Is temporary table
*
* @generated from field: bool temporary = 19;
*/
temporary: boolean;
/**
* Is table column or row oriented
*
* @generated from field: Ydb.Table.StoreType store_type = 20;
*/
storeType: StoreType;
};
/**
* Describes the message Ydb.Table.CreateTableRequest.
* Use `create(CreateTableRequestSchema)` to create a new message.
*/
export declare const CreateTableRequestSchema: GenMessage<CreateTableRequest>;
/**
* @generated from message Ydb.Table.CreateTableResponse
*/