feat: alter database ttl (#203)
* feat: alter database ttl * chore: add ddl task * chore: single task * chore: remove options * feat: add unset database options --------- Co-authored-by: CookiePieWw <profsyb@gmail.com>
This commit is contained in:
@@ -30,13 +30,14 @@ message DdlRequest {
|
||||
oneof expr {
|
||||
CreateDatabaseExpr create_database = 1;
|
||||
CreateTableExpr create_table = 2;
|
||||
AlterExpr alter = 3;
|
||||
AlterTableExpr alter_table = 3;
|
||||
DropTableExpr drop_table = 4;
|
||||
TruncateTableExpr truncate_table = 7;
|
||||
CreateFlowExpr create_flow = 8;
|
||||
DropFlowExpr drop_flow = 9;
|
||||
CreateViewExpr create_view = 10;
|
||||
DropViewExpr drop_view = 11;
|
||||
AlterDatabaseExpr alter_database = 12;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +101,7 @@ message CreateTableExpr {
|
||||
string engine = 12;
|
||||
}
|
||||
|
||||
message AlterExpr {
|
||||
message AlterTableExpr {
|
||||
string catalog_name = 1;
|
||||
string schema_name = 2;
|
||||
string table_name = 3;
|
||||
@@ -163,15 +164,15 @@ message ModifyColumnType {
|
||||
ColumnDataTypeExtension target_type_extension = 3;
|
||||
}
|
||||
|
||||
message SetTableOptions {
|
||||
repeated TableOption table_options = 1;
|
||||
}
|
||||
|
||||
message TableOption {
|
||||
message Option {
|
||||
string key = 1;
|
||||
string value = 2;
|
||||
}
|
||||
|
||||
message SetTableOptions {
|
||||
repeated Option table_options = 1;
|
||||
}
|
||||
|
||||
message UnsetTableOptions {
|
||||
repeated string keys = 1;
|
||||
}
|
||||
@@ -221,3 +222,20 @@ message SetColumnFulltext {
|
||||
message UnsetColumnFulltext {
|
||||
string column_name = 1;
|
||||
}
|
||||
|
||||
message AlterDatabaseExpr {
|
||||
string catalog_name = 1;
|
||||
string schema_name = 2;
|
||||
oneof kind {
|
||||
SetDatabaseOptions set_database_options = 3;
|
||||
UnsetDatabaseOptions unset_database_options = 4;
|
||||
}
|
||||
}
|
||||
|
||||
message SetDatabaseOptions {
|
||||
repeated Option set_database_options = 1;
|
||||
}
|
||||
|
||||
message UnsetDatabaseOptions {
|
||||
repeated string keys = 1;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ message DropTableTask{
|
||||
message DropTableTasks { repeated DropTableTask tasks = 1; }
|
||||
|
||||
message AlterTableTask{
|
||||
AlterExpr alter_table = 1;
|
||||
AlterTableExpr alter_table = 1;
|
||||
}
|
||||
|
||||
message AlterTableTasks { repeated AlterTableTask tasks = 1; }
|
||||
@@ -79,6 +79,11 @@ message DropViewTask {
|
||||
DropViewExpr drop_view = 1;
|
||||
}
|
||||
|
||||
// Alter database tasks
|
||||
message AlterDatabaseTask {
|
||||
AlterDatabaseExpr task = 1;
|
||||
}
|
||||
|
||||
message DdlTaskRequest {
|
||||
RequestHeader header = 1;
|
||||
QueryContext query_context = 64;
|
||||
@@ -97,6 +102,7 @@ message DdlTaskRequest {
|
||||
DropFlowTask drop_flow_task = 12;
|
||||
CreateViewTask create_view_task = 13;
|
||||
DropViewTask drop_view_task = 14;
|
||||
AlterDatabaseTask alter_database_task = 15;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user