Skip to content

Commit

Permalink
feat(spanner): add DdlStatementActionInfo and add actions to UpdateDa…
Browse files Browse the repository at this point in the history
…tabaseDdlMetadata (#1860)

- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 536483675

Source-Link: https://togithub.com/googleapis/googleapis/commit/9b1c2530092fb47ebdfdc8bf88060282a5ca71c9

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/b90140645d4e1cfa7b56f6083a43cfdd872558ba
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjkwMTQwNjQ1ZDRlMWNmYTdiNTZmNjA4M2E0M2NmZGQ4NzI1NThiYSJ9
  • Loading branch information
gcf-owl-bot[bot] authored Jun 6, 2023
1 parent c48945f commit 3e86f36
Show file tree
Hide file tree
Showing 4 changed files with 480 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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].
Expand Down
115 changes: 115 additions & 0 deletions protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3e86f36

Please sign in to comment.