| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 707b797 commit 71f637d
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -44,6 +44,7 @@ | |||
| 44 | 44 | from .types.spanner_database_admin import CreateDatabaseRequest | |
| 45 | 45 | from .types.spanner_database_admin import Database | |
| 46 | 46 | from .types.spanner_database_admin import DatabaseRole | |
| 47 | + from .types.spanner_database_admin import DdlStatementActionInfo | ||
| 47 | 48 | from .types.spanner_database_admin import DropDatabaseRequest | |
| 48 | 49 | from .types.spanner_database_admin import GetDatabaseDdlRequest | |
| 49 | 50 | from .types.spanner_database_admin import GetDatabaseDdlResponse | |
@@ -81,6 +82,7 @@ | |||
| 81 | 82 | "DatabaseAdminClient", | |
| 82 | 83 | "DatabaseDialect", | |
| 83 | 84 | "DatabaseRole", | |
| 85 | + "DdlStatementActionInfo", | ||
| 84 | 86 | "DeleteBackupRequest", | |
| 85 | 87 | "DropDatabaseRequest", | |
| 86 | 88 | "EncryptionConfig", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -41,6 +41,7 @@ | |||
| 41 | 41 | CreateDatabaseRequest, | |
| 42 | 42 | Database, | |
| 43 | 43 | DatabaseRole, | |
| 44 | + DdlStatementActionInfo, | ||
| 44 | 45 | DropDatabaseRequest, | |
| 45 | 46 | GetDatabaseDdlRequest, | |
| 46 | 47 | GetDatabaseDdlResponse, | |
@@ -87,6 +88,7 @@ | |||
| 87 | 88 | "CreateDatabaseRequest", | |
| 88 | 89 | "Database", | |
| 89 | 90 | "DatabaseRole", | |
| 91 | + "DdlStatementActionInfo", | ||
| 90 | 92 | "DropDatabaseRequest", | |
| 91 | 93 | "GetDatabaseDdlRequest", | |
| 92 | 94 | "GetDatabaseDdlResponse", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -40,6 +40,7 @@ | |||
| 40 | 40 | "UpdateDatabaseRequest", | |
| 41 | 41 | "UpdateDatabaseMetadata", | |
| 42 | 42 | "UpdateDatabaseDdlRequest", | |
| 43 | + "DdlStatementActionInfo", | ||
| 43 | 44 | "UpdateDatabaseDdlMetadata", | |
| 44 | 45 | "DropDatabaseRequest", | |
| 45 | 46 | "GetDatabaseDdlRequest", | |
@@ -533,6 +534,46 @@ class UpdateDatabaseDdlRequest(proto.Message): | |||
| 533 | 534 | ) | |
| 534 | 535 | ||
| 535 | 536 | ||
| 537 | + class DdlStatementActionInfo(proto.Message): | ||
| 538 | + r"""Action information extracted from a DDL statement. This proto is | ||
| 539 | + used to display the brief info of the DDL statement for the | ||
| 540 | + operation | ||
| 541 | + [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. | ||
| 542 | + | ||
| 543 | + Attributes: | ||
| 544 | + action (str): | ||
| 545 | + The action for the DDL statement, e.g. | ||
| 546 | + CREATE, ALTER, DROP, GRANT, etc. This field is a | ||
| 547 | + non-empty string. | ||
| 548 | + entity_type (str): | ||
| 549 | + The entity type for the DDL statement, e.g. TABLE, INDEX, | ||
| 550 | + VIEW, etc. This field can be empty string for some DDL | ||
| 551 | + statement, e.g. for statement "ANALYZE", ``entity_type`` = | ||
| 552 | + "". | ||
| 553 | + entity_names (MutableSequence[str]): | ||
| 554 | + The entity name(s) being operated on the DDL statement. E.g. | ||
| 555 | + | ||
| 556 | + 1. For statement "CREATE TABLE t1(...)", ``entity_names`` = | ||
| 557 | + ["t1"]. | ||
| 558 | + 2. For statement "GRANT ROLE r1, r2 ...", ``entity_names`` = | ||
| 559 | + ["r1", "r2"]. | ||
| 560 | + 3. For statement "ANALYZE", ``entity_names`` = []. | ||
| 561 | + """ | ||
| 562 | + | ||
| 563 | + action: str = proto.Field( | ||
| 564 | + proto.STRING, | ||
| 565 | + number=1, | ||
| 566 | + ) | ||
| 567 | + entity_type: str = proto.Field( | ||
| 568 | + proto.STRING, | ||
| 569 | + number=2, | ||
| 570 | + ) | ||
| 571 | + entity_names: MutableSequence[str] = proto.RepeatedField( | ||
| 572 | + proto.STRING, | ||
| 573 | + number=3, | ||
| 574 | + ) | ||
| 575 | + | ||
| 576 | + | ||
| 536 | 577 | class UpdateDatabaseDdlMetadata(proto.Message): | |
| 537 | 578 | r"""Metadata type for the operation returned by | |
| 538 | 579 | [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. | |
@@ -550,20 +591,22 @@ class UpdateDatabaseDdlMetadata(proto.Message): | |||
| 550 | 591 | commit timestamp for the statement ``statements[i]``. | |
| 551 | 592 | throttled (bool): | |
| 552 | 593 | Output only. When true, indicates that the | |
| 553 | - operation is throttled e.g due to resource | ||
| 594 | + operation is throttled e.g. due to resource | ||
| 554 | 595 | constraints. When resources become available the | |
| 555 | 596 | operation will resume and this field will be | |
| 556 | 597 | false again. | |
| 557 | 598 | progress (MutableSequence[google.cloud.spanner_admin_database_v1.types.OperationProgress]): | |
| 558 | 599 | The progress of the | |
| 559 | 600 | [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] | |
| 560 | - operations. Currently, only index creation statements will | ||
| 561 | - have a continuously updating progress. For non-index | ||
| 562 | - creation statements, ``progress[i]`` will have start time | ||
| 563 | - and end time populated with commit timestamp of operation, | ||
| 564 | - as well as a progress of 100% once the operation has | ||
| 565 | - completed. ``progress[i]`` is the operation progress for | ||
| 566 | - ``statements[i]``. | ||
| 601 | + operations. All DDL statements will have continuously | ||
| 602 | + updating progress, and ``progress[i]`` is the operation | ||
| 603 | + progress for ``statements[i]``. Also, ``progress[i]`` will | ||
| 604 | + have start time and end time populated with commit timestamp | ||
| 605 | + of operation, as well as a progress of 100% once the | ||
| 606 | + operation has completed. | ||
| 607 | + actions (MutableSequence[google.cloud.spanner_admin_database_v1.types.DdlStatementActionInfo]): | ||
| 608 | + The brief action info for the DDL statements. ``actions[i]`` | ||
| 609 | + is the brief info for ``statements[i]``. | ||
| 567 | 610 | """ | |
| 568 | 611 | ||
| 569 | 612 | database: str = proto.Field( | |
@@ -588,6 +631,11 @@ class UpdateDatabaseDdlMetadata(proto.Message): | |||
| 588 | 631 | number=5, | |
| 589 | 632 | message=common.OperationProgress, | |
| 590 | 633 | ) | |
| 634 | + actions: MutableSequence["DdlStatementActionInfo"] = proto.RepeatedField( | ||
| 635 | + proto.MESSAGE, | ||
| 636 | + number=6, | ||
| 637 | + message="DdlStatementActionInfo", | ||
| 638 | + ) | ||
| 591 | 639 | ||
| 592 | 640 | ||
| 593 | 641 | class DropDatabaseRequest(proto.Message): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,7 +8,7 @@ | |||
| 8 | 8 | ], | |
| 9 | 9 | "language": "PYTHON", | |
| 10 | 10 | "name": "google-cloud-spanner-admin-database", | |
| 11 | - "version": "3.35.1" | ||
| 11 | + "version": "0.1.0" | ||
| 12 | 12 | }, | |
| 13 | 13 | "snippets": [ | |
| 14 | 14 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,7 +8,7 @@ | |||
| 8 | 8 | ], | |
| 9 | 9 | "language": "PYTHON", | |
| 10 | 10 | "name": "google-cloud-spanner-admin-instance", | |
| 11 | - "version": "3.35.1" | ||
| 11 | + "version": "0.1.0" | ||
| 12 | 12 | }, | |
| 13 | 13 | "snippets": [ | |
| 14 | 14 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,7 +8,7 @@ | |||
| 8 | 8 | ], | |
| 9 | 9 | "language": "PYTHON", | |
| 10 | 10 | "name": "google-cloud-spanner", | |
| 11 | - "version": "3.35.1" | ||
| 11 | + "version": "0.1.0" | ||
| 12 | 12 | }, | |
| 13 | 13 | "snippets": [ | |
| 14 | 14 | { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments