Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat: add generate restore sql api (#12142)
rebelicebc1f8cc626a9
diff --git a/frontend/src/types/proto/v1/sql_service.ts b/frontend/src/types/proto/v1/sql_service.tsindex 5c5fbc5a6c..b504a82dcd 100644--- a/frontend/src/types/proto/v1/sql_service.ts+++ b/frontend/src/types/proto/v1/sql_service.ts@@ -487,6 +487,29 @@ export function queryHistory_TypeToNumber(object: QueryHistory_Type): number {}}+export interface GenerateRestoreSQLRequest {+ /**+ * The name is the instance name to execute the query against.+ * Format: instances/{instance}/databases/{databaseName}+ */+ name: string;+ /** The original SQL statement. */+ statement: string;+ /**+ * The data source to restore from.+ * Format: instances/{instance}/databases/{databaseName}, for general engines.+ * Or instances/{instance}/databases/{databaseName}/schemas/{schemaName}, for PG only.+ */+ backupDataSource: string;+ /** The backup table name. */+ bakcupTable: string;+}++export interface GenerateRestoreSQLResponse {+ /** The restore SQL statement. */+ statement: string;+}+function createBaseExecuteRequest(): ExecuteRequest {return { name: "", statement: "", limit: 0, timeout: undefined };}@@ -3021,6 +3044,167 @@ export const QueryHistory = {},};+function createBaseGenerateRestoreSQLRequest(): GenerateRestoreSQLRequest {+ return { name: "", statement: "", backupDataSource: "", bakcupTable: "" };+}++export const GenerateRestoreSQLRequest = {+ encode(message: GenerateRestoreSQLRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.name !== "") {+ writer.uint32(10).string(message.name);+ }+ if (message.statement !== "") {+ writer.uint32(18).string(message.statement);+ }+ if (message.backupDataSource !== "") {+ writer.uint32(26).string(message.backupDataSource);+ }+ if (message.bakcupTable !== "") {+ writer.uint32(34).string(message.bakcupTable);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): GenerateRestoreSQLRequest {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseGenerateRestoreSQLRequest();+ 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 !== 18) {+ break;+ }++ message.statement = reader.string();+ continue;+ case 3:+ if (tag !== 26) {+ break;+ }++ message.backupDataSource = reader.string();+ continue;+ case 4:+ if (tag !== 34) {+ break;+ }++ message.bakcupTable = reader.string();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): GenerateRestoreSQLRequest {+ return {+ name: isSet(object.name) ? globalThis.String(object.name) : "",+ statement: isSet(object.statement) ? globalThis.String(object.statement) : "",+ backupDataSource: isSet(object.backupDataSource) ? globalThis.String(object.backupDataSource) : "",+ bakcupTable: isSet(object.bakcupTable) ? globalThis.String(object.bakcupTable) : "",+ };+ },++ toJSON(message: GenerateRestoreSQLRequest): unknown {+ const obj: any = {};+ if (message.name !== "") {+ obj.name = message.name;+ }+ if (message.statement !== "") {+ obj.statement = message.statement;+ }+ if (message.backupDataSource !== "") {+ obj.backupDataSource = message.backupDataSource;+ }+ if (message.bakcupTable !== "") {+ obj.bakcupTable = message.bakcupTable;+ }+ return obj;+ },++ create(base?: DeepPartial<GenerateRestoreSQLRequest>): GenerateRestoreSQLRequest {+ return GenerateRestoreSQLRequest.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<GenerateRestoreSQLRequest>): GenerateRestoreSQLRequest {+ const message = createBaseGenerateRestoreSQLRequest();+ message.name = object.name ?? "";+ message.statement = object.statement ?? "";+ message.backupDataSource = object.backupDataSource ?? "";+ message.bakcupTable = object.bakcupTable ?? "";+ return message;+ },+};++function createBaseGenerateRestoreSQLResponse(): GenerateRestoreSQLResponse {+ return { statement: "" };+}++export const GenerateRestoreSQLResponse = {+ encode(message: GenerateRestoreSQLResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.statement !== "") {+ writer.uint32(10).string(message.statement);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): GenerateRestoreSQLResponse {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseGenerateRestoreSQLResponse();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.statement = reader.string();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): GenerateRestoreSQLResponse {+ return { statement: isSet(object.statement) ? globalThis.String(object.statement) : "" };+ },++ toJSON(message: GenerateRestoreSQLResponse): unknown {+ const obj: any = {};+ if (message.statement !== "") {+ obj.statement = message.statement;+ }+ return obj;+ },++ create(base?: DeepPartial<GenerateRestoreSQLResponse>): GenerateRestoreSQLResponse {+ return GenerateRestoreSQLResponse.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<GenerateRestoreSQLResponse>): GenerateRestoreSQLResponse {+ const message = createBaseGenerateRestoreSQLResponse();+ message.statement = object.statement ?? "";+ return message;+ },+};+export type SQLServiceDefinition = typeof SQLServiceDefinition;export const SQLServiceDefinition = {name: "SQLService",@@ -3593,6 +3777,80 @@ export const SQLServiceDefinition = {},},},+ generateRestoreSQL: {+ name: "GenerateRestoreSQL",+ requestType: GenerateRestoreSQLRequest,+ requestStream: false,+ responseType: GenerateRestoreSQLResponse,+ responseStream: false,+ options: {+ _unknownFields: {+ 578365826: [+ new Uint8Array([+ 58,+ 58,+ 1,+ 42,+ 34,+ 53,+ 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,+ 125,+ 58,+ 103,+ 101,+ 110,+ 101,+ 114,+ 97,+ 116,+ 101,+ 82,+ 101,+ 115,+ 116,+ 111,+ 114,+ 101,+ 83,+ 81,+ 76,+ ]),+ ],+ },+ },+ },},} as const;diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex d3880f413d..a5cd858b34 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -2448,6 +2448,43 @@ paths:application/json:schema:$ref: '#/components/schemas/Status'+ /v1/instances/{instance}/databases/{database}:generateRestoreSQL:+ post:+ tags:+ - SQLService+ operationId: SQLService_GenerateRestoreSQL+ 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+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/GenerateRestoreSQLRequest'+ required: true+ responses:+ "200":+ description: OK+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/GenerateRestoreSQLResponse'+ default:+ description: Default error response+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/Status'/v1/instances/{instance}/databases/{database}:query:post:tags:@@ -9980,6 +10017,34 @@ components:type: stringdescription: The timestamp when the function is updated in branch.format: date-time+ GenerateRestoreSQLRequest:+ required:+ - name+ type: object+ properties:+ name:+ type: string+ description: |-+ The name is the instance name to execute the query against.+ Format: instances/{instance}/databases/{databaseName}+ statement:+ type: string+ description: The original SQL statement.+ backupDataSource:+ type: string+ description: |-+ The data source to restore from.+ Format: instances/{instance}/databases/{databaseName}, for general engines.+ Or instances/{instance}/databases/{databaseName}/schemas/{schemaName}, for PG only.+ bakcupTable:+ type: string+ description: The backup table name.+ GenerateRestoreSQLResponse:+ type: object+ properties:+ statement:+ type: string+ description: The restore SQL statement.GoogleProtobufAny:type: objectproperties:diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 6fc7806aa9..28afb7eee1 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -592,6 +592,8 @@- [ExecuteResponse](#bytebase-v1-ExecuteResponse)- [ExportRequest](#bytebase-v1-ExportRequest)- [ExportResponse](#bytebase-v1-ExportResponse)+ - [GenerateRestoreSQLRequest](#bytebase-v1-GenerateRestoreSQLRequest)+ - [GenerateRestoreSQLResponse](#bytebase-v1-GenerateRestoreSQLResponse)- [ParseMyBatisMapperRequest](#bytebase-v1-ParseMyBatisMapperRequest)- [ParseMyBatisMapperResponse](#bytebase-v1-ParseMyBatisMapperResponse)- [PrettyRequest](#bytebase-v1-PrettyRequest)@@ -9631,6 +9633,39 @@ Type of the SheetPayload.+<a name="bytebase-v1-GenerateRestoreSQLRequest"></a>++### GenerateRestoreSQLRequest++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name is the instance name to execute the query against. Format: instances/{instance}/databases/{databaseName} |+| statement | [string](#string) | | The original SQL statement. |+| backup_data_source | [string](#string) | | The data source to restore from. Format: instances/{instance}/databases/{databaseName}, for general engines. Or instances/{instance}/databases/{databaseName}/schemas/{schemaName}, for PG only. |+| bakcup_table | [string](#string) | | The backup table name. |+++++++<a name="bytebase-v1-GenerateRestoreSQLResponse"></a>++### GenerateRestoreSQLResponse++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| statement | [string](#string) | | The restore SQL statement. |++++++<a name="bytebase-v1-ParseMyBatisMapperRequest"></a>### ParseMyBatisMapperRequest@@ -9944,6 +9979,7 @@ Type of the SheetPayload.| ParseMyBatisMapper | [ParseMyBatisMapperRequest](#bytebase-v1-ParseMyBatisMapperRequest) | [ParseMyBatisMapperResponse](#bytebase-v1-ParseMyBatisMapperResponse) | || Pretty | [PrettyRequest](#bytebase-v1-PrettyRequest) | [PrettyResponse](#bytebase-v1-PrettyResponse) | || StringifyMetadata | [StringifyMetadataRequest](#bytebase-v1-StringifyMetadataRequest) | [StringifyMetadataResponse](#bytebase-v1-StringifyMetadataResponse) | |+| GenerateRestoreSQL | [GenerateRestoreSQLRequest](#bytebase-v1-GenerateRestoreSQLRequest) | [GenerateRestoreSQLResponse](#bytebase-v1-GenerateRestoreSQLResponse) | |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex f08c3ded8f..fbcc7a2021 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -2446,6 +2446,14 @@<a href="#bytebase.v1.ExportResponse"><span class="badge">M</span>ExportResponse</a></li>+ <li>+ <a href="#bytebase.v1.GenerateRestoreSQLRequest"><span class="badge">M</span>GenerateRestoreSQLRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.GenerateRestoreSQLResponse"><span class="badge">M</span>GenerateRestoreSQLResponse</a>+ </li>+<li><a href="#bytebase.v1.ParseMyBatisMapperRequest"><span class="badge">M</span>ParseMyBatisMapperRequest</a></li>@@ -26464,6 +26472,78 @@ The exported data is not masked. </p></td>+ <h3 id="bytebase.v1.GenerateRestoreSQLRequest">GenerateRestoreSQLRequest</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 is the instance name to execute the query against.+Format: instances/{instance}/databases/{databaseName} </p></td>+ </tr>++ <tr>+ <td>statement</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The original SQL statement. </p></td>+ </tr>++ <tr>+ <td>backup_data_source</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The data source to restore from.+Format: instances/{instance}/databases/{databaseName}, for general engines.+Or instances/{instance}/databases/{databaseName}/schemas/{schemaName}, for PG only. </p></td>+ </tr>++ <tr>+ <td>bakcup_table</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The backup table name. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.GenerateRestoreSQLResponse">GenerateRestoreSQLResponse</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>statement</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The restore SQL statement. </p></td>+ </tr>++ </tbody>+ </table>+++++<h3 id="bytebase.v1.ParseMyBatisMapperRequest">ParseMyBatisMapperRequest</h3><p></p>@@ -27298,6 +27378,13 @@ to retrieve the next page of history. </p></td><td><p></p></td></tr>+ <tr>+ <td>GenerateRestoreSQL</td>+ <td><a href="#bytebase.v1.GenerateRestoreSQLRequest">GenerateRestoreSQLRequest</a></td>+ <td><a href="#bytebase.v1.GenerateRestoreSQLResponse">GenerateRestoreSQLResponse</a></td>+ <td><p></p></td>+ </tr>+</tbody></table>@@ -27444,6 +27531,16 @@ to retrieve the next page of history. </p></td></tr>+++ <tr>+ <td>GenerateRestoreSQL</td>+ <td>POST</td>+ <td>/v1/{name=instances/*/databases/*}:generateRestoreSQL</td>+ <td>*</td>+ </tr>++</tbody></table>diff --git a/proto/generated-go/v1/sql_service.pb.go b/proto/generated-go/v1/sql_service.pb.goindex 98fe4d0d61..ddd4612f1c 100644--- a/proto/generated-go/v1/sql_service.pb.go+++ b/proto/generated-go/v1/sql_service.pb.go@@ -2037,6 +2037,132 @@ func (x *QueryHistory) GetType() QueryHistory_Type {return QueryHistory_TYPE_UNSPECIFIED}+type GenerateRestoreSQLRequest struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The name is the instance name to execute the query against.+ // Format: instances/{instance}/databases/{databaseName}+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ // The original SQL statement.+ Statement string `protobuf:"bytes,2,opt,name=statement,proto3" json:"statement,omitempty"`+ // The data source to restore from.+ // Format: instances/{instance}/databases/{databaseName}, for general engines.+ // Or instances/{instance}/databases/{databaseName}/schemas/{schemaName}, for PG only.+ BackupDataSource string `protobuf:"bytes,3,opt,name=backup_data_source,json=backupDataSource,proto3" json:"backup_data_source,omitempty"`+ // The backup table name.+ BakcupTable string `protobuf:"bytes,4,opt,name=bakcup_table,json=bakcupTable,proto3" json:"bakcup_table,omitempty"`+}++func (x *GenerateRestoreSQLRequest) Reset() {+ *x = GenerateRestoreSQLRequest{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_sql_service_proto_msgTypes[25]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *GenerateRestoreSQLRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*GenerateRestoreSQLRequest) ProtoMessage() {}++func (x *GenerateRestoreSQLRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_sql_service_proto_msgTypes[25]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use GenerateRestoreSQLRequest.ProtoReflect.Descriptor instead.+func (*GenerateRestoreSQLRequest) Descriptor() ([]byte, []int) {+ return file_v1_sql_service_proto_rawDescGZIP(), []int{25}+}++func (x *GenerateRestoreSQLRequest) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++func (x *GenerateRestoreSQLRequest) GetStatement() string {+ if x != nil {+ return x.Statement+ }+ return ""+}++func (x *GenerateRestoreSQLRequest) GetBackupDataSource() string {+ if x != nil {+ return x.BackupDataSource+ }+ return ""+}++func (x *GenerateRestoreSQLRequest) GetBakcupTable() string {+ if x != nil {+ return x.BakcupTable+ }+ return ""+}++type GenerateRestoreSQLResponse struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The restore SQL statement.+ Statement string `protobuf:"bytes,1,opt,name=statement,proto3" json:"statement,omitempty"`+}++func (x *GenerateRestoreSQLResponse) Reset() {+ *x = GenerateRestoreSQLResponse{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_sql_service_proto_msgTypes[26]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *GenerateRestoreSQLResponse) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*GenerateRestoreSQLResponse) ProtoMessage() {}++func (x *GenerateRestoreSQLResponse) ProtoReflect() protoreflect.Message {+ mi := &file_v1_sql_service_proto_msgTypes[26]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use GenerateRestoreSQLResponse.ProtoReflect.Descriptor instead.+func (*GenerateRestoreSQLResponse) Descriptor() ([]byte, []int) {+ return file_v1_sql_service_proto_rawDescGZIP(), []int{26}+}++func (x *GenerateRestoreSQLResponse) GetStatement() string {+ if x != nil {+ return x.Statement+ }+ return ""+}+var File_v1_sql_service_proto protoreflect.FileDescriptorvar file_v1_sql_service_proto_rawDesc = []byte{@@ -2315,95 +2441,120 @@ var file_v1_sql_service_proto_rawDesc = []byte{0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x01, 0x12,0x0a, 0x0a, 0x06, 0x45, 0x58, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x42, 0x08, 0x0a, 0x06, 0x5f,- 0x65, 0x72, 0x72, 0x6f, 0x72, 0x32, 0xec, 0x0a, 0x0a, 0x0a, 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72,- 0x76, 0x69, 0x63, 0x65, 0x12, 0x96, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x19,- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65,- 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65,- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73,- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x50, 0x3a, 0x01, 0x2a,- 0x5a, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65,- 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x71, 0x75,- 0x65, 0x72, 0x79, 0x22, 0x28, 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, 0x7d, 0x3a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0xa0, 0x01,- 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa4, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61,+ 0x74, 0x65, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75,+ 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,+ 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a,+ 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,+ 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x62,+ 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63,+ 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x44,+ 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x61, 0x6b,+ 0x63, 0x75, 0x70, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,+ 0x0b, 0x62, 0x61, 0x6b, 0x63, 0x75, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x3a, 0x0a, 0x1a,+ 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53,+ 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74,+ 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73,+ 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0x96, 0x0c, 0x0a, 0x0a, 0x53, 0x51, 0x4c,+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x96, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72,+ 0x79, 0x12, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,+ 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x62,+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79,+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x50,+ 0x3a, 0x01, 0x2a, 0x5a, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e,+ 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d,+ 0x3a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x28, 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, 0x7d, 0x3a, 0x71, 0x75, 0x65, 0x72, 0x79,+ 0x12, 0xa0, 0x01, 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x62,+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75,+ 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65,0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52,- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70,- 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x54, 0x3a, 0x01, 0x2a, 0x5a,- 0x23, 0x3a, 0x01, 0x2a, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d,- 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x65, 0x78, 0x65,- 0x63, 0x75, 0x74, 0x65, 0x22, 0x2a, 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, 0x7d, 0x3a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65,- 0x12, 0x71, 0x0a, 0x0c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65,- 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41,- 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,- 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73,- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f,- 0x76, 0x31, 0x3a, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x28,- 0x01, 0x30, 0x01, 0x12, 0x8e, 0x01, 0x0a, 0x14, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x51, 0x75,- 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x62,- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63,- 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52,- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79,- 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,- 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x71,- 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x73, 0x65,- 0x61, 0x72, 0x63, 0x68, 0x12, 0xc8, 0x01, 0x0a, 0x06, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12,- 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78,- 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74,- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x84, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02,- 0x7e, 0x3a, 0x01, 0x2a, 0x5a, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b,- 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a,- 0x7d, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x5a, 0x2a, 0x3a, 0x01, 0x2a, 0x22, 0x25, 0x2f,- 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,- 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x65, 0x78,- 0x70, 0x6f, 0x72, 0x74, 0x22, 0x29, 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, 0x7d, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12,- 0x78, 0x0a, 0x0d, 0x44, 0x69, 0x66, 0x66, 0x65, 0x72, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77,- 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44,- 0x69, 0x66, 0x66, 0x65, 0x72, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x71, 0x75,- 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x54, 0x3a,+ 0x01, 0x2a, 0x5a, 0x23, 0x3a, 0x01, 0x2a, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61,+ 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a,+ 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x22, 0x2a, 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, 0x7d, 0x3a, 0x65, 0x78, 0x65, 0x63,+ 0x75, 0x74, 0x65, 0x12, 0x71, 0x0a, 0x0c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63,+ 0x75, 0x74, 0x65, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,+ 0x31, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65,+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12,+ 0x12, 0x10, 0x2f, 0x76, 0x31, 0x3a, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75,+ 0x74, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x8e, 0x01, 0x0a, 0x14, 0x53, 0x65, 0x61, 0x72, 0x63,+ 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12,+ 0x28, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65,+ 0x61, 0x72, 0x63, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69,+ 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x51, 0x75,+ 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70,+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x76,+ 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73,+ 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0xc8, 0x01, 0x0a, 0x06, 0x45, 0x78, 0x70, 0x6f,+ 0x72, 0x74, 0x12, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,+ 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70,+ 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x84, 0x01, 0x82, 0xd3,+ 0xe4, 0x93, 0x02, 0x7e, 0x3a, 0x01, 0x2a, 0x5a, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76,+ 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,+ 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x5a, 0x2a, 0x3a, 0x01, 0x2a,+ 0x22, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a,+ 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x7d,+ 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x29, 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, 0x7d, 0x3a, 0x65, 0x78, 0x70, 0x6f,+ 0x72, 0x74, 0x12, 0x78, 0x0a, 0x0d, 0x44, 0x69, 0x66, 0x66, 0x65, 0x72, 0x50, 0x72, 0x65, 0x76,+ 0x69, 0x65, 0x77, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x65, 0x72, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52,- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x3a,- 0x01, 0x2a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x71, 0x6c, 0x2f, 0x64, 0x69, 0x66, 0x66,- 0x65, 0x72, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x58, 0x0a, 0x05, 0x43, 0x68, 0x65,- 0x63, 0x6b, 0x12, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63,- 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02,- 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x71, 0x6c, 0x2f, 0x63, 0x68,- 0x65, 0x63, 0x6b, 0x12, 0x8c, 0x01, 0x0a, 0x12, 0x50, 0x61, 0x72, 0x73, 0x65, 0x4d, 0x79, 0x42,- 0x61, 0x74, 0x69, 0x73, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x26, 0x2e, 0x62, 0x79, 0x74,- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x4d, 0x79,- 0x42, 0x61, 0x74, 0x69, 0x73, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,- 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x4d, 0x79, 0x42, 0x61, 0x74, 0x69, 0x73, 0x4d, 0x61, 0x70,- 0x70, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4,- 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x71, 0x6c, 0x2f,- 0x70, 0x61, 0x72, 0x73, 0x65, 0x4d, 0x79, 0x42, 0x61, 0x74, 0x69, 0x73, 0x4d, 0x61, 0x70, 0x70,- 0x65, 0x72, 0x12, 0x5c, 0x0a, 0x06, 0x50, 0x72, 0x65, 0x74, 0x74, 0x79, 0x12, 0x1a, 0x2e, 0x62,- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x74, 0x74,- 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x74, 0x74, 0x79, 0x52, 0x65, 0x73,- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a,- 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x71, 0x6c, 0x2f, 0x70, 0x72, 0x65, 0x74, 0x74, 0x79,- 0x12, 0x91, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d, 0x65,- 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d, 0x65,- 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69,- 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73,- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x3a, 0x01, 0x2a,- 0x22, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69,- 0x67, 0x6e, 0x3a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x74, 0x61,- 0x64, 0x61, 0x74, 0x61, 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,+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x65, 0x72, 0x50, 0x72, 0x65, 0x76, 0x69,+ 0x65, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93,+ 0x02, 0x1a, 0x3a, 0x01, 0x2a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x71, 0x6c, 0x2f, 0x64,+ 0x69, 0x66, 0x66, 0x65, 0x72, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x58, 0x0a, 0x05,+ 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,+ 0x1a, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43,+ 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3,+ 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x71, 0x6c,+ 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x8c, 0x01, 0x0a, 0x12, 0x50, 0x61, 0x72, 0x73, 0x65,+ 0x4d, 0x79, 0x42, 0x61, 0x74, 0x69, 0x73, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x26, 0x2e,+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73,+ 0x65, 0x4d, 0x79, 0x42, 0x61, 0x74, 0x69, 0x73, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x4d, 0x79, 0x42, 0x61, 0x74, 0x69, 0x73,+ 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25,+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x73,+ 0x71, 0x6c, 0x2f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x4d, 0x79, 0x42, 0x61, 0x74, 0x69, 0x73, 0x4d,+ 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x5c, 0x0a, 0x06, 0x50, 0x72, 0x65, 0x74, 0x74, 0x79, 0x12,+ 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72,+ 0x65, 0x74, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x74, 0x74, 0x79,+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13,+ 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x71, 0x6c, 0x2f, 0x70, 0x72, 0x65,+ 0x74, 0x74, 0x79, 0x12, 0x91, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66,+ 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66,+ 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,+ 0x1a, 0x26, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53,+ 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27,+ 0x3a, 0x01, 0x2a, 0x22, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44,+ 0x65, 0x73, 0x69, 0x67, 0x6e, 0x3a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d,+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xa7, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x6e, 0x65,+ 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x12, 0x26,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e,+ 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x52,+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73,+ 0x74, 0x6f, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,+ 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x3a, 0x01, 0x2a, 0x22, 0x35, 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, 0x7d, 0x3a, 0x67,+ 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x51,+ 0x4c, 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 (@@ -2419,7 +2570,7 @@ func file_v1_sql_service_proto_rawDescGZIP() []byte {}var file_v1_sql_service_proto_enumTypes = make([]protoimpl.EnumInfo, 3)-var file_v1_sql_service_proto_msgTypes = make([]protoimpl.MessageInfo, 25)+var file_v1_sql_service_proto_msgTypes = make([]protoimpl.MessageInfo, 27)var file_v1_sql_service_proto_goTypes = []interface{}{(Advice_Status)(0), // 0: bytebase.v1.Advice.Status(CheckRequest_ChangeType)(0), // 1: bytebase.v1.CheckRequest.ChangeType@@ -2449,41 +2600,43 @@ var file_v1_sql_service_proto_goTypes = []interface{}{(*SearchQueryHistoriesRequest)(nil), // 25: bytebase.v1.SearchQueryHistoriesRequest(*SearchQueryHistoriesResponse)(nil), // 26: bytebase.v1.SearchQueryHistoriesResponse(*QueryHistory)(nil), // 27: bytebase.v1.QueryHistory- (*durationpb.Duration)(nil), // 28: google.protobuf.Duration- (structpb.NullValue)(0), // 29: google.protobuf.NullValue- (*structpb.Value)(nil), // 30: google.protobuf.Value- (ExportFormat)(0), // 31: bytebase.v1.ExportFormat- (Engine)(0), // 32: bytebase.v1.Engine- (*DatabaseMetadata)(nil), // 33: bytebase.v1.DatabaseMetadata- (*timestamppb.Timestamp)(nil), // 34: google.protobuf.Timestamp+ (*GenerateRestoreSQLRequest)(nil), // 28: bytebase.v1.GenerateRestoreSQLRequest+ (*GenerateRestoreSQLResponse)(nil), // 29: bytebase.v1.GenerateRestoreSQLResponse+ (*durationpb.Duration)(nil), // 30: google.protobuf.Duration+ (structpb.NullValue)(0), // 31: google.protobuf.NullValue+ (*structpb.Value)(nil), // 32: google.protobuf.Value+ (ExportFormat)(0), // 33: bytebase.v1.ExportFormat+ (Engine)(0), // 34: bytebase.v1.Engine+ (*DatabaseMetadata)(nil), // 35: bytebase.v1.DatabaseMetadata+ (*timestamppb.Timestamp)(nil), // 36: google.protobuf.Timestamp}var file_v1_sql_service_proto_depIdxs = []int32{- 28, // 0: bytebase.v1.ExecuteRequest.timeout:type_name -> google.protobuf.Duration+ 30, // 0: bytebase.v1.ExecuteRequest.timeout:type_name -> google.protobuf.Duration9, // 1: bytebase.v1.ExecuteResponse.results:type_name -> bytebase.v1.QueryResult12, // 2: bytebase.v1.ExecuteResponse.advices:type_name -> bytebase.v1.Advice- 28, // 3: bytebase.v1.AdminExecuteRequest.timeout:type_name -> google.protobuf.Duration+ 30, // 3: bytebase.v1.AdminExecuteRequest.timeout:type_name -> google.protobuf.Duration9, // 4: bytebase.v1.AdminExecuteResponse.results:type_name -> bytebase.v1.QueryResult- 28, // 5: bytebase.v1.QueryRequest.timeout:type_name -> google.protobuf.Duration+ 30, // 5: bytebase.v1.QueryRequest.timeout:type_name -> google.protobuf.Duration9, // 6: bytebase.v1.QueryResponse.results:type_name -> bytebase.v1.QueryResult12, // 7: bytebase.v1.QueryResponse.advices:type_name -> bytebase.v1.Advice10, // 8: bytebase.v1.QueryResult.rows:type_name -> bytebase.v1.QueryRow- 28, // 9: bytebase.v1.QueryResult.latency:type_name -> google.protobuf.Duration+ 30, // 9: bytebase.v1.QueryResult.latency:type_name -> google.protobuf.Duration11, // 10: bytebase.v1.QueryRow.values:type_name -> bytebase.v1.RowValue- 29, // 11: bytebase.v1.RowValue.null_value:type_name -> google.protobuf.NullValue- 30, // 12: bytebase.v1.RowValue.value_value:type_name -> google.protobuf.Value+ 31, // 11: bytebase.v1.RowValue.null_value:type_name -> google.protobuf.NullValue+ 32, // 12: bytebase.v1.RowValue.value_value:type_name -> google.protobuf.Value0, // 13: bytebase.v1.Advice.status:type_name -> bytebase.v1.Advice.Status- 31, // 14: bytebase.v1.ExportRequest.format:type_name -> bytebase.v1.ExportFormat- 32, // 15: bytebase.v1.DifferPreviewRequest.engine:type_name -> bytebase.v1.Engine- 33, // 16: bytebase.v1.DifferPreviewRequest.new_metadata:type_name -> bytebase.v1.DatabaseMetadata- 32, // 17: bytebase.v1.PrettyRequest.engine:type_name -> bytebase.v1.Engine- 33, // 18: bytebase.v1.CheckRequest.metadata:type_name -> bytebase.v1.DatabaseMetadata+ 33, // 14: bytebase.v1.ExportRequest.format:type_name -> bytebase.v1.ExportFormat+ 34, // 15: bytebase.v1.DifferPreviewRequest.engine:type_name -> bytebase.v1.Engine+ 35, // 16: bytebase.v1.DifferPreviewRequest.new_metadata:type_name -> bytebase.v1.DatabaseMetadata+ 34, // 17: bytebase.v1.PrettyRequest.engine:type_name -> bytebase.v1.Engine+ 35, // 18: bytebase.v1.CheckRequest.metadata:type_name -> bytebase.v1.DatabaseMetadata1, // 19: bytebase.v1.CheckRequest.change_type:type_name -> bytebase.v1.CheckRequest.ChangeType12, // 20: bytebase.v1.CheckResponse.advices:type_name -> bytebase.v1.Advice- 33, // 21: bytebase.v1.StringifyMetadataRequest.metadata:type_name -> bytebase.v1.DatabaseMetadata- 32, // 22: bytebase.v1.StringifyMetadataRequest.engine:type_name -> bytebase.v1.Engine+ 35, // 21: bytebase.v1.StringifyMetadataRequest.metadata:type_name -> bytebase.v1.DatabaseMetadata+ 34, // 22: bytebase.v1.StringifyMetadataRequest.engine:type_name -> bytebase.v1.Engine27, // 23: bytebase.v1.SearchQueryHistoriesResponse.query_histories:type_name -> bytebase.v1.QueryHistory- 34, // 24: bytebase.v1.QueryHistory.create_time:type_name -> google.protobuf.Timestamp- 28, // 25: bytebase.v1.QueryHistory.duration:type_name -> google.protobuf.Duration+ 36, // 24: bytebase.v1.QueryHistory.create_time:type_name -> google.protobuf.Timestamp+ 30, // 25: bytebase.v1.QueryHistory.duration:type_name -> google.protobuf.Duration2, // 26: bytebase.v1.QueryHistory.type:type_name -> bytebase.v1.QueryHistory.Type7, // 27: bytebase.v1.SQLService.Query:input_type -> bytebase.v1.QueryRequest3, // 28: bytebase.v1.SQLService.Execute:input_type -> bytebase.v1.ExecuteRequest@@ -2495,18 +2648,20 @@ var file_v1_sql_service_proto_depIdxs = []int32{21, // 34: bytebase.v1.SQLService.ParseMyBatisMapper:input_type -> bytebase.v1.ParseMyBatisMapperRequest17, // 35: bytebase.v1.SQLService.Pretty:input_type -> bytebase.v1.PrettyRequest23, // 36: bytebase.v1.SQLService.StringifyMetadata:input_type -> bytebase.v1.StringifyMetadataRequest- 8, // 37: bytebase.v1.SQLService.Query:output_type -> bytebase.v1.QueryResponse- 4, // 38: bytebase.v1.SQLService.Execute:output_type -> bytebase.v1.ExecuteResponse- 6, // 39: bytebase.v1.SQLService.AdminExecute:output_type -> bytebase.v1.AdminExecuteResponse- 26, // 40: bytebase.v1.SQLService.SearchQueryHistories:output_type -> bytebase.v1.SearchQueryHistoriesResponse- 14, // 41: bytebase.v1.SQLService.Export:output_type -> bytebase.v1.ExportResponse- 16, // 42: bytebase.v1.SQLService.DifferPreview:output_type -> bytebase.v1.DifferPreviewResponse- 20, // 43: bytebase.v1.SQLService.Check:output_type -> bytebase.v1.CheckResponse- 22, // 44: bytebase.v1.SQLService.ParseMyBatisMapper:output_type -> bytebase.v1.ParseMyBatisMapperResponse- 18, // 45: bytebase.v1.SQLService.Pretty:output_type -> bytebase.v1.PrettyResponse- 24, // 46: bytebase.v1.SQLService.StringifyMetadata:output_type -> bytebase.v1.StringifyMetadataResponse- 37, // [37:47] is the sub-list for method output_type- 27, // [27:37] is the sub-list for method input_type+ 28, // 37: bytebase.v1.SQLService.GenerateRestoreSQL:input_type -> bytebase.v1.GenerateRestoreSQLRequest+ 8, // 38: bytebase.v1.SQLService.Query:output_type -> bytebase.v1.QueryResponse+ 4, // 39: bytebase.v1.SQLService.Execute:output_type -> bytebase.v1.ExecuteResponse+ 6, // 40: bytebase.v1.SQLService.AdminExecute:output_type -> bytebase.v1.AdminExecuteResponse+ 26, // 41: bytebase.v1.SQLService.SearchQueryHistories:output_type -> bytebase.v1.SearchQueryHistoriesResponse+ 14, // 42: bytebase.v1.SQLService.Export:output_type -> bytebase.v1.ExportResponse+ 16, // 43: bytebase.v1.SQLService.DifferPreview:output_type -> bytebase.v1.DifferPreviewResponse+ 20, // 44: bytebase.v1.SQLService.Check:output_type -> bytebase.v1.CheckResponse+ 22, // 45: bytebase.v1.SQLService.ParseMyBatisMapper:output_type -> bytebase.v1.ParseMyBatisMapperResponse+ 18, // 46: bytebase.v1.SQLService.Pretty:output_type -> bytebase.v1.PrettyResponse+ 24, // 47: bytebase.v1.SQLService.StringifyMetadata:output_type -> bytebase.v1.StringifyMetadataResponse+ 29, // 48: bytebase.v1.SQLService.GenerateRestoreSQL:output_type -> bytebase.v1.GenerateRestoreSQLResponse+ 38, // [38:49] is the sub-list for method output_type+ 27, // [27:38] is the sub-list for method input_type27, // [27:27] is the sub-list for extension type_name27, // [27:27] is the sub-list for extension extendee0, // [0:27] is the sub-list for field type_name@@ -2820,6 +2975,30 @@ func file_v1_sql_service_proto_init() {return nil}}+ file_v1_sql_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*GenerateRestoreSQLRequest); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_sql_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*GenerateRestoreSQLResponse); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }}file_v1_sql_service_proto_msgTypes[4].OneofWrappers = []interface{}{}file_v1_sql_service_proto_msgTypes[8].OneofWrappers = []interface{}{@@ -2842,7 +3021,7 @@ func file_v1_sql_service_proto_init() {GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: file_v1_sql_service_proto_rawDesc,NumEnums: 3,- NumMessages: 25,+ NumMessages: 27,NumExtensions: 0,NumServices: 1,},diff --git a/proto/generated-go/v1/sql_service.pb.gw.go b/proto/generated-go/v1/sql_service.pb.gw.goindex 4952298f26..cd44f5b1f6 100644--- a/proto/generated-go/v1/sql_service.pb.gw.go+++ b/proto/generated-go/v1/sql_service.pb.gw.go@@ -660,6 +660,66 @@ func local_request_SQLService_StringifyMetadata_0(ctx context.Context, marshaler}+func request_SQLService_GenerateRestoreSQL_0(ctx context.Context, marshaler runtime.Marshaler, client SQLServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var protoReq GenerateRestoreSQLRequest+ var metadata runtime.ServerMetadata++ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }++ var (+ val string+ ok bool+ err error+ _ = err+ )++ 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)+ }++ msg, err := client.GenerateRestoreSQL(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err++}++func local_request_SQLService_GenerateRestoreSQL_0(ctx context.Context, marshaler runtime.Marshaler, server SQLServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var protoReq GenerateRestoreSQLRequest+ var metadata runtime.ServerMetadata++ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }++ var (+ val string+ ok bool+ err error+ _ = err+ )++ 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)+ }++ msg, err := server.GenerateRestoreSQL(ctx, &protoReq)+ return msg, metadata, err++}+// RegisterSQLServiceHandlerServer registers the http handlers for service SQLService to "mux".// UnaryRPC :call SQLServiceServer directly.// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.@@ -998,6 +1058,31 @@ func RegisterSQLServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,})+ mux.Handle("POST", pattern_SQLService_GenerateRestoreSQL_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)+ var err error+ var annotatedContext context.Context+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SQLService/GenerateRestoreSQL", runtime.WithHTTPPathPattern("/v1/{name=instances/*/databases/*}:generateRestoreSQL"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_SQLService_GenerateRestoreSQL_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_SQLService_GenerateRestoreSQL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)++ })+return nil}@@ -1347,6 +1432,28 @@ func RegisterSQLServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,})+ mux.Handle("POST", pattern_SQLService_GenerateRestoreSQL_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)+ var err error+ var annotatedContext context.Context+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.SQLService/GenerateRestoreSQL", runtime.WithHTTPPathPattern("/v1/{name=instances/*/databases/*}:generateRestoreSQL"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_SQLService_GenerateRestoreSQL_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }++ forward_SQLService_GenerateRestoreSQL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)++ })+return nil}@@ -1378,6 +1485,8 @@ var (pattern_SQLService_Pretty_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "sql", "pretty"}, ""))pattern_SQLService_StringifyMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "schemaDesign"}, "stringifyMetadata"))++ pattern_SQLService_GenerateRestoreSQL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "instances", "databases", "name"}, "generateRestoreSQL")))var (@@ -1408,4 +1517,6 @@ var (forward_SQLService_Pretty_0 = runtime.ForwardResponseMessageforward_SQLService_StringifyMetadata_0 = runtime.ForwardResponseMessage++ forward_SQLService_GenerateRestoreSQL_0 = runtime.ForwardResponseMessage)diff --git a/proto/generated-go/v1/sql_service_grpc.pb.go b/proto/generated-go/v1/sql_service_grpc.pb.goindex 39598da7e8..605cb8d276 100644--- a/proto/generated-go/v1/sql_service_grpc.pb.go+++ b/proto/generated-go/v1/sql_service_grpc.pb.go@@ -29,6 +29,7 @@ const (SQLService_ParseMyBatisMapper_FullMethodName = "/bytebase.v1.SQLService/ParseMyBatisMapper"SQLService_Pretty_FullMethodName = "/bytebase.v1.SQLService/Pretty"SQLService_StringifyMetadata_FullMethodName = "/bytebase.v1.SQLService/StringifyMetadata"+ SQLService_GenerateRestoreSQL_FullMethodName = "/bytebase.v1.SQLService/GenerateRestoreSQL")// SQLServiceClient is the client API for SQLService service.@@ -45,6 +46,7 @@ type SQLServiceClient interface {ParseMyBatisMapper(ctx context.Context, in *ParseMyBatisMapperRequest, opts ...grpc.CallOption) (*ParseMyBatisMapperResponse, error)Pretty(ctx context.Context, in *PrettyRequest, opts ...grpc.CallOption) (*PrettyResponse, error)StringifyMetadata(ctx context.Context, in *StringifyMetadataRequest, opts ...grpc.CallOption) (*StringifyMetadataResponse, error)+ GenerateRestoreSQL(ctx context.Context, in *GenerateRestoreSQLRequest, opts ...grpc.CallOption) (*GenerateRestoreSQLResponse, error)}type sQLServiceClient struct {@@ -167,6 +169,15 @@ func (c *sQLServiceClient) StringifyMetadata(ctx context.Context, in *StringifyMreturn out, nil}+func (c *sQLServiceClient) GenerateRestoreSQL(ctx context.Context, in *GenerateRestoreSQLRequest, opts ...grpc.CallOption) (*GenerateRestoreSQLResponse, error) {+ out := new(GenerateRestoreSQLResponse)+ err := c.cc.Invoke(ctx, SQLService_GenerateRestoreSQL_FullMethodName, in, out, opts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}+// SQLServiceServer is the server API for SQLService service.// All implementations must embed UnimplementedSQLServiceServer// for forward compatibility@@ -181,6 +192,7 @@ type SQLServiceServer interface {ParseMyBatisMapper(context.Context, *ParseMyBatisMapperRequest) (*ParseMyBatisMapperResponse, error)Pretty(context.Context, *PrettyRequest) (*PrettyResponse, error)StringifyMetadata(context.Context, *StringifyMetadataRequest) (*StringifyMetadataResponse, error)+ GenerateRestoreSQL(context.Context, *GenerateRestoreSQLRequest) (*GenerateRestoreSQLResponse, error)mustEmbedUnimplementedSQLServiceServer()}@@ -218,6 +230,9 @@ func (UnimplementedSQLServiceServer) Pretty(context.Context, *PrettyRequest) (*Pfunc (UnimplementedSQLServiceServer) StringifyMetadata(context.Context, *StringifyMetadataRequest) (*StringifyMetadataResponse, error) {return nil, status.Errorf(codes.Unimplemented, "method StringifyMetadata not implemented")}+func (UnimplementedSQLServiceServer) GenerateRestoreSQL(context.Context, *GenerateRestoreSQLRequest) (*GenerateRestoreSQLResponse, error) {+ return nil, status.Errorf(codes.Unimplemented, "method GenerateRestoreSQL not implemented")+}func (UnimplementedSQLServiceServer) mustEmbedUnimplementedSQLServiceServer() {}// UnsafeSQLServiceServer may be embedded to opt out of forward compatibility for this service.@@ -419,6 +434,24 @@ func _SQLService_StringifyMetadata_Handler(srv interface{}, ctx context.Context,return interceptor(ctx, in, info, handler)}+func _SQLService_GenerateRestoreSQL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(GenerateRestoreSQLRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(SQLServiceServer).GenerateRestoreSQL(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: SQLService_GenerateRestoreSQL_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(SQLServiceServer).GenerateRestoreSQL(ctx, req.(*GenerateRestoreSQLRequest))+ }+ return interceptor(ctx, in, info, handler)+}+// SQLService_ServiceDesc is the grpc.ServiceDesc for SQLService service.// It's only intended for direct use with grpc.RegisterService,// and not to be introspected or modified (even as a copy)@@ -462,6 +495,10 @@ var SQLService_ServiceDesc = grpc.ServiceDesc{MethodName: "StringifyMetadata",Handler: _SQLService_StringifyMetadata_Handler,},+ {+ MethodName: "GenerateRestoreSQL",+ Handler: _SQLService_GenerateRestoreSQL_Handler,+ },},Streams: []grpc.StreamDesc{{diff --git a/proto/v1/sql_service.proto b/proto/v1/sql_service.protoindex e7c9819033..538364bfae 100644--- a/proto/v1/sql_service.proto+++ b/proto/v1/sql_service.proto@@ -95,6 +95,13 @@ service SQLService {body: "*"};}++ rpc GenerateRestoreSQL(GenerateRestoreSQLRequest) returns (GenerateRestoreSQLResponse) {+ option (google.api.http) = {+ post: "/v1/{name=instances/*/databases/*}:generateRestoreSQL"+ body: "*"+ };+ }}message ExecuteRequest {@@ -420,3 +427,25 @@ message QueryHistory {Type type = 8;}++message GenerateRestoreSQLRequest {+ // The name is the instance name to execute the query against.+ // Format: instances/{instance}/databases/{databaseName}+ string name = 1 [(google.api.field_behavior) = REQUIRED];++ // The original SQL statement.+ string statement = 2;++ // The data source to restore from.+ // Format: instances/{instance}/databases/{databaseName}, for general engines.+ // Or instances/{instance}/databases/{databaseName}/schemas/{schemaName}, for PG only.+ string backup_data_source = 3;++ // The backup table name.+ string bakcup_table = 4;+}++message GenerateRestoreSQLResponse {+ // The restore SQL statement.+ string statement = 1;+}