Skip to content

Add from_sequence option to default value policy #2050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Feb 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ydb/public/api/protos/ydb_table.proto
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,16 @@ message TableProfile {
CachingPolicy caching_policy = 7;
}

message SequenceDescription {
optional string name = 1; // mandatorys
optional sint64 min_value = 2; // minimum value, defaults to 1 or Min<i64>
optional sint64 max_value = 3; // maximum value, defaults to Max<i64> or -1
optional sint64 start_value = 4; // start value, defaults to min_value
optional uint64 cache = 5; // number of items to cache, defaults to 1
optional sint64 increment = 6; // increment at each call, defaults to 1
optional bool cycle = 7; // true when cycle on overflow is allowed
}

message ColumnMeta {
// Name of column
string name = 1;
Expand All @@ -345,6 +355,7 @@ message ColumnMeta {
// Column default value option
oneof default_value {
TypedValue from_literal = 5;
SequenceDescription from_sequence = 6;
}
}

Expand Down