Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: add getSchemaString API (#15424)
rebelice75df14826ce6
diff --git a/frontend/src/types/proto/google/protobuf/descriptor.ts b/frontend/src/types/proto/google/protobuf/descriptor.tsindex ae3f877dc7..2fdf22f5e2 100644--- a/frontend/src/types/proto/google/protobuf/descriptor.ts+++ b/frontend/src/types/proto/google/protobuf/descriptor.ts@@ -36,7 +36,7 @@ export enum Edition {EDITION_2024 = "EDITION_2024",/*** EDITION_1_TEST_ONLY - Placeholder editions for testing feature resolution. These should not be- * used or relyed on outside of tests.+ * used or relied on outside of tests.*/EDITION_1_TEST_ONLY = "EDITION_1_TEST_ONLY",EDITION_2_TEST_ONLY = "EDITION_2_TEST_ONLY",@@ -1093,12 +1093,13 @@ export interface MessageOptions {export interface FieldOptions {/**+ * NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.* The ctype option instructs the C++ code generator to use a different* representation of the field than it normally would. See the specific* options below. This option is only implemented to support use of* [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of- * type "bytes" in the open source release -- sorry, we'll try to include- * other types in a future version!+ * type "bytes" in the open source release.+ * TODO: make ctype actually deprecated.*/ctype?:| FieldOptions_CType@@ -1314,11 +1315,7 @@ export function fieldOptions_JSTypeToNumber(object: FieldOptions_JSType): number}}-/**- * If set to RETENTION_SOURCE, the option will be omitted from the binary.- * Note: as of January 2023, support for this is in progress and does not yet- * have an effect (b/264593489).- */+/** If set to RETENTION_SOURCE, the option will be omitted from the binary. */export enum FieldOptions_OptionRetention {RETENTION_UNKNOWN = "RETENTION_UNKNOWN",RETENTION_RUNTIME = "RETENTION_RUNTIME",@@ -1375,8 +1372,7 @@ export function fieldOptions_OptionRetentionToNumber(object: FieldOptions_Option/*** This indicates the types of entities that the field may apply to when used* as an option. If it is unset, then the field may be freely used as an- * option on any kind of entity. Note: as of January 2023, support for this is- * in progress and does not yet have an effect (b/264593489).+ * option on any kind of entity.*/export enum FieldOptions_OptionTargetType {TARGET_TYPE_UNKNOWN = "TARGET_TYPE_UNKNOWN",diff --git a/frontend/src/types/proto/v1/database_service.ts b/frontend/src/types/proto/v1/database_service.tsindex 41210aa278..982cc8ee71 100644--- a/frontend/src/types/proto/v1/database_service.ts+++ b/frontend/src/types/proto/v1/database_service.ts@@ -1848,6 +1848,124 @@ export function changelog_TypeToNumber(object: Changelog_Type): number {}}+export interface GetSchemaStringRequest {+ /**+ * The name of the database.+ * Format: instances/{instance}/databases/{database}+ */+ name: string;+ type: GetSchemaStringRequest_ObjectType;+ /** It's empty for DATABASE. */+ schema: string;+ /** It's empty for DATABASE and SCHEMA. */+ object: string;+}++export enum GetSchemaStringRequest_ObjectType {+ OBJECT_TYPE_UNSPECIFIED = "OBJECT_TYPE_UNSPECIFIED",+ DATABASE = "DATABASE",+ SCHEMA = "SCHEMA",+ TABLE = "TABLE",+ VIEW = "VIEW",+ MATERIALIZED_VIEW = "MATERIALIZED_VIEW",+ FUNCTION = "FUNCTION",+ PROCEDURE = "PROCEDURE",+ SEQUENCE = "SEQUENCE",+ UNRECOGNIZED = "UNRECOGNIZED",+}++export function getSchemaStringRequest_ObjectTypeFromJSON(object: any): GetSchemaStringRequest_ObjectType {+ switch (object) {+ case 0:+ case "OBJECT_TYPE_UNSPECIFIED":+ return GetSchemaStringRequest_ObjectType.OBJECT_TYPE_UNSPECIFIED;+ case 1:+ case "DATABASE":+ return GetSchemaStringRequest_ObjectType.DATABASE;+ case 2:+ case "SCHEMA":+ return GetSchemaStringRequest_ObjectType.SCHEMA;+ case 3:+ case "TABLE":+ return GetSchemaStringRequest_ObjectType.TABLE;+ case 4:+ case "VIEW":+ return GetSchemaStringRequest_ObjectType.VIEW;+ case 5:+ case "MATERIALIZED_VIEW":+ return GetSchemaStringRequest_ObjectType.MATERIALIZED_VIEW;+ case 6:+ case "FUNCTION":+ return GetSchemaStringRequest_ObjectType.FUNCTION;+ case 7:+ case "PROCEDURE":+ return GetSchemaStringRequest_ObjectType.PROCEDURE;+ case 8:+ case "SEQUENCE":+ return GetSchemaStringRequest_ObjectType.SEQUENCE;+ case -1:+ case "UNRECOGNIZED":+ default:+ return GetSchemaStringRequest_ObjectType.UNRECOGNIZED;+ }+}++export function getSchemaStringRequest_ObjectTypeToJSON(object: GetSchemaStringRequest_ObjectType): string {+ switch (object) {+ case GetSchemaStringRequest_ObjectType.OBJECT_TYPE_UNSPECIFIED:+ return "OBJECT_TYPE_UNSPECIFIED";+ case GetSchemaStringRequest_ObjectType.DATABASE:+ return "DATABASE";+ case GetSchemaStringRequest_ObjectType.SCHEMA:+ return "SCHEMA";+ case GetSchemaStringRequest_ObjectType.TABLE:+ return "TABLE";+ case GetSchemaStringRequest_ObjectType.VIEW:+ return "VIEW";+ case GetSchemaStringRequest_ObjectType.MATERIALIZED_VIEW:+ return "MATERIALIZED_VIEW";+ case GetSchemaStringRequest_ObjectType.FUNCTION:+ return "FUNCTION";+ case GetSchemaStringRequest_ObjectType.PROCEDURE:+ return "PROCEDURE";+ case GetSchemaStringRequest_ObjectType.SEQUENCE:+ return "SEQUENCE";+ case GetSchemaStringRequest_ObjectType.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export function getSchemaStringRequest_ObjectTypeToNumber(object: GetSchemaStringRequest_ObjectType): number {+ switch (object) {+ case GetSchemaStringRequest_ObjectType.OBJECT_TYPE_UNSPECIFIED:+ return 0;+ case GetSchemaStringRequest_ObjectType.DATABASE:+ return 1;+ case GetSchemaStringRequest_ObjectType.SCHEMA:+ return 2;+ case GetSchemaStringRequest_ObjectType.TABLE:+ return 3;+ case GetSchemaStringRequest_ObjectType.VIEW:+ return 4;+ case GetSchemaStringRequest_ObjectType.MATERIALIZED_VIEW:+ return 5;+ case GetSchemaStringRequest_ObjectType.FUNCTION:+ return 6;+ case GetSchemaStringRequest_ObjectType.PROCEDURE:+ return 7;+ case GetSchemaStringRequest_ObjectType.SEQUENCE:+ return 8;+ case GetSchemaStringRequest_ObjectType.UNRECOGNIZED:+ default:+ return -1;+ }+}++export interface GetSchemaStringResponse {+ schemaString: string;+}+function createBaseGetDatabaseRequest(): GetDatabaseRequest {return { name: "" };}@@ -10556,6 +10674,174 @@ export const Changelog: MessageFns<Changelog> = {},};+function createBaseGetSchemaStringRequest(): GetSchemaStringRequest {+ return { name: "", type: GetSchemaStringRequest_ObjectType.OBJECT_TYPE_UNSPECIFIED, schema: "", object: "" };+}++export const GetSchemaStringRequest: MessageFns<GetSchemaStringRequest> = {+ encode(message: GetSchemaStringRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {+ if (message.name !== "") {+ writer.uint32(10).string(message.name);+ }+ if (message.type !== GetSchemaStringRequest_ObjectType.OBJECT_TYPE_UNSPECIFIED) {+ writer.uint32(16).int32(getSchemaStringRequest_ObjectTypeToNumber(message.type));+ }+ if (message.schema !== "") {+ writer.uint32(26).string(message.schema);+ }+ if (message.object !== "") {+ writer.uint32(34).string(message.object);+ }+ return writer;+ },++ decode(input: BinaryReader | Uint8Array, length?: number): GetSchemaStringRequest {+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseGetSchemaStringRequest();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1: {+ if (tag !== 10) {+ break;+ }++ message.name = reader.string();+ continue;+ }+ case 2: {+ if (tag !== 16) {+ break;+ }++ message.type = getSchemaStringRequest_ObjectTypeFromJSON(reader.int32());+ continue;+ }+ case 3: {+ if (tag !== 26) {+ break;+ }++ message.schema = reader.string();+ continue;+ }+ case 4: {+ if (tag !== 34) {+ break;+ }++ message.object = reader.string();+ continue;+ }+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skip(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): GetSchemaStringRequest {+ return {+ name: isSet(object.name) ? globalThis.String(object.name) : "",+ type: isSet(object.type)+ ? getSchemaStringRequest_ObjectTypeFromJSON(object.type)+ : GetSchemaStringRequest_ObjectType.OBJECT_TYPE_UNSPECIFIED,+ schema: isSet(object.schema) ? globalThis.String(object.schema) : "",+ object: isSet(object.object) ? globalThis.String(object.object) : "",+ };+ },++ toJSON(message: GetSchemaStringRequest): unknown {+ const obj: any = {};+ if (message.name !== "") {+ obj.name = message.name;+ }+ if (message.type !== GetSchemaStringRequest_ObjectType.OBJECT_TYPE_UNSPECIFIED) {+ obj.type = getSchemaStringRequest_ObjectTypeToJSON(message.type);+ }+ if (message.schema !== "") {+ obj.schema = message.schema;+ }+ if (message.object !== "") {+ obj.object = message.object;+ }+ return obj;+ },++ create(base?: DeepPartial<GetSchemaStringRequest>): GetSchemaStringRequest {+ return GetSchemaStringRequest.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<GetSchemaStringRequest>): GetSchemaStringRequest {+ const message = createBaseGetSchemaStringRequest();+ message.name = object.name ?? "";+ message.type = object.type ?? GetSchemaStringRequest_ObjectType.OBJECT_TYPE_UNSPECIFIED;+ message.schema = object.schema ?? "";+ message.object = object.object ?? "";+ return message;+ },+};++function createBaseGetSchemaStringResponse(): GetSchemaStringResponse {+ return { schemaString: "" };+}++export const GetSchemaStringResponse: MessageFns<GetSchemaStringResponse> = {+ encode(message: GetSchemaStringResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {+ if (message.schemaString !== "") {+ writer.uint32(10).string(message.schemaString);+ }+ return writer;+ },++ decode(input: BinaryReader | Uint8Array, length?: number): GetSchemaStringResponse {+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseGetSchemaStringResponse();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1: {+ if (tag !== 10) {+ break;+ }++ message.schemaString = reader.string();+ continue;+ }+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skip(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): GetSchemaStringResponse {+ return { schemaString: isSet(object.schemaString) ? globalThis.String(object.schemaString) : "" };+ },++ toJSON(message: GetSchemaStringResponse): unknown {+ const obj: any = {};+ if (message.schemaString !== "") {+ obj.schemaString = message.schemaString;+ }+ return obj;+ },++ create(base?: DeepPartial<GetSchemaStringResponse>): GetSchemaStringResponse {+ return GetSchemaStringResponse.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<GetSchemaStringResponse>): GetSchemaStringResponse {+ const message = createBaseGetSchemaStringResponse();+ message.schemaString = object.schemaString ?? "";+ return message;+ },+};+export type DatabaseServiceDefinition = typeof DatabaseServiceDefinition;export const DatabaseServiceDefinition = {name: "DatabaseService",@@ -12225,6 +12511,100 @@ export const DatabaseServiceDefinition = {},},},+ getSchemaString: {+ name: "GetSchemaString",+ requestType: GetSchemaStringRequest,+ requestStream: false,+ responseType: GetSchemaStringResponse,+ responseStream: false,+ options: {+ _unknownFields: {+ 8410: [new Uint8Array([4, 110, 97, 109, 101])],+ 800010: [+ new Uint8Array([+ 22,+ 98,+ 98,+ 46,+ 100,+ 97,+ 116,+ 97,+ 98,+ 97,+ 115,+ 101,+ 115,+ 46,+ 103,+ 101,+ 116,+ 83,+ 99,+ 104,+ 101,+ 109,+ 97,+ ]),+ ],+ 800016: [new Uint8Array([1])],+ 578365826: [+ new Uint8Array([+ 49,+ 18,+ 47,+ 47,+ 118,+ 49,+ 47,+ 123,+ 110,+ 97,+ 109,+ 101,+ 61,+ 105,+ 110,+ 115,+ 116,+ 97,+ 110,+ 99,+ 101,+ 115,+ 47,+ 42,+ 47,+ 100,+ 97,+ 116,+ 97,+ 98,+ 97,+ 115,+ 101,+ 115,+ 47,+ 42,+ 47,+ 115,+ 99,+ 104,+ 101,+ 109,+ 97,+ 83,+ 116,+ 114,+ 105,+ 110,+ 103,+ 125,+ ]),+ ],+ },+ },+ },},} as const;diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 73a24d8b65..ee2ba51324 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -2155,6 +2155,62 @@ paths:application/json:schema:$ref: '#/components/schemas/Status'+ /v1/instances/{instance}/databases/{database}/schemaString:+ get:+ tags:+ - DatabaseService+ operationId: DatabaseService_GetSchemaString+ parameters:+ - name: instance+ in: path+ description: The instance id.+ required: true+ schema:+ type: string+ - name: database+ in: path+ description: The database id.+ required: true+ schema:+ type: string+ - name: type+ in: query+ schema:+ enum:+ - OBJECT_TYPE_UNSPECIFIED+ - DATABASE+ - SCHEMA+ - TABLE+ - VIEW+ - MATERIALIZED_VIEW+ - FUNCTION+ - PROCEDURE+ - SEQUENCE+ type: string+ format: enum+ - name: schema+ in: query+ description: It's empty for DATABASE.+ schema:+ type: string+ - name: object+ in: query+ description: It's empty for DATABASE and SCHEMA.+ schema:+ type: string+ responses:+ "200":+ description: OK+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/GetSchemaStringResponse'+ default:+ description: Default error response+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/Status'/v1/instances/{instance}/databases/{database}/secrets:get:tags:@@ -9600,6 +9656,11 @@ components:format: enumexpression:type: string+ GetSchemaStringResponse:+ type: object+ properties:+ schemaString:+ type: stringGoogleProtobufAny:type: objectproperties:diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 61063c319e..5e9072eeb9 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -122,6 +122,8 @@- [GetDatabaseRequest](#bytebase-v1-GetDatabaseRequest)- [GetDatabaseSchemaRequest](#bytebase-v1-GetDatabaseSchemaRequest)- [GetRevisionRequest](#bytebase-v1-GetRevisionRequest)+ - [GetSchemaStringRequest](#bytebase-v1-GetSchemaStringRequest)+ - [GetSchemaStringResponse](#bytebase-v1-GetSchemaStringResponse)- [IndexMetadata](#bytebase-v1-IndexMetadata)- [ListChangelogsRequest](#bytebase-v1-ListChangelogsRequest)- [ListChangelogsResponse](#bytebase-v1-ListChangelogsResponse)@@ -160,6 +162,7 @@- [ColumnMetadata.IdentityGeneration](#bytebase-v1-ColumnMetadata-IdentityGeneration)- [DatabaseMetadataView](#bytebase-v1-DatabaseMetadataView)- [GenerationMetadata.Type](#bytebase-v1-GenerationMetadata-Type)+ - [GetSchemaStringRequest.ObjectType](#bytebase-v1-GetSchemaStringRequest-ObjectType)- [StreamMetadata.Mode](#bytebase-v1-StreamMetadata-Mode)- [StreamMetadata.Type](#bytebase-v1-StreamMetadata-Type)- [TablePartitionMetadata.Type](#bytebase-v1-TablePartitionMetadata-Type)@@ -2497,6 +2500,39 @@ FunctionMetadata is the metadata for functions.+<a name="bytebase-v1-GetSchemaStringRequest"></a>++### GetSchemaStringRequest++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name of the database. Format: instances/{instance}/databases/{database} |+| type | [GetSchemaStringRequest.ObjectType](#bytebase-v1-GetSchemaStringRequest-ObjectType) | | |+| schema | [string](#string) | | It's empty for DATABASE. |+| object | [string](#string) | | It's empty for DATABASE and SCHEMA. |+++++++<a name="bytebase-v1-GetSchemaStringResponse"></a>++### GetSchemaStringResponse++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| schema_string | [string](#string) | | |++++++<a name="bytebase-v1-IndexMetadata"></a>### IndexMetadata@@ -3224,6 +3260,25 @@ ViewMetadata is the metadata for views.+<a name="bytebase-v1-GetSchemaStringRequest-ObjectType"></a>++### GetSchemaStringRequest.ObjectType+++| Name | Number | Description |+| ---- | ------ | ----------- |+| OBJECT_TYPE_UNSPECIFIED | 0 | |+| DATABASE | 1 | |+| SCHEMA | 2 | |+| TABLE | 3 | |+| VIEW | 4 | |+| MATERIALIZED_VIEW | 5 | |+| FUNCTION | 6 | |+| PROCEDURE | 7 | |+| SEQUENCE | 8 | |+++<a name="bytebase-v1-StreamMetadata-Mode"></a>### StreamMetadata.Mode@@ -3318,6 +3373,7 @@ LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)| DeleteRevision | [DeleteRevisionRequest](#bytebase-v1-DeleteRevisionRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | || ListChangelogs | [ListChangelogsRequest](#bytebase-v1-ListChangelogsRequest) | [ListChangelogsResponse](#bytebase-v1-ListChangelogsResponse) | || GetChangelog | [GetChangelogRequest](#bytebase-v1-GetChangelogRequest) | [Changelog](#bytebase-v1-Changelog) | |+| GetSchemaString | [GetSchemaStringRequest](#bytebase-v1-GetSchemaStringRequest) | [GetSchemaStringResponse](#bytebase-v1-GetSchemaStringResponse) | |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 3750716ba3..4eae87fad0 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -637,6 +637,14 @@<a href="#bytebase.v1.GetRevisionRequest"><span class="badge">M</span>GetRevisionRequest</a></li>+ <li>+ <a href="#bytebase.v1.GetSchemaStringRequest"><span class="badge">M</span>GetSchemaStringRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.GetSchemaStringResponse"><span class="badge">M</span>GetSchemaStringResponse</a>+ </li>+<li><a href="#bytebase.v1.IndexMetadata"><span class="badge">M</span>IndexMetadata</a></li>@@ -786,6 +794,10 @@<a href="#bytebase.v1.GenerationMetadata.Type"><span class="badge">E</span>GenerationMetadata.Type</a></li>+ <li>+ <a href="#bytebase.v1.GetSchemaStringRequest.ObjectType"><span class="badge">E</span>GetSchemaStringRequest.ObjectType</a>+ </li>+<li><a href="#bytebase.v1.StreamMetadata.Mode"><span class="badge">E</span>StreamMetadata.Mode</a></li>@@ -7497,6 +7509,76 @@ Format: instances/{instance}/databases/{database}/revisions/{revision} </p></td>+ <h3 id="bytebase.v1.GetSchemaStringRequest">GetSchemaStringRequest</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the database.+Format: instances/{instance}/databases/{database} </p></td>+ </tr>++ <tr>+ <td>type</td>+ <td><a href="#bytebase.v1.GetSchemaStringRequest.ObjectType">GetSchemaStringRequest.ObjectType</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>schema</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>It's empty for DATABASE. </p></td>+ </tr>++ <tr>+ <td>object</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>It's empty for DATABASE and SCHEMA. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.GetSchemaStringResponse">GetSchemaStringResponse</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>schema_string</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>+++++<h3 id="bytebase.v1.IndexMetadata">IndexMetadata</h3><p>IndexMetadata is the metadata for indexes.</p>@@ -9727,6 +9809,71 @@ view, function names.</p></td></tbody></table>+ <h3 id="bytebase.v1.GetSchemaStringRequest.ObjectType">GetSchemaStringRequest.ObjectType</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>OBJECT_TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>DATABASE</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>SCHEMA</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>TABLE</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>VIEW</td>+ <td>4</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>MATERIALIZED_VIEW</td>+ <td>5</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>FUNCTION</td>+ <td>6</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>PROCEDURE</td>+ <td>7</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>SEQUENCE</td>+ <td>8</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>+<h3 id="bytebase.v1.StreamMetadata.Mode">StreamMetadata.Mode</h3><p></p><table class="enum-table">@@ -10024,6 +10171,13 @@ view, function names.</p></td><td><p></p></td></tr>+ <tr>+ <td>GetSchemaString</td>+ <td><a href="#bytebase.v1.GetSchemaStringRequest">GetSchemaStringRequest</a></td>+ <td><a href="#bytebase.v1.GetSchemaStringResponse">GetSchemaStringResponse</a></td>+ <td><p></p></td>+ </tr>+</tbody></table>@@ -10253,6 +10407,16 @@ view, function names.</p></td></tr>+++ <tr>+ <td>GetSchemaString</td>+ <td>GET</td>+ <td>/v1/{name=instances/*/databases/*/schemaString}</td>+ <td></td>+ </tr>++</tbody></table>diff --git a/proto/generated-go/v1/database_service.pb.go b/proto/generated-go/v1/database_service.pb.goindex 90ac4e8924..71b1d3f966 100644--- a/proto/generated-go/v1/database_service.pb.go+++ b/proto/generated-go/v1/database_service.pb.go@@ -560,6 +560,73 @@ func (Changelog_Type) EnumDescriptor() ([]byte, []int) {return file_v1_database_service_proto_rawDescGZIP(), []int{66, 1}}+type GetSchemaStringRequest_ObjectType int32++const (+ GetSchemaStringRequest_OBJECT_TYPE_UNSPECIFIED GetSchemaStringRequest_ObjectType = 0+ GetSchemaStringRequest_DATABASE GetSchemaStringRequest_ObjectType = 1+ GetSchemaStringRequest_SCHEMA GetSchemaStringRequest_ObjectType = 2+ GetSchemaStringRequest_TABLE GetSchemaStringRequest_ObjectType = 3+ GetSchemaStringRequest_VIEW GetSchemaStringRequest_ObjectType = 4+ GetSchemaStringRequest_MATERIALIZED_VIEW GetSchemaStringRequest_ObjectType = 5+ GetSchemaStringRequest_FUNCTION GetSchemaStringRequest_ObjectType = 6+ GetSchemaStringRequest_PROCEDURE GetSchemaStringRequest_ObjectType = 7+ GetSchemaStringRequest_SEQUENCE GetSchemaStringRequest_ObjectType = 8+)++// Enum value maps for GetSchemaStringRequest_ObjectType.+var (+ GetSchemaStringRequest_ObjectType_name = map[int32]string{+ 0: "OBJECT_TYPE_UNSPECIFIED",+ 1: "DATABASE",+ 2: "SCHEMA",+ 3: "TABLE",+ 4: "VIEW",+ 5: "MATERIALIZED_VIEW",+ 6: "FUNCTION",+ 7: "PROCEDURE",+ 8: "SEQUENCE",+ }+ GetSchemaStringRequest_ObjectType_value = map[string]int32{+ "OBJECT_TYPE_UNSPECIFIED": 0,+ "DATABASE": 1,+ "SCHEMA": 2,+ "TABLE": 3,+ "VIEW": 4,+ "MATERIALIZED_VIEW": 5,+ "FUNCTION": 6,+ "PROCEDURE": 7,+ "SEQUENCE": 8,+ }+)++func (x GetSchemaStringRequest_ObjectType) Enum() *GetSchemaStringRequest_ObjectType {+ p := new(GetSchemaStringRequest_ObjectType)+ *p = x+ return p+}++func (x GetSchemaStringRequest_ObjectType) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (GetSchemaStringRequest_ObjectType) Descriptor() protoreflect.EnumDescriptor {+ return file_v1_database_service_proto_enumTypes[10].Descriptor()+}++func (GetSchemaStringRequest_ObjectType) Type() protoreflect.EnumType {+ return &file_v1_database_service_proto_enumTypes[10]+}++func (x GetSchemaStringRequest_ObjectType) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use GetSchemaStringRequest_ObjectType.Descriptor instead.+func (GetSchemaStringRequest_ObjectType) EnumDescriptor() ([]byte, []int) {+ return file_v1_database_service_proto_rawDescGZIP(), []int{67, 0}+}+type GetDatabaseRequest struct {state protoimpl.MessageState `protogen:"open.v1"`// The name of the database to retrieve.@@ -6169,6 +6236,122 @@ func (x *Changelog) GetType() Changelog_Type {return Changelog_TYPE_UNSPECIFIED}+type GetSchemaStringRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The name of the database.+ // Format: instances/{instance}/databases/{database}+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ Type GetSchemaStringRequest_ObjectType `protobuf:"varint,2,opt,name=type,proto3,enum=bytebase.v1.GetSchemaStringRequest_ObjectType" json:"type,omitempty"`+ // It's empty for DATABASE.+ Schema string `protobuf:"bytes,3,opt,name=schema,proto3" json:"schema,omitempty"`+ // It's empty for DATABASE and SCHEMA.+ Object string `protobuf:"bytes,4,opt,name=object,proto3" json:"object,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *GetSchemaStringRequest) Reset() {+ *x = GetSchemaStringRequest{}+ mi := &file_v1_database_service_proto_msgTypes[67]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *GetSchemaStringRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*GetSchemaStringRequest) ProtoMessage() {}++func (x *GetSchemaStringRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_database_service_proto_msgTypes[67]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use GetSchemaStringRequest.ProtoReflect.Descriptor instead.+func (*GetSchemaStringRequest) Descriptor() ([]byte, []int) {+ return file_v1_database_service_proto_rawDescGZIP(), []int{67}+}++func (x *GetSchemaStringRequest) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++func (x *GetSchemaStringRequest) GetType() GetSchemaStringRequest_ObjectType {+ if x != nil {+ return x.Type+ }+ return GetSchemaStringRequest_OBJECT_TYPE_UNSPECIFIED+}++func (x *GetSchemaStringRequest) GetSchema() string {+ if x != nil {+ return x.Schema+ }+ return ""+}++func (x *GetSchemaStringRequest) GetObject() string {+ if x != nil {+ return x.Object+ }+ return ""+}++type GetSchemaStringResponse struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ SchemaString string `protobuf:"bytes,1,opt,name=schema_string,json=schemaString,proto3" json:"schema_string,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *GetSchemaStringResponse) Reset() {+ *x = GetSchemaStringResponse{}+ mi := &file_v1_database_service_proto_msgTypes[68]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *GetSchemaStringResponse) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*GetSchemaStringResponse) ProtoMessage() {}++func (x *GetSchemaStringResponse) ProtoReflect() protoreflect.Message {+ mi := &file_v1_database_service_proto_msgTypes[68]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use GetSchemaStringResponse.ProtoReflect.Descriptor instead.+func (*GetSchemaStringResponse) Descriptor() ([]byte, []int) {+ return file_v1_database_service_proto_rawDescGZIP(), []int{68}+}++func (x *GetSchemaStringResponse) GetSchemaString() string {+ if x != nil {+ return x.SchemaString+ }+ return ""+}+var File_v1_database_service_proto protoreflect.FileDescriptorvar file_v1_database_service_proto_rawDesc = string([]byte{@@ -7179,7 +7362,33 @@ var file_v1_database_service_proto_rawDesc = string([]byte{0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61,0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x7d,0x2f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x7b, 0x63, 0x68, 0x61,- 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x7d, 0x2a, 0x81, 0x01, 0x0a, 0x14, 0x44, 0x61, 0x74, 0x61,+ 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x67, 0x7d, 0x22, 0xdd, 0x02, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53,+ 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65,+ 0x73, 0x74, 0x12, 0x32, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,+ 0x42, 0x1e, 0xe2, 0x41, 0x01, 0x02, 0xfa, 0x41, 0x17, 0x0a, 0x15, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,+ 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02,+ 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x74, 0x72, 0x69,+ 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,+ 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63,+ 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65,+ 0x6d, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01,+ 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x9a, 0x01, 0x0a, 0x0a, 0x4f,+ 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x4f, 0x42, 0x4a,+ 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,+ 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41,+ 0x53, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x41, 0x10, 0x02,+ 0x12, 0x09, 0x0a, 0x05, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x56,+ 0x49, 0x45, 0x57, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x4d, 0x41, 0x54, 0x45, 0x52, 0x49, 0x41,+ 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08,+ 0x46, 0x55, 0x4e, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x52,+ 0x4f, 0x43, 0x45, 0x44, 0x55, 0x52, 0x45, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x45, 0x51,+ 0x55, 0x45, 0x4e, 0x43, 0x45, 0x10, 0x08, 0x22, 0x3e, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x63,+ 0x68, 0x65, 0x6d, 0x61, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,+ 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x73, 0x74, 0x72,+ 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x6d,+ 0x61, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2a, 0x81, 0x01, 0x0a, 0x14, 0x44, 0x61, 0x74, 0x61,0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x56, 0x69, 0x65, 0x77,0x12, 0x26, 0x0a, 0x22, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x4d, 0x45, 0x54,0x41, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,@@ -7194,7 +7403,7 @@ var file_v1_database_service_proto_rawDesc = string([]byte{0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x4c, 0x4f, 0x47, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x42,0x41, 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45,0x4c, 0x4f, 0x47, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x02, 0x32,- 0xf3, 0x1a, 0x0a, 0x0f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76,+ 0xb0, 0x1c, 0x0a, 0x0f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76,0x69, 0x63, 0x65, 0x12, 0x90, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62,0x61, 0x73, 0x65, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71,@@ -7409,8 +7618,20 @@ var file_v1_database_service_proto_rawDesc = string([]byte{0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d,0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61,0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f,- 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,- 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xba, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68,+ 0x65, 0x6d, 0x61, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d,+ 0x61, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,+ 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70,+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5c, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xea, 0x30,+ 0x16, 0x62, 0x62, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2e, 0x67, 0x65,+ 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02,+ 0x31, 0x12, 0x2f, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73,+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,+ 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x74, 0x72, 0x69, 0x6e,+ 0x67, 0x7d, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d,+ 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,})var (@@ -7425,8 +7646,8 @@ func file_v1_database_service_proto_rawDescGZIP() []byte {return file_v1_database_service_proto_rawDescData}-var file_v1_database_service_proto_enumTypes = make([]protoimpl.EnumInfo, 10)-var file_v1_database_service_proto_msgTypes = make([]protoimpl.MessageInfo, 68)+var file_v1_database_service_proto_enumTypes = make([]protoimpl.EnumInfo, 11)+var file_v1_database_service_proto_msgTypes = make([]protoimpl.MessageInfo, 70)var file_v1_database_service_proto_goTypes = []any{(DatabaseMetadataView)(0), // 0: bytebase.v1.DatabaseMetadataView(ChangelogView)(0), // 1: bytebase.v1.ChangelogView@@ -7438,208 +7659,214 @@ var file_v1_database_service_proto_goTypes = []any{(StreamMetadata_Mode)(0), // 7: bytebase.v1.StreamMetadata.Mode(Changelog_Status)(0), // 8: bytebase.v1.Changelog.Status(Changelog_Type)(0), // 9: bytebase.v1.Changelog.Type- (*GetDatabaseRequest)(nil), // 10: bytebase.v1.GetDatabaseRequest- (*ListDatabasesRequest)(nil), // 11: bytebase.v1.ListDatabasesRequest- (*ListDatabasesResponse)(nil), // 12: bytebase.v1.ListDatabasesResponse- (*UpdateDatabaseRequest)(nil), // 13: bytebase.v1.UpdateDatabaseRequest- (*BatchUpdateDatabasesRequest)(nil), // 14: bytebase.v1.BatchUpdateDatabasesRequest- (*BatchUpdateDatabasesResponse)(nil), // 15: bytebase.v1.BatchUpdateDatabasesResponse- (*SyncDatabaseRequest)(nil), // 16: bytebase.v1.SyncDatabaseRequest- (*SyncDatabaseResponse)(nil), // 17: bytebase.v1.SyncDatabaseResponse- (*GetDatabaseMetadataRequest)(nil), // 18: bytebase.v1.GetDatabaseMetadataRequest- (*GetDatabaseSchemaRequest)(nil), // 19: bytebase.v1.GetDatabaseSchemaRequest- (*DiffSchemaRequest)(nil), // 20: bytebase.v1.DiffSchemaRequest- (*DiffSchemaResponse)(nil), // 21: bytebase.v1.DiffSchemaResponse- (*Database)(nil), // 22: bytebase.v1.Database- (*DatabaseMetadata)(nil), // 23: bytebase.v1.DatabaseMetadata- (*SchemaMetadata)(nil), // 24: bytebase.v1.SchemaMetadata- (*EnumTypeMetadata)(nil), // 25: bytebase.v1.EnumTypeMetadata- (*EventMetadata)(nil), // 26: bytebase.v1.EventMetadata- (*SequenceMetadata)(nil), // 27: bytebase.v1.SequenceMetadata- (*TriggerMetadata)(nil), // 28: bytebase.v1.TriggerMetadata- (*ExternalTableMetadata)(nil), // 29: bytebase.v1.ExternalTableMetadata- (*TableMetadata)(nil), // 30: bytebase.v1.TableMetadata- (*CheckConstraintMetadata)(nil), // 31: bytebase.v1.CheckConstraintMetadata- (*TablePartitionMetadata)(nil), // 32: bytebase.v1.TablePartitionMetadata- (*ColumnMetadata)(nil), // 33: bytebase.v1.ColumnMetadata- (*GenerationMetadata)(nil), // 34: bytebase.v1.GenerationMetadata- (*ViewMetadata)(nil), // 35: bytebase.v1.ViewMetadata- (*DependencyColumn)(nil), // 36: bytebase.v1.DependencyColumn- (*MaterializedViewMetadata)(nil), // 37: bytebase.v1.MaterializedViewMetadata- (*DependencyTable)(nil), // 38: bytebase.v1.DependencyTable- (*FunctionMetadata)(nil), // 39: bytebase.v1.FunctionMetadata- (*ProcedureMetadata)(nil), // 40: bytebase.v1.ProcedureMetadata- (*PackageMetadata)(nil), // 41: bytebase.v1.PackageMetadata- (*TaskMetadata)(nil), // 42: bytebase.v1.TaskMetadata- (*StreamMetadata)(nil), // 43: bytebase.v1.StreamMetadata- (*IndexMetadata)(nil), // 44: bytebase.v1.IndexMetadata- (*ExtensionMetadata)(nil), // 45: bytebase.v1.ExtensionMetadata- (*ForeignKeyMetadata)(nil), // 46: bytebase.v1.ForeignKeyMetadata- (*DatabaseSchema)(nil), // 47: bytebase.v1.DatabaseSchema- (*ListSlowQueriesRequest)(nil), // 48: bytebase.v1.ListSlowQueriesRequest- (*ListSlowQueriesResponse)(nil), // 49: bytebase.v1.ListSlowQueriesResponse- (*SlowQueryLog)(nil), // 50: bytebase.v1.SlowQueryLog- (*SlowQueryStatistics)(nil), // 51: bytebase.v1.SlowQueryStatistics- (*SlowQueryDetails)(nil), // 52: bytebase.v1.SlowQueryDetails- (*ListSecretsRequest)(nil), // 53: bytebase.v1.ListSecretsRequest- (*ListSecretsResponse)(nil), // 54: bytebase.v1.ListSecretsResponse- (*UpdateSecretRequest)(nil), // 55: bytebase.v1.UpdateSecretRequest- (*DeleteSecretRequest)(nil), // 56: bytebase.v1.DeleteSecretRequest- (*Secret)(nil), // 57: bytebase.v1.Secret- (*AdviseIndexRequest)(nil), // 58: bytebase.v1.AdviseIndexRequest- (*AdviseIndexResponse)(nil), // 59: bytebase.v1.AdviseIndexResponse- (*ChangedResources)(nil), // 60: bytebase.v1.ChangedResources- (*ChangedResourceDatabase)(nil), // 61: bytebase.v1.ChangedResourceDatabase- (*ChangedResourceSchema)(nil), // 62: bytebase.v1.ChangedResourceSchema- (*ChangedResourceTable)(nil), // 63: bytebase.v1.ChangedResourceTable- (*ChangedResourceView)(nil), // 64: bytebase.v1.ChangedResourceView- (*ChangedResourceFunction)(nil), // 65: bytebase.v1.ChangedResourceFunction- (*ChangedResourceProcedure)(nil), // 66: bytebase.v1.ChangedResourceProcedure- (*ListRevisionsRequest)(nil), // 67: bytebase.v1.ListRevisionsRequest- (*ListRevisionsResponse)(nil), // 68: bytebase.v1.ListRevisionsResponse- (*CreateRevisionRequest)(nil), // 69: bytebase.v1.CreateRevisionRequest- (*GetRevisionRequest)(nil), // 70: bytebase.v1.GetRevisionRequest- (*DeleteRevisionRequest)(nil), // 71: bytebase.v1.DeleteRevisionRequest- (*Revision)(nil), // 72: bytebase.v1.Revision- (*ListChangelogsRequest)(nil), // 73: bytebase.v1.ListChangelogsRequest- (*ListChangelogsResponse)(nil), // 74: bytebase.v1.ListChangelogsResponse- (*GetChangelogRequest)(nil), // 75: bytebase.v1.GetChangelogRequest- (*Changelog)(nil), // 76: bytebase.v1.Changelog- nil, // 77: bytebase.v1.Database.LabelsEntry- (*fieldmaskpb.FieldMask)(nil), // 78: google.protobuf.FieldMask- (State)(0), // 79: bytebase.v1.State- (*timestamppb.Timestamp)(nil), // 80: google.protobuf.Timestamp- (*InstanceResource)(nil), // 81: bytebase.v1.InstanceResource- (*durationpb.Duration)(nil), // 82: google.protobuf.Duration- (*Range)(nil), // 83: bytebase.v1.Range- (*emptypb.Empty)(nil), // 84: google.protobuf.Empty+ (GetSchemaStringRequest_ObjectType)(0), // 10: bytebase.v1.GetSchemaStringRequest.ObjectType+ (*GetDatabaseRequest)(nil), // 11: bytebase.v1.GetDatabaseRequest+ (*ListDatabasesRequest)(nil), // 12: bytebase.v1.ListDatabasesRequest+ (*ListDatabasesResponse)(nil), // 13: bytebase.v1.ListDatabasesResponse+ (*UpdateDatabaseRequest)(nil), // 14: bytebase.v1.UpdateDatabaseRequest+ (*BatchUpdateDatabasesRequest)(nil), // 15: bytebase.v1.BatchUpdateDatabasesRequest+ (*BatchUpdateDatabasesResponse)(nil), // 16: bytebase.v1.BatchUpdateDatabasesResponse+ (*SyncDatabaseRequest)(nil), // 17: bytebase.v1.SyncDatabaseRequest+ (*SyncDatabaseResponse)(nil), // 18: bytebase.v1.SyncDatabaseResponse+ (*GetDatabaseMetadataRequest)(nil), // 19: bytebase.v1.GetDatabaseMetadataRequest+ (*GetDatabaseSchemaRequest)(nil), // 20: bytebase.v1.GetDatabaseSchemaRequest+ (*DiffSchemaRequest)(nil), // 21: bytebase.v1.DiffSchemaRequest+ (*DiffSchemaResponse)(nil), // 22: bytebase.v1.DiffSchemaResponse+ (*Database)(nil), // 23: bytebase.v1.Database+ (*DatabaseMetadata)(nil), // 24: bytebase.v1.DatabaseMetadata+ (*SchemaMetadata)(nil), // 25: bytebase.v1.SchemaMetadata+ (*EnumTypeMetadata)(nil), // 26: bytebase.v1.EnumTypeMetadata+ (*EventMetadata)(nil), // 27: bytebase.v1.EventMetadata+ (*SequenceMetadata)(nil), // 28: bytebase.v1.SequenceMetadata+ (*TriggerMetadata)(nil), // 29: bytebase.v1.TriggerMetadata+ (*ExternalTableMetadata)(nil), // 30: bytebase.v1.ExternalTableMetadata+ (*TableMetadata)(nil), // 31: bytebase.v1.TableMetadata+ (*CheckConstraintMetadata)(nil), // 32: bytebase.v1.CheckConstraintMetadata+ (*TablePartitionMetadata)(nil), // 33: bytebase.v1.TablePartitionMetadata+ (*ColumnMetadata)(nil), // 34: bytebase.v1.ColumnMetadata+ (*GenerationMetadata)(nil), // 35: bytebase.v1.GenerationMetadata+ (*ViewMetadata)(nil), // 36: bytebase.v1.ViewMetadata+ (*DependencyColumn)(nil), // 37: bytebase.v1.DependencyColumn+ (*MaterializedViewMetadata)(nil), // 38: bytebase.v1.MaterializedViewMetadata+ (*DependencyTable)(nil), // 39: bytebase.v1.DependencyTable+ (*FunctionMetadata)(nil), // 40: bytebase.v1.FunctionMetadata+ (*ProcedureMetadata)(nil), // 41: bytebase.v1.ProcedureMetadata+ (*PackageMetadata)(nil), // 42: bytebase.v1.PackageMetadata+ (*TaskMetadata)(nil), // 43: bytebase.v1.TaskMetadata+ (*StreamMetadata)(nil), // 44: bytebase.v1.StreamMetadata+ (*IndexMetadata)(nil), // 45: bytebase.v1.IndexMetadata+ (*ExtensionMetadata)(nil), // 46: bytebase.v1.ExtensionMetadata+ (*ForeignKeyMetadata)(nil), // 47: bytebase.v1.ForeignKeyMetadata+ (*DatabaseSchema)(nil), // 48: bytebase.v1.DatabaseSchema+ (*ListSlowQueriesRequest)(nil), // 49: bytebase.v1.ListSlowQueriesRequest+ (*ListSlowQueriesResponse)(nil), // 50: bytebase.v1.ListSlowQueriesResponse+ (*SlowQueryLog)(nil), // 51: bytebase.v1.SlowQueryLog+ (*SlowQueryStatistics)(nil), // 52: bytebase.v1.SlowQueryStatistics+ (*SlowQueryDetails)(nil), // 53: bytebase.v1.SlowQueryDetails+ (*ListSecretsRequest)(nil), // 54: bytebase.v1.ListSecretsRequest+ (*ListSecretsResponse)(nil), // 55: bytebase.v1.ListSecretsResponse+ (*UpdateSecretRequest)(nil), // 56: bytebase.v1.UpdateSecretRequest+ (*DeleteSecretRequest)(nil), // 57: bytebase.v1.DeleteSecretRequest+ (*Secret)(nil), // 58: bytebase.v1.Secret+ (*AdviseIndexRequest)(nil), // 59: bytebase.v1.AdviseIndexRequest+ (*AdviseIndexResponse)(nil), // 60: bytebase.v1.AdviseIndexResponse+ (*ChangedResources)(nil), // 61: bytebase.v1.ChangedResources+ (*ChangedResourceDatabase)(nil), // 62: bytebase.v1.ChangedResourceDatabase+ (*ChangedResourceSchema)(nil), // 63: bytebase.v1.ChangedResourceSchema+ (*ChangedResourceTable)(nil), // 64: bytebase.v1.ChangedResourceTable+ (*ChangedResourceView)(nil), // 65: bytebase.v1.ChangedResourceView+ (*ChangedResourceFunction)(nil), // 66: bytebase.v1.ChangedResourceFunction+ (*ChangedResourceProcedure)(nil), // 67: bytebase.v1.ChangedResourceProcedure+ (*ListRevisionsRequest)(nil), // 68: bytebase.v1.ListRevisionsRequest+ (*ListRevisionsResponse)(nil), // 69: bytebase.v1.ListRevisionsResponse+ (*CreateRevisionRequest)(nil), // 70: bytebase.v1.CreateRevisionRequest+ (*GetRevisionRequest)(nil), // 71: bytebase.v1.GetRevisionRequest+ (*DeleteRevisionRequest)(nil), // 72: bytebase.v1.DeleteRevisionRequest+ (*Revision)(nil), // 73: bytebase.v1.Revision+ (*ListChangelogsRequest)(nil), // 74: bytebase.v1.ListChangelogsRequest+ (*ListChangelogsResponse)(nil), // 75: bytebase.v1.ListChangelogsResponse+ (*GetChangelogRequest)(nil), // 76: bytebase.v1.GetChangelogRequest+ (*Changelog)(nil), // 77: bytebase.v1.Changelog+ (*GetSchemaStringRequest)(nil), // 78: bytebase.v1.GetSchemaStringRequest+ (*GetSchemaStringResponse)(nil), // 79: bytebase.v1.GetSchemaStringResponse+ nil, // 80: bytebase.v1.Database.LabelsEntry+ (*fieldmaskpb.FieldMask)(nil), // 81: google.protobuf.FieldMask+ (State)(0), // 82: bytebase.v1.State+ (*timestamppb.Timestamp)(nil), // 83: google.protobuf.Timestamp+ (*InstanceResource)(nil), // 84: bytebase.v1.InstanceResource+ (*durationpb.Duration)(nil), // 85: google.protobuf.Duration+ (*Range)(nil), // 86: bytebase.v1.Range+ (*emptypb.Empty)(nil), // 87: google.protobuf.Empty}var file_v1_database_service_proto_depIdxs = []int32{- 22, // 0: bytebase.v1.ListDatabasesResponse.databases:type_name -> bytebase.v1.Database- 22, // 1: bytebase.v1.UpdateDatabaseRequest.database:type_name -> bytebase.v1.Database- 78, // 2: bytebase.v1.UpdateDatabaseRequest.update_mask:type_name -> google.protobuf.FieldMask- 13, // 3: bytebase.v1.BatchUpdateDatabasesRequest.requests:type_name -> bytebase.v1.UpdateDatabaseRequest- 22, // 4: bytebase.v1.BatchUpdateDatabasesResponse.databases:type_name -> bytebase.v1.Database+ 23, // 0: bytebase.v1.ListDatabasesResponse.databases:type_name -> bytebase.v1.Database+ 23, // 1: bytebase.v1.UpdateDatabaseRequest.database:type_name -> bytebase.v1.Database+ 81, // 2: bytebase.v1.UpdateDatabaseRequest.update_mask:type_name -> google.protobuf.FieldMask+ 14, // 3: bytebase.v1.BatchUpdateDatabasesRequest.requests:type_name -> bytebase.v1.UpdateDatabaseRequest+ 23, // 4: bytebase.v1.BatchUpdateDatabasesResponse.databases:type_name -> bytebase.v1.Database0, // 5: bytebase.v1.GetDatabaseMetadataRequest.view:type_name -> bytebase.v1.DatabaseMetadataView- 79, // 6: bytebase.v1.Database.state:type_name -> bytebase.v1.State- 80, // 7: bytebase.v1.Database.successful_sync_time:type_name -> google.protobuf.Timestamp- 77, // 8: bytebase.v1.Database.labels:type_name -> bytebase.v1.Database.LabelsEntry- 81, // 9: bytebase.v1.Database.instance_resource:type_name -> bytebase.v1.InstanceResource- 24, // 10: bytebase.v1.DatabaseMetadata.schemas:type_name -> bytebase.v1.SchemaMetadata- 45, // 11: bytebase.v1.DatabaseMetadata.extensions:type_name -> bytebase.v1.ExtensionMetadata- 30, // 12: bytebase.v1.SchemaMetadata.tables:type_name -> bytebase.v1.TableMetadata- 29, // 13: bytebase.v1.SchemaMetadata.external_tables:type_name -> bytebase.v1.ExternalTableMetadata- 35, // 14: bytebase.v1.SchemaMetadata.views:type_name -> bytebase.v1.ViewMetadata- 39, // 15: bytebase.v1.SchemaMetadata.functions:type_name -> bytebase.v1.FunctionMetadata- 40, // 16: bytebase.v1.SchemaMetadata.procedures:type_name -> bytebase.v1.ProcedureMetadata- 43, // 17: bytebase.v1.SchemaMetadata.streams:type_name -> bytebase.v1.StreamMetadata- 42, // 18: bytebase.v1.SchemaMetadata.tasks:type_name -> bytebase.v1.TaskMetadata- 37, // 19: bytebase.v1.SchemaMetadata.materialized_views:type_name -> bytebase.v1.MaterializedViewMetadata- 41, // 20: bytebase.v1.SchemaMetadata.packages:type_name -> bytebase.v1.PackageMetadata- 27, // 21: bytebase.v1.SchemaMetadata.sequences:type_name -> bytebase.v1.SequenceMetadata- 26, // 22: bytebase.v1.SchemaMetadata.events:type_name -> bytebase.v1.EventMetadata- 25, // 23: bytebase.v1.SchemaMetadata.enum_types:type_name -> bytebase.v1.EnumTypeMetadata- 33, // 24: bytebase.v1.ExternalTableMetadata.columns:type_name -> bytebase.v1.ColumnMetadata- 33, // 25: bytebase.v1.TableMetadata.columns:type_name -> bytebase.v1.ColumnMetadata- 44, // 26: bytebase.v1.TableMetadata.indexes:type_name -> bytebase.v1.IndexMetadata- 46, // 27: bytebase.v1.TableMetadata.foreign_keys:type_name -> bytebase.v1.ForeignKeyMetadata- 32, // 28: bytebase.v1.TableMetadata.partitions:type_name -> bytebase.v1.TablePartitionMetadata- 31, // 29: bytebase.v1.TableMetadata.check_constraints:type_name -> bytebase.v1.CheckConstraintMetadata- 28, // 30: bytebase.v1.TableMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata+ 82, // 6: bytebase.v1.Database.state:type_name -> bytebase.v1.State+ 83, // 7: bytebase.v1.Database.successful_sync_time:type_name -> google.protobuf.Timestamp+ 80, // 8: bytebase.v1.Database.labels:type_name -> bytebase.v1.Database.LabelsEntry+ 84, // 9: bytebase.v1.Database.instance_resource:type_name -> bytebase.v1.InstanceResource+ 25, // 10: bytebase.v1.DatabaseMetadata.schemas:type_name -> bytebase.v1.SchemaMetadata+ 46, // 11: bytebase.v1.DatabaseMetadata.extensions:type_name -> bytebase.v1.ExtensionMetadata+ 31, // 12: bytebase.v1.SchemaMetadata.tables:type_name -> bytebase.v1.TableMetadata+ 30, // 13: bytebase.v1.SchemaMetadata.external_tables:type_name -> bytebase.v1.ExternalTableMetadata+ 36, // 14: bytebase.v1.SchemaMetadata.views:type_name -> bytebase.v1.ViewMetadata+ 40, // 15: bytebase.v1.SchemaMetadata.functions:type_name -> bytebase.v1.FunctionMetadata+ 41, // 16: bytebase.v1.SchemaMetadata.procedures:type_name -> bytebase.v1.ProcedureMetadata+ 44, // 17: bytebase.v1.SchemaMetadata.streams:type_name -> bytebase.v1.StreamMetadata+ 43, // 18: bytebase.v1.SchemaMetadata.tasks:type_name -> bytebase.v1.TaskMetadata+ 38, // 19: bytebase.v1.SchemaMetadata.materialized_views:type_name -> bytebase.v1.MaterializedViewMetadata+ 42, // 20: bytebase.v1.SchemaMetadata.packages:type_name -> bytebase.v1.PackageMetadata+ 28, // 21: bytebase.v1.SchemaMetadata.sequences:type_name -> bytebase.v1.SequenceMetadata+ 27, // 22: bytebase.v1.SchemaMetadata.events:type_name -> bytebase.v1.EventMetadata+ 26, // 23: bytebase.v1.SchemaMetadata.enum_types:type_name -> bytebase.v1.EnumTypeMetadata+ 34, // 24: bytebase.v1.ExternalTableMetadata.columns:type_name -> bytebase.v1.ColumnMetadata+ 34, // 25: bytebase.v1.TableMetadata.columns:type_name -> bytebase.v1.ColumnMetadata+ 45, // 26: bytebase.v1.TableMetadata.indexes:type_name -> bytebase.v1.IndexMetadata+ 47, // 27: bytebase.v1.TableMetadata.foreign_keys:type_name -> bytebase.v1.ForeignKeyMetadata+ 33, // 28: bytebase.v1.TableMetadata.partitions:type_name -> bytebase.v1.TablePartitionMetadata+ 32, // 29: bytebase.v1.TableMetadata.check_constraints:type_name -> bytebase.v1.CheckConstraintMetadata+ 29, // 30: bytebase.v1.TableMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata2, // 31: bytebase.v1.TablePartitionMetadata.type:type_name -> bytebase.v1.TablePartitionMetadata.Type- 32, // 32: bytebase.v1.TablePartitionMetadata.subpartitions:type_name -> bytebase.v1.TablePartitionMetadata- 44, // 33: bytebase.v1.TablePartitionMetadata.indexes:type_name -> bytebase.v1.IndexMetadata- 34, // 34: bytebase.v1.ColumnMetadata.generation:type_name -> bytebase.v1.GenerationMetadata+ 33, // 32: bytebase.v1.TablePartitionMetadata.subpartitions:type_name -> bytebase.v1.TablePartitionMetadata+ 45, // 33: bytebase.v1.TablePartitionMetadata.indexes:type_name -> bytebase.v1.IndexMetadata+ 35, // 34: bytebase.v1.ColumnMetadata.generation:type_name -> bytebase.v1.GenerationMetadata3, // 35: bytebase.v1.ColumnMetadata.identity_generation:type_name -> bytebase.v1.ColumnMetadata.IdentityGeneration4, // 36: bytebase.v1.GenerationMetadata.type:type_name -> bytebase.v1.GenerationMetadata.Type- 36, // 37: bytebase.v1.ViewMetadata.dependency_columns:type_name -> bytebase.v1.DependencyColumn- 33, // 38: bytebase.v1.ViewMetadata.columns:type_name -> bytebase.v1.ColumnMetadata- 28, // 39: bytebase.v1.ViewMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata- 36, // 40: bytebase.v1.MaterializedViewMetadata.dependency_columns:type_name -> bytebase.v1.DependencyColumn- 28, // 41: bytebase.v1.MaterializedViewMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata- 44, // 42: bytebase.v1.MaterializedViewMetadata.indexes:type_name -> bytebase.v1.IndexMetadata- 38, // 43: bytebase.v1.FunctionMetadata.dependency_tables:type_name -> bytebase.v1.DependencyTable+ 37, // 37: bytebase.v1.ViewMetadata.dependency_columns:type_name -> bytebase.v1.DependencyColumn+ 34, // 38: bytebase.v1.ViewMetadata.columns:type_name -> bytebase.v1.ColumnMetadata+ 29, // 39: bytebase.v1.ViewMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata+ 37, // 40: bytebase.v1.MaterializedViewMetadata.dependency_columns:type_name -> bytebase.v1.DependencyColumn+ 29, // 41: bytebase.v1.MaterializedViewMetadata.triggers:type_name -> bytebase.v1.TriggerMetadata+ 45, // 42: bytebase.v1.MaterializedViewMetadata.indexes:type_name -> bytebase.v1.IndexMetadata+ 39, // 43: bytebase.v1.FunctionMetadata.dependency_tables:type_name -> bytebase.v1.DependencyTable5, // 44: bytebase.v1.TaskMetadata.state:type_name -> bytebase.v1.TaskMetadata.State6, // 45: bytebase.v1.StreamMetadata.type:type_name -> bytebase.v1.StreamMetadata.Type7, // 46: bytebase.v1.StreamMetadata.mode:type_name -> bytebase.v1.StreamMetadata.Mode- 50, // 47: bytebase.v1.ListSlowQueriesResponse.slow_query_logs:type_name -> bytebase.v1.SlowQueryLog- 51, // 48: bytebase.v1.SlowQueryLog.statistics:type_name -> bytebase.v1.SlowQueryStatistics- 80, // 49: bytebase.v1.SlowQueryStatistics.latest_log_time:type_name -> google.protobuf.Timestamp- 82, // 50: bytebase.v1.SlowQueryStatistics.average_query_time:type_name -> google.protobuf.Duration- 82, // 51: bytebase.v1.SlowQueryStatistics.maximum_query_time:type_name -> google.protobuf.Duration- 52, // 52: bytebase.v1.SlowQueryStatistics.samples:type_name -> bytebase.v1.SlowQueryDetails- 80, // 53: bytebase.v1.SlowQueryDetails.start_time:type_name -> google.protobuf.Timestamp- 82, // 54: bytebase.v1.SlowQueryDetails.query_time:type_name -> google.protobuf.Duration- 82, // 55: bytebase.v1.SlowQueryDetails.lock_time:type_name -> google.protobuf.Duration- 57, // 56: bytebase.v1.ListSecretsResponse.secrets:type_name -> bytebase.v1.Secret- 57, // 57: bytebase.v1.UpdateSecretRequest.secret:type_name -> bytebase.v1.Secret- 78, // 58: bytebase.v1.UpdateSecretRequest.update_mask:type_name -> google.protobuf.FieldMask- 80, // 59: bytebase.v1.Secret.created_time:type_name -> google.protobuf.Timestamp- 80, // 60: bytebase.v1.Secret.updated_time:type_name -> google.protobuf.Timestamp- 61, // 61: bytebase.v1.ChangedResources.databases:type_name -> bytebase.v1.ChangedResourceDatabase- 62, // 62: bytebase.v1.ChangedResourceDatabase.schemas:type_name -> bytebase.v1.ChangedResourceSchema- 63, // 63: bytebase.v1.ChangedResourceSchema.tables:type_name -> bytebase.v1.ChangedResourceTable- 64, // 64: bytebase.v1.ChangedResourceSchema.views:type_name -> bytebase.v1.ChangedResourceView- 65, // 65: bytebase.v1.ChangedResourceSchema.functions:type_name -> bytebase.v1.ChangedResourceFunction- 66, // 66: bytebase.v1.ChangedResourceSchema.procedures:type_name -> bytebase.v1.ChangedResourceProcedure- 83, // 67: bytebase.v1.ChangedResourceTable.ranges:type_name -> bytebase.v1.Range- 83, // 68: bytebase.v1.ChangedResourceView.ranges:type_name -> bytebase.v1.Range- 83, // 69: bytebase.v1.ChangedResourceFunction.ranges:type_name -> bytebase.v1.Range- 83, // 70: bytebase.v1.ChangedResourceProcedure.ranges:type_name -> bytebase.v1.Range- 72, // 71: bytebase.v1.ListRevisionsResponse.revisions:type_name -> bytebase.v1.Revision- 72, // 72: bytebase.v1.CreateRevisionRequest.revision:type_name -> bytebase.v1.Revision- 80, // 73: bytebase.v1.Revision.create_time:type_name -> google.protobuf.Timestamp- 80, // 74: bytebase.v1.Revision.delete_time:type_name -> google.protobuf.Timestamp+ 51, // 47: bytebase.v1.ListSlowQueriesResponse.slow_query_logs:type_name -> bytebase.v1.SlowQueryLog+ 52, // 48: bytebase.v1.SlowQueryLog.statistics:type_name -> bytebase.v1.SlowQueryStatistics+ 83, // 49: bytebase.v1.SlowQueryStatistics.latest_log_time:type_name -> google.protobuf.Timestamp+ 85, // 50: bytebase.v1.SlowQueryStatistics.average_query_time:type_name -> google.protobuf.Duration+ 85, // 51: bytebase.v1.SlowQueryStatistics.maximum_query_time:type_name -> google.protobuf.Duration+ 53, // 52: bytebase.v1.SlowQueryStatistics.samples:type_name -> bytebase.v1.SlowQueryDetails+ 83, // 53: bytebase.v1.SlowQueryDetails.start_time:type_name -> google.protobuf.Timestamp+ 85, // 54: bytebase.v1.SlowQueryDetails.query_time:type_name -> google.protobuf.Duration+ 85, // 55: bytebase.v1.SlowQueryDetails.lock_time:type_name -> google.protobuf.Duration+ 58, // 56: bytebase.v1.ListSecretsResponse.secrets:type_name -> bytebase.v1.Secret+ 58, // 57: bytebase.v1.UpdateSecretRequest.secret:type_name -> bytebase.v1.Secret+ 81, // 58: bytebase.v1.UpdateSecretRequest.update_mask:type_name -> google.protobuf.FieldMask+ 83, // 59: bytebase.v1.Secret.created_time:type_name -> google.protobuf.Timestamp+ 83, // 60: bytebase.v1.Secret.updated_time:type_name -> google.protobuf.Timestamp+ 62, // 61: bytebase.v1.ChangedResources.databases:type_name -> bytebase.v1.ChangedResourceDatabase+ 63, // 62: bytebase.v1.ChangedResourceDatabase.schemas:type_name -> bytebase.v1.ChangedResourceSchema+ 64, // 63: bytebase.v1.ChangedResourceSchema.tables:type_name -> bytebase.v1.ChangedResourceTable+ 65, // 64: bytebase.v1.ChangedResourceSchema.views:type_name -> bytebase.v1.ChangedResourceView+ 66, // 65: bytebase.v1.ChangedResourceSchema.functions:type_name -> bytebase.v1.ChangedResourceFunction+ 67, // 66: bytebase.v1.ChangedResourceSchema.procedures:type_name -> bytebase.v1.ChangedResourceProcedure+ 86, // 67: bytebase.v1.ChangedResourceTable.ranges:type_name -> bytebase.v1.Range+ 86, // 68: bytebase.v1.ChangedResourceView.ranges:type_name -> bytebase.v1.Range+ 86, // 69: bytebase.v1.ChangedResourceFunction.ranges:type_name -> bytebase.v1.Range+ 86, // 70: bytebase.v1.ChangedResourceProcedure.ranges:type_name -> bytebase.v1.Range+ 73, // 71: bytebase.v1.ListRevisionsResponse.revisions:type_name -> bytebase.v1.Revision+ 73, // 72: bytebase.v1.CreateRevisionRequest.revision:type_name -> bytebase.v1.Revision+ 83, // 73: bytebase.v1.Revision.create_time:type_name -> google.protobuf.Timestamp+ 83, // 74: bytebase.v1.Revision.delete_time:type_name -> google.protobuf.Timestamp1, // 75: bytebase.v1.ListChangelogsRequest.view:type_name -> bytebase.v1.ChangelogView- 76, // 76: bytebase.v1.ListChangelogsResponse.changelogs:type_name -> bytebase.v1.Changelog+ 77, // 76: bytebase.v1.ListChangelogsResponse.changelogs:type_name -> bytebase.v1.Changelog1, // 77: bytebase.v1.GetChangelogRequest.view:type_name -> bytebase.v1.ChangelogView- 80, // 78: bytebase.v1.Changelog.create_time:type_name -> google.protobuf.Timestamp+ 83, // 78: bytebase.v1.Changelog.create_time:type_name -> google.protobuf.Timestamp8, // 79: bytebase.v1.Changelog.status:type_name -> bytebase.v1.Changelog.Status- 60, // 80: bytebase.v1.Changelog.changed_resources:type_name -> bytebase.v1.ChangedResources+ 61, // 80: bytebase.v1.Changelog.changed_resources:type_name -> bytebase.v1.ChangedResources9, // 81: bytebase.v1.Changelog.type:type_name -> bytebase.v1.Changelog.Type- 10, // 82: bytebase.v1.DatabaseService.GetDatabase:input_type -> bytebase.v1.GetDatabaseRequest- 11, // 83: bytebase.v1.DatabaseService.ListDatabases:input_type -> bytebase.v1.ListDatabasesRequest- 13, // 84: bytebase.v1.DatabaseService.UpdateDatabase:input_type -> bytebase.v1.UpdateDatabaseRequest- 14, // 85: bytebase.v1.DatabaseService.BatchUpdateDatabases:input_type -> bytebase.v1.BatchUpdateDatabasesRequest- 16, // 86: bytebase.v1.DatabaseService.SyncDatabase:input_type -> bytebase.v1.SyncDatabaseRequest- 18, // 87: bytebase.v1.DatabaseService.GetDatabaseMetadata:input_type -> bytebase.v1.GetDatabaseMetadataRequest- 19, // 88: bytebase.v1.DatabaseService.GetDatabaseSchema:input_type -> bytebase.v1.GetDatabaseSchemaRequest- 20, // 89: bytebase.v1.DatabaseService.DiffSchema:input_type -> bytebase.v1.DiffSchemaRequest- 48, // 90: bytebase.v1.DatabaseService.ListSlowQueries:input_type -> bytebase.v1.ListSlowQueriesRequest- 53, // 91: bytebase.v1.DatabaseService.ListSecrets:input_type -> bytebase.v1.ListSecretsRequest- 55, // 92: bytebase.v1.DatabaseService.UpdateSecret:input_type -> bytebase.v1.UpdateSecretRequest- 56, // 93: bytebase.v1.DatabaseService.DeleteSecret:input_type -> bytebase.v1.DeleteSecretRequest- 58, // 94: bytebase.v1.DatabaseService.AdviseIndex:input_type -> bytebase.v1.AdviseIndexRequest- 67, // 95: bytebase.v1.DatabaseService.ListRevisions:input_type -> bytebase.v1.ListRevisionsRequest- 70, // 96: bytebase.v1.DatabaseService.GetRevision:input_type -> bytebase.v1.GetRevisionRequest- 69, // 97: bytebase.v1.DatabaseService.CreateRevision:input_type -> bytebase.v1.CreateRevisionRequest- 71, // 98: bytebase.v1.DatabaseService.DeleteRevision:input_type -> bytebase.v1.DeleteRevisionRequest- 73, // 99: bytebase.v1.DatabaseService.ListChangelogs:input_type -> bytebase.v1.ListChangelogsRequest- 75, // 100: bytebase.v1.DatabaseService.GetChangelog:input_type -> bytebase.v1.GetChangelogRequest- 22, // 101: bytebase.v1.DatabaseService.GetDatabase:output_type -> bytebase.v1.Database- 12, // 102: bytebase.v1.DatabaseService.ListDatabases:output_type -> bytebase.v1.ListDatabasesResponse- 22, // 103: bytebase.v1.DatabaseService.UpdateDatabase:output_type -> bytebase.v1.Database- 15, // 104: bytebase.v1.DatabaseService.BatchUpdateDatabases:output_type -> bytebase.v1.BatchUpdateDatabasesResponse- 17, // 105: bytebase.v1.DatabaseService.SyncDatabase:output_type -> bytebase.v1.SyncDatabaseResponse- 23, // 106: bytebase.v1.DatabaseService.GetDatabaseMetadata:output_type -> bytebase.v1.DatabaseMetadata- 47, // 107: bytebase.v1.DatabaseService.GetDatabaseSchema:output_type -> bytebase.v1.DatabaseSchema- 21, // 108: bytebase.v1.DatabaseService.DiffSchema:output_type -> bytebase.v1.DiffSchemaResponse- 49, // 109: bytebase.v1.DatabaseService.ListSlowQueries:output_type -> bytebase.v1.ListSlowQueriesResponse- 54, // 110: bytebase.v1.DatabaseService.ListSecrets:output_type -> bytebase.v1.ListSecretsResponse- 57, // 111: bytebase.v1.DatabaseService.UpdateSecret:output_type -> bytebase.v1.Secret- 84, // 112: bytebase.v1.DatabaseService.DeleteSecret:output_type -> google.protobuf.Empty- 59, // 113: bytebase.v1.DatabaseService.AdviseIndex:output_type -> bytebase.v1.AdviseIndexResponse- 68, // 114: bytebase.v1.DatabaseService.ListRevisions:output_type -> bytebase.v1.ListRevisionsResponse- 72, // 115: bytebase.v1.DatabaseService.GetRevision:output_type -> bytebase.v1.Revision- 72, // 116: bytebase.v1.DatabaseService.CreateRevision:output_type -> bytebase.v1.Revision- 84, // 117: bytebase.v1.DatabaseService.DeleteRevision:output_type -> google.protobuf.Empty- 74, // 118: bytebase.v1.DatabaseService.ListChangelogs:output_type -> bytebase.v1.ListChangelogsResponse- 76, // 119: bytebase.v1.DatabaseService.GetChangelog:output_type -> bytebase.v1.Changelog- 101, // [101:120] is the sub-list for method output_type- 82, // [82:101] is the sub-list for method input_type- 82, // [82:82] is the sub-list for extension type_name- 82, // [82:82] is the sub-list for extension extendee- 0, // [0:82] is the sub-list for field type_name+ 10, // 82: bytebase.v1.GetSchemaStringRequest.type:type_name -> bytebase.v1.GetSchemaStringRequest.ObjectType+ 11, // 83: bytebase.v1.DatabaseService.GetDatabase:input_type -> bytebase.v1.GetDatabaseRequest+ 12, // 84: bytebase.v1.DatabaseService.ListDatabases:input_type -> bytebase.v1.ListDatabasesRequest+ 14, // 85: bytebase.v1.DatabaseService.UpdateDatabase:input_type -> bytebase.v1.UpdateDatabaseRequest+ 15, // 86: bytebase.v1.DatabaseService.BatchUpdateDatabases:input_type -> bytebase.v1.BatchUpdateDatabasesRequest+ 17, // 87: bytebase.v1.DatabaseService.SyncDatabase:input_type -> bytebase.v1.SyncDatabaseRequest+ 19, // 88: bytebase.v1.DatabaseService.GetDatabaseMetadata:input_type -> bytebase.v1.GetDatabaseMetadataRequest+ 20, // 89: bytebase.v1.DatabaseService.GetDatabaseSchema:input_type -> bytebase.v1.GetDatabaseSchemaRequest+ 21, // 90: bytebase.v1.DatabaseService.DiffSchema:input_type -> bytebase.v1.DiffSchemaRequest+ 49, // 91: bytebase.v1.DatabaseService.ListSlowQueries:input_type -> bytebase.v1.ListSlowQueriesRequest+ 54, // 92: bytebase.v1.DatabaseService.ListSecrets:input_type -> bytebase.v1.ListSecretsRequest+ 56, // 93: bytebase.v1.DatabaseService.UpdateSecret:input_type -> bytebase.v1.UpdateSecretRequest+ 57, // 94: bytebase.v1.DatabaseService.DeleteSecret:input_type -> bytebase.v1.DeleteSecretRequest+ 59, // 95: bytebase.v1.DatabaseService.AdviseIndex:input_type -> bytebase.v1.AdviseIndexRequest+ 68, // 96: bytebase.v1.DatabaseService.ListRevisions:input_type -> bytebase.v1.ListRevisionsRequest+ 71, // 97: bytebase.v1.DatabaseService.GetRevision:input_type -> bytebase.v1.GetRevisionRequest+ 70, // 98: bytebase.v1.DatabaseService.CreateRevision:input_type -> bytebase.v1.CreateRevisionRequest+ 72, // 99: bytebase.v1.DatabaseService.DeleteRevision:input_type -> bytebase.v1.DeleteRevisionRequest+ 74, // 100: bytebase.v1.DatabaseService.ListChangelogs:input_type -> bytebase.v1.ListChangelogsRequest+ 76, // 101: bytebase.v1.DatabaseService.GetChangelog:input_type -> bytebase.v1.GetChangelogRequest+ 78, // 102: bytebase.v1.DatabaseService.GetSchemaString:input_type -> bytebase.v1.GetSchemaStringRequest+ 23, // 103: bytebase.v1.DatabaseService.GetDatabase:output_type -> bytebase.v1.Database+ 13, // 104: bytebase.v1.DatabaseService.ListDatabases:output_type -> bytebase.v1.ListDatabasesResponse+ 23, // 105: bytebase.v1.DatabaseService.UpdateDatabase:output_type -> bytebase.v1.Database+ 16, // 106: bytebase.v1.DatabaseService.BatchUpdateDatabases:output_type -> bytebase.v1.BatchUpdateDatabasesResponse+ 18, // 107: bytebase.v1.DatabaseService.SyncDatabase:output_type -> bytebase.v1.SyncDatabaseResponse+ 24, // 108: bytebase.v1.DatabaseService.GetDatabaseMetadata:output_type -> bytebase.v1.DatabaseMetadata+ 48, // 109: bytebase.v1.DatabaseService.GetDatabaseSchema:output_type -> bytebase.v1.DatabaseSchema+ 22, // 110: bytebase.v1.DatabaseService.DiffSchema:output_type -> bytebase.v1.DiffSchemaResponse+ 50, // 111: bytebase.v1.DatabaseService.ListSlowQueries:output_type -> bytebase.v1.ListSlowQueriesResponse+ 55, // 112: bytebase.v1.DatabaseService.ListSecrets:output_type -> bytebase.v1.ListSecretsResponse+ 58, // 113: bytebase.v1.DatabaseService.UpdateSecret:output_type -> bytebase.v1.Secret+ 87, // 114: bytebase.v1.DatabaseService.DeleteSecret:output_type -> google.protobuf.Empty+ 60, // 115: bytebase.v1.DatabaseService.AdviseIndex:output_type -> bytebase.v1.AdviseIndexResponse+ 69, // 116: bytebase.v1.DatabaseService.ListRevisions:output_type -> bytebase.v1.ListRevisionsResponse+ 73, // 117: bytebase.v1.DatabaseService.GetRevision:output_type -> bytebase.v1.Revision+ 73, // 118: bytebase.v1.DatabaseService.CreateRevision:output_type -> bytebase.v1.Revision+ 87, // 119: bytebase.v1.DatabaseService.DeleteRevision:output_type -> google.protobuf.Empty+ 75, // 120: bytebase.v1.DatabaseService.ListChangelogs:output_type -> bytebase.v1.ListChangelogsResponse+ 77, // 121: bytebase.v1.DatabaseService.GetChangelog:output_type -> bytebase.v1.Changelog+ 79, // 122: bytebase.v1.DatabaseService.GetSchemaString:output_type -> bytebase.v1.GetSchemaStringResponse+ 103, // [103:123] is the sub-list for method output_type+ 83, // [83:103] is the sub-list for method input_type+ 83, // [83:83] is the sub-list for extension type_name+ 83, // [83:83] is the sub-list for extension extendee+ 0, // [0:83] is the sub-list for field type_name}func init() { file_v1_database_service_proto_init() }@@ -7664,8 +7891,8 @@ func file_v1_database_service_proto_init() {File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_database_service_proto_rawDesc), len(file_v1_database_service_proto_rawDesc)),- NumEnums: 10,- NumMessages: 68,+ NumEnums: 11,+ NumMessages: 70,NumExtensions: 0,NumServices: 1,},diff --git a/proto/generated-go/v1/database_service.pb.gw.go b/proto/generated-go/v1/database_service.pb.gw.goindex 9be87bd0d5..f0e867d957 100644--- a/proto/generated-go/v1/database_service.pb.gw.go+++ b/proto/generated-go/v1/database_service.pb.gw.go@@ -1110,6 +1110,57 @@ func local_request_DatabaseService_GetChangelog_0(ctx context.Context, marshalerreturn msg, metadata, err}+var filter_DatabaseService_GetSchemaString_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}++func request_DatabaseService_GetSchemaString_0(ctx context.Context, marshaler runtime.Marshaler, client DatabaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq GetSchemaStringRequest+ metadata runtime.ServerMetadata+ err error+ )+ io.Copy(io.Discard, req.Body)+ val, ok := pathParams["name"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")+ }+ protoReq.Name, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_DatabaseService_GetSchemaString_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := client.GetSchemaString(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_DatabaseService_GetSchemaString_0(ctx context.Context, marshaler runtime.Marshaler, server DatabaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq GetSchemaStringRequest+ metadata runtime.ServerMetadata+ err error+ )+ val, ok := pathParams["name"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")+ }+ protoReq.Name, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)+ }+ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_DatabaseService_GetSchemaString_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := server.GetSchemaString(ctx, &protoReq)+ return msg, metadata, err+}+// RegisterDatabaseServiceHandlerServer registers the http handlers for service DatabaseService to "mux".// UnaryRPC :call DatabaseServiceServer directly.// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.@@ -1556,6 +1607,26 @@ func RegisterDatabaseServiceHandlerServer(ctx context.Context, mux *runtime.Serv}forward_DatabaseService_GetChangelog_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)})+ mux.Handle(http.MethodGet, pattern_DatabaseService_GetSchemaString_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.DatabaseService/GetSchemaString", runtime.WithHTTPPathPattern("/v1/{name=instances/*/databases/*/schemaString}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_DatabaseService_GetSchemaString_0(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_DatabaseService_GetSchemaString_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })return nil}@@ -1970,6 +2041,23 @@ func RegisterDatabaseServiceHandlerClient(ctx context.Context, mux *runtime.Serv}forward_DatabaseService_GetChangelog_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)})+ mux.Handle(http.MethodGet, pattern_DatabaseService_GetSchemaString_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.DatabaseService/GetSchemaString", runtime.WithHTTPPathPattern("/v1/{name=instances/*/databases/*/schemaString}"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_DatabaseService_GetSchemaString_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_DatabaseService_GetSchemaString_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })return nil}@@ -1996,6 +2084,7 @@ var (pattern_DatabaseService_DeleteRevision_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4}, []string{"v1", "instances", "databases", "revisions", "name"}, ""))pattern_DatabaseService_ListChangelogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3, 2, 4}, []string{"v1", "instances", "databases", "parent", "changelogs"}, ""))pattern_DatabaseService_GetChangelog_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4}, []string{"v1", "instances", "databases", "changelogs", "name"}, ""))+ pattern_DatabaseService_GetSchemaString_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 4, 5, 5, 4}, []string{"v1", "instances", "databases", "schemaString", "name"}, "")))var (@@ -2021,4 +2110,5 @@ var (forward_DatabaseService_DeleteRevision_0 = runtime.ForwardResponseMessageforward_DatabaseService_ListChangelogs_0 = runtime.ForwardResponseMessageforward_DatabaseService_GetChangelog_0 = runtime.ForwardResponseMessage+ forward_DatabaseService_GetSchemaString_0 = runtime.ForwardResponseMessage)diff --git a/proto/generated-go/v1/database_service_grpc.pb.go b/proto/generated-go/v1/database_service_grpc.pb.goindex 6ce47f7b62..2cd80bb4f8 100644--- a/proto/generated-go/v1/database_service_grpc.pb.go+++ b/proto/generated-go/v1/database_service_grpc.pb.go@@ -39,6 +39,7 @@ const (DatabaseService_DeleteRevision_FullMethodName = "/bytebase.v1.DatabaseService/DeleteRevision"DatabaseService_ListChangelogs_FullMethodName = "/bytebase.v1.DatabaseService/ListChangelogs"DatabaseService_GetChangelog_FullMethodName = "/bytebase.v1.DatabaseService/GetChangelog"+ DatabaseService_GetSchemaString_FullMethodName = "/bytebase.v1.DatabaseService/GetSchemaString")// DatabaseServiceClient is the client API for DatabaseService service.@@ -64,6 +65,7 @@ type DatabaseServiceClient interface {DeleteRevision(ctx context.Context, in *DeleteRevisionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)ListChangelogs(ctx context.Context, in *ListChangelogsRequest, opts ...grpc.CallOption) (*ListChangelogsResponse, error)GetChangelog(ctx context.Context, in *GetChangelogRequest, opts ...grpc.CallOption) (*Changelog, error)+ GetSchemaString(ctx context.Context, in *GetSchemaStringRequest, opts ...grpc.CallOption) (*GetSchemaStringResponse, error)}type databaseServiceClient struct {@@ -264,6 +266,16 @@ func (c *databaseServiceClient) GetChangelog(ctx context.Context, in *GetChangelreturn out, nil}+func (c *databaseServiceClient) GetSchemaString(ctx context.Context, in *GetSchemaStringRequest, opts ...grpc.CallOption) (*GetSchemaStringResponse, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(GetSchemaStringResponse)+ err := c.cc.Invoke(ctx, DatabaseService_GetSchemaString_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}+// DatabaseServiceServer is the server API for DatabaseService service.// All implementations must embed UnimplementedDatabaseServiceServer// for forward compatibility.@@ -287,6 +299,7 @@ type DatabaseServiceServer interface {DeleteRevision(context.Context, *DeleteRevisionRequest) (*emptypb.Empty, error)ListChangelogs(context.Context, *ListChangelogsRequest) (*ListChangelogsResponse, error)GetChangelog(context.Context, *GetChangelogRequest) (*Changelog, error)+ GetSchemaString(context.Context, *GetSchemaStringRequest) (*GetSchemaStringResponse, error)mustEmbedUnimplementedDatabaseServiceServer()}@@ -354,6 +367,9 @@ func (UnimplementedDatabaseServiceServer) ListChangelogs(context.Context, *ListCfunc (UnimplementedDatabaseServiceServer) GetChangelog(context.Context, *GetChangelogRequest) (*Changelog, error) {return nil, status.Errorf(codes.Unimplemented, "method GetChangelog not implemented")}+func (UnimplementedDatabaseServiceServer) GetSchemaString(context.Context, *GetSchemaStringRequest) (*GetSchemaStringResponse, error) {+ return nil, status.Errorf(codes.Unimplemented, "method GetSchemaString not implemented")+}func (UnimplementedDatabaseServiceServer) mustEmbedUnimplementedDatabaseServiceServer() {}func (UnimplementedDatabaseServiceServer) testEmbeddedByValue() {}@@ -717,6 +733,24 @@ func _DatabaseService_GetChangelog_Handler(srv interface{}, ctx context.Context,return interceptor(ctx, in, info, handler)}+func _DatabaseService_GetSchemaString_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(GetSchemaStringRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(DatabaseServiceServer).GetSchemaString(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: DatabaseService_GetSchemaString_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(DatabaseServiceServer).GetSchemaString(ctx, req.(*GetSchemaStringRequest))+ }+ return interceptor(ctx, in, info, handler)+}+// DatabaseService_ServiceDesc is the grpc.ServiceDesc for DatabaseService service.// It's only intended for direct use with grpc.RegisterService,// and not to be introspected or modified (even as a copy)@@ -800,6 +834,10 @@ var DatabaseService_ServiceDesc = grpc.ServiceDesc{MethodName: "GetChangelog",Handler: _DatabaseService_GetChangelog_Handler,},+ {+ MethodName: "GetSchemaString",+ Handler: _DatabaseService_GetSchemaString_Handler,+ },},Streams: []grpc.StreamDesc{},Metadata: "v1/database_service.proto",diff --git a/proto/v1/database_service.proto b/proto/v1/database_service.protoindex 7c361e290b..97de73ddc2 100644--- a/proto/v1/database_service.proto+++ b/proto/v1/database_service.proto@@ -172,6 +172,13 @@ service DatabaseService {option (bytebase.v1.permission) = "bb.changelogs.get";option (bytebase.v1.auth_method) = IAM;}++ rpc GetSchemaString(GetSchemaStringRequest) returns (GetSchemaStringResponse) {+ option (google.api.http) = {get: "/v1/{name=instances/*/databases/*/schemaString}"};+ option (google.api.method_signature) = "name";+ option (bytebase.v1.permission) = "bb.databases.getSchema";+ option (bytebase.v1.auth_method) = IAM;+ }}message GetDatabaseRequest {@@ -1592,3 +1599,33 @@ message Changelog {}Type type = 17;}++message GetSchemaStringRequest {+ // The name of the database.+ // Format: instances/{instance}/databases/{database}+ string name = 1 [+ (google.api.field_behavior) = REQUIRED,+ (google.api.resource_reference) = {type: "bytebase.com/Database"}+ ];++ enum ObjectType {+ OBJECT_TYPE_UNSPECIFIED = 0;+ DATABASE = 1;+ SCHEMA = 2;+ TABLE = 3;+ VIEW = 4;+ MATERIALIZED_VIEW = 5;+ FUNCTION = 6;+ PROCEDURE = 7;+ SEQUENCE = 8;+ }+ ObjectType type = 2;+ // It's empty for DATABASE.+ string schema = 3;+ // It's empty for DATABASE and SCHEMA.+ string object = 4;+}++message GetSchemaStringResponse {+ string schema_string = 1;+}