feat(spanner): add DdlStatementActionInfo and add actions to UpdateDatabaseDdlMetadata

PiperOrigin-RevId: 536483675
pull/807/head^2
Google APIs 2 years ago committed by Copybara-Service
parent 7cb9709446
commit 9b1c253009
  1. 40
      google/spanner/admin/database/v1/spanner_database_admin.proto

@ -676,6 +676,27 @@ message UpdateDatabaseDdlRequest {
string operation_id = 3;
}
// Action information extracted from a DDL statement. This proto is used to
// display the brief info of the DDL statement for the operation
// [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl].
message DdlStatementActionInfo {
// The action for the DDL statement, e.g. CREATE, ALTER, DROP, GRANT, etc.
// This field is a non-empty string.
string action = 1;
// The entity type for the DDL statement, e.g. TABLE, INDEX, VIEW, etc.
// This field can be empty string for some DDL statement,
// e.g. for statement "ANALYZE", `entity_type` = "".
string entity_type = 2;
// The entity name(s) being operated on the DDL statement.
// E.g.
// 1. For statement "CREATE TABLE t1(...)", `entity_names` = ["t1"].
// 2. For statement "GRANT ROLE r1, r2 ...", `entity_names` = ["r1", "r2"].
// 3. For statement "ANALYZE", `entity_names` = [].
repeated string entity_names = 3;
}
// Metadata type for the operation returned by
// [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl].
message UpdateDatabaseDdlMetadata {
@ -693,20 +714,23 @@ message UpdateDatabaseDdlMetadata {
// timestamp for the statement `statements[i]`.
repeated google.protobuf.Timestamp commit_timestamps = 3;
// Output only. When true, indicates that the operation is throttled e.g
// Output only. When true, indicates that the operation is throttled e.g.
// due to resource constraints. When resources become available the operation
// will resume and this field will be false again.
bool throttled = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
// The progress of the
// [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] operations.
// Currently, only index creation statements will have a continuously
// updating progress.
// For non-index creation statements, `progress[i]` will have start time
// and end time populated with commit timestamp of operation,
// as well as a progress of 100% once the operation has completed.
// `progress[i]` is the operation progress for `statements[i]`.
// [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]
// operations. All DDL statements will have continuously updating progress,
// and `progress[i]` is the operation progress for `statements[i]`. Also,
// `progress[i]` will have start time and end time populated with commit
// timestamp of operation, as well as a progress of 100% once the operation
// has completed.
repeated OperationProgress progress = 5;
// The brief action info for the DDL statements.
// `actions[i]` is the brief info for `statements[i]`.
repeated DdlStatementActionInfo actions = 6;
}
// The request for [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase].

Loading…
Cancel
Save