Skip to content

Commit 81b24a5

Browse files
Google APIscopybara-github
authored andcommitted
feat(spanner): add proto descriptors for proto and enum types in create/update/get database ddl requests
PiperOrigin-RevId: 601013501
1 parent db906b1 commit 81b24a5

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

google/spanner/admin/database/v1/spanner_database_admin.proto

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,23 @@ message CreateDatabaseRequest {
572572

573573
// Optional. The dialect of the Cloud Spanner Database.
574574
DatabaseDialect database_dialect = 5 [(google.api.field_behavior) = OPTIONAL];
575+
576+
// Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements in
577+
// 'extra_statements' above.
578+
// Contains a protobuf-serialized
579+
// [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto).
580+
// To generate it, [install](https://grpc.io/docs/protoc-installation/) and
581+
// run `protoc` with --include_imports and --descriptor_set_out. For example,
582+
// to generate for moon/shot/app.proto, run
583+
// ```
584+
// $protoc --proto_path=/app_path --proto_path=/lib_path \
585+
// --include_imports \
586+
// --descriptor_set_out=descriptors.data \
587+
// moon/shot/app.proto
588+
// ```
589+
// For more details, see protobuffer [self
590+
// description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
591+
bytes proto_descriptors = 6 [(google.api.field_behavior) = OPTIONAL];
575592
}
576593

577594
// Metadata type for the operation returned by
@@ -674,6 +691,22 @@ message UpdateDatabaseDdlRequest {
674691
// [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns
675692
// `ALREADY_EXISTS`.
676693
string operation_id = 3;
694+
695+
// Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements.
696+
// Contains a protobuf-serialized
697+
// [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto).
698+
// To generate it, [install](https://grpc.io/docs/protoc-installation/) and
699+
// run `protoc` with --include_imports and --descriptor_set_out. For example,
700+
// to generate for moon/shot/app.proto, run
701+
// ```
702+
// $protoc --proto_path=/app_path --proto_path=/lib_path \
703+
// --include_imports \
704+
// --descriptor_set_out=descriptors.data \
705+
// moon/shot/app.proto
706+
// ```
707+
// For more details, see protobuffer [self
708+
// description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
709+
bytes proto_descriptors = 4 [(google.api.field_behavior) = OPTIONAL];
677710
}
678711

679712
// Action information extracted from a DDL statement. This proto is used to
@@ -762,6 +795,13 @@ message GetDatabaseDdlResponse {
762795
// A list of formatted DDL statements defining the schema of the database
763796
// specified in the request.
764797
repeated string statements = 1;
798+
799+
// Proto descriptors stored in the database.
800+
// Contains a protobuf-serialized
801+
// [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto).
802+
// For more details, see protobuffer [self
803+
// description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
804+
bytes proto_descriptors = 2;
765805
}
766806

767807
// The request for

0 commit comments

Comments
 (0)