Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
refactor: retire sql service execute (#14414)
h3n4l60e566da7cc4
diff --git a/backend/api/v1/sql_service.go b/backend/api/v1/sql_service.goindex d3ece50a78..1b4421813a 100644--- a/backend/api/v1/sql_service.go+++ b/backend/api/v1/sql_service.go@@ -155,52 +155,6 @@ func (s *SQLService) AdminExecute(server v1pb.SQLService_AdminExecuteServer) err}}-// Execute executes the SQL statement.-func (s *SQLService) Execute(ctx context.Context, request *v1pb.ExecuteRequest) (*v1pb.ExecuteResponse, error) {- // Prepare related message.- user, instance, database, err := s.prepareRelatedMessage(ctx, request.Name)- if err != nil {- return nil, err- }-- driver, err := s.dbFactory.GetAdminDatabaseDriver(ctx, instance, database, db.ConnectionContext{})- if err != nil {- return nil, status.Errorf(codes.Internal, "failed to get database driver: %v", err)- }- defer driver.Close(ctx)- var conn *sql.Conn- sqlDB := driver.GetDB()- if sqlDB != nil {- conn, err = sqlDB.Conn(ctx)- if err != nil {- return nil, status.Errorf(codes.Internal, "failed to get database connection: %v", err)- }- defer conn.Close()- }-- queryContext := db.QueryContext{OperatorEmail: user.Email}- if request.Schema != nil {- queryContext.Schema = *request.Schema- }- results, duration, queryErr := executeWithTimeout(ctx, driver, conn, request.Statement, request.Timeout, queryContext)-- if err := s.createQueryHistory(ctx, database, store.QueryHistoryTypeQuery, request.Statement, user.ID, duration, queryErr); err != nil {- slog.Error("failed to post admin execute activity", log.BBError(err))- }-- response := &v1pb.ExecuteResponse{}- if queryErr != nil {- response.Results = []*v1pb.QueryResult{- {- Error: queryErr.Error(),- },- }- } else {- response.Results = results- }- return response, nil-}-func (s *SQLService) Query(ctx context.Context, request *v1pb.QueryRequest) (*v1pb.QueryResponse, error) {// Prepare related message.user, instance, database, err := s.prepareRelatedMessage(ctx, request.Name)diff --git a/frontend/src/types/proto/v1/sql_service.ts b/frontend/src/types/proto/v1/sql_service.tsindex c99622d352..070f39e183 100644--- a/frontend/src/types/proto/v1/sql_service.ts+++ b/frontend/src/types/proto/v1/sql_service.ts@@ -3768,96 +3768,6 @@ export const SQLServiceDefinition = {},},},- execute: {- name: "Execute",- requestType: ExecuteRequest,- requestStream: false,- responseType: ExecuteResponse,- responseStream: false,- options: {- _unknownFields: {- 800010: [- new Uint8Array([- 20,- 98,- 98,- 46,- 100,- 97,- 116,- 97,- 98,- 97,- 115,- 101,- 115,- 46,- 101,- 120,- 101,- 99,- 117,- 116,- 101,- ]),- ],- 800016: [new Uint8Array([1])],- 800024: [new Uint8Array([1])],- 578365826: [- new Uint8Array([- 47,- 58,- 1,- 42,- 34,- 42,- 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,- 101,- 120,- 101,- 99,- 117,- 116,- 101,- ]),- ],- },- },- },adminExecute: {name: "AdminExecute",requestType: AdminExecuteRequest,diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex ad1561bca2..4cef12a8cc 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -2501,43 +2501,6 @@ paths:application/json:schema:$ref: '#/components/schemas/Status'- /v1/instances/{instance}/databases/{database}:execute:- post:- tags:- - SQLService- operationId: SQLService_Execute- 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/ExecuteRequest'- required: true- responses:- "200":- description: OK- content:- application/json:- schema:- $ref: '#/components/schemas/ExecuteResponse'- default:- description: Default error response- content:- application/json:- schema:- $ref: '#/components/schemas/Status'/v1/instances/{instance}/databases/{database}:export:post:tags:@@ -10287,43 +10250,6 @@ components:format: enumcolor:type: string- ExecuteRequest:- 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 SQL statement to execute.- limit:- type: integer- description: The maximum number of rows to return.- format: int32- timeout:- pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$- type: string- description: The timeout for the request.- schema:- type: string- description: The default schema to execute the statement. Equals to the current schema in Oracle and search path in Postgres.- ExecuteResponse:- type: object- properties:- results:- type: array- items:- $ref: '#/components/schemas/QueryResult'- description: The execute results.- advices:- type: array- items:- $ref: '#/components/schemas/Advice'- description: The execute advices.ExportAuditLogsRequest:required:- parentdiff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex bac310f9e6..4cfa515b25 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -11359,7 +11359,6 @@ for field description.| Method Name | Request Type | Response Type | Description || ----------- | ------------ | ------------- | ------------|| Query | [QueryRequest](#bytebase-v1-QueryRequest) | [QueryResponse](#bytebase-v1-QueryResponse) | |-| Execute | [ExecuteRequest](#bytebase-v1-ExecuteRequest) | [ExecuteResponse](#bytebase-v1-ExecuteResponse) | || AdminExecute | [AdminExecuteRequest](#bytebase-v1-AdminExecuteRequest) stream | [AdminExecuteResponse](#bytebase-v1-AdminExecuteResponse) stream | || SearchQueryHistories | [SearchQueryHistoriesRequest](#bytebase-v1-SearchQueryHistoriesRequest) | [SearchQueryHistoriesResponse](#bytebase-v1-SearchQueryHistoriesResponse) | SearchQueryHistories searches query histories for the caller. || Export | [ExportRequest](#bytebase-v1-ExportRequest) | [ExportResponse](#bytebase-v1-ExportResponse) | |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 4699487bad..93ede2e32c 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -31114,13 +31114,6 @@ to retrieve the next page of history. </p></td><td><p></p></td></tr>- <tr>- <td>Execute</td>- <td><a href="#bytebase.v1.ExecuteRequest">ExecuteRequest</a></td>- <td><a href="#bytebase.v1.ExecuteResponse">ExecuteResponse</a></td>- <td><p></p></td>- </tr>-<tr><td>AdminExecute</td><td><a href="#bytebase.v1.AdminExecuteRequest">AdminExecuteRequest</a> stream</td>@@ -31214,16 +31207,6 @@ to retrieve the next page of history. </p></td>- <tr>- <td>Execute</td>- <td>POST</td>- <td>/v1/{name=instances/*/databases/*}:execute</td>- <td>*</td>- </tr>----<tr><td>AdminExecute</td><td>GET</td>diff --git a/proto/generated-go/v1/sql_service.pb.go b/proto/generated-go/v1/sql_service.pb.goindex 2f65579221..66b73bf691 100644--- a/proto/generated-go/v1/sql_service.pb.go+++ b/proto/generated-go/v1/sql_service.pb.go@@ -2701,7 +2701,7 @@ var file_v1_sql_service_proto_rawDesc = []byte{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, 0xa6, 0x0c, 0x0a, 0x0a, 0x53, 0x51, 0x4c, 0x53,+ 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0x88, 0x0b, 0x0a, 0x0a, 0x53, 0x51, 0x4c, 0x53,0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xb2, 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,@@ -2713,95 +2713,85 @@ var file_v1_sql_service_proto_rawDesc = []byte{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, 0x9b, 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, 0x73, 0x70, 0x6f, 0x6e,- 0x73, 0x65, 0x22, 0x55, 0x8a, 0xea, 0x30, 0x14, 0x62, 0x62, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x62,- 0x61, 0x73, 0x65, 0x73, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x90, 0xea, 0x30, 0x01,- 0x98, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x3a, 0x01, 0x2a, 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, 0x96, 0x01, 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,+ 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x96, 0x01, 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, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,- 0x3d, 0x8a, 0xea, 0x30, 0x19, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,- 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x90, 0xea,- 0x30, 0x01, 0x98, 0xea, 0x30, 0x01, 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, 0x95, 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, 0x28, 0x90, 0xea, 0x30, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22,- 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, 0xe4, 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, 0xa0,- 0x01, 0x8a, 0xea, 0x30, 0x10, 0x62, 0x62, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,- 0x73, 0x2e, 0x67, 0x65, 0x74, 0x90, 0xea, 0x30, 0x01, 0x98, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4,- 0x93, 0x02, 0x7e, 0x3a, 0x01, 0x2a, 0x5a, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76, 0x31,+ 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, 0x3d, 0x8a, 0xea, 0x30, 0x19, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,+ 0x63, 0x65, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65,+ 0x90, 0xea, 0x30, 0x01, 0x98, 0xea, 0x30, 0x01, 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, 0x95, 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, 0x28, 0x90, 0xea, 0x30, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01,+ 0x2a, 0x22, 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, 0xe4, 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, 0xa0, 0x01, 0x8a, 0xea, 0x30, 0x10, 0x62, 0x62, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61,+ 0x73, 0x65, 0x73, 0x2e, 0x67, 0x65, 0x74, 0x90, 0xea, 0x30, 0x01, 0x98, 0xea, 0x30, 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, 0x72, 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, 0x32, 0x8a, 0xea, 0x30, 0x12, 0x62, 0x62, 0x2e, 0x64, 0x61, 0x74, 0x61,+ 0x62, 0x61, 0x73, 0x65, 0x73, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x90, 0xea, 0x30, 0x01, 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, 0x90, 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,+ 0x29, 0x80, 0xea, 0x30, 0x01, 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, 0x60, 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, 0x1d, 0x80,+ 0xea, 0x30, 0x01, 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, 0x95, 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, 0x31, 0x80, 0xea, 0x30, 0x01, 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, 0xab, 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, 0x44, 0x90, 0xea,+ 0x30, 0x02, 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, 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, 0x72, 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, 0x32, 0x8a, 0xea, 0x30, 0x12, 0x62, 0x62, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61,- 0x73, 0x65, 0x73, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x90, 0xea, 0x30, 0x01, 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, 0x90, 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, 0x29, 0x80,- 0xea, 0x30, 0x01, 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, 0x60, 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, 0x1d, 0x80, 0xea, 0x30,- 0x01, 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, 0x95, 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,- 0x31, 0x80, 0xea, 0x30, 0x01, 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, 0xab, 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, 0x44, 0x90, 0xea, 0x30, 0x02,- 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,+ 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 (@@ -2891,27 +2881,25 @@ var file_v1_sql_service_proto_depIdxs = []int32{2, // 29: bytebase.v1.QueryHistory.type:type_name -> bytebase.v1.QueryHistory.Type33, // 30: bytebase.v1.RowValue.TimestampTZ.timestamp:type_name -> google.protobuf.Timestamp7, // 31: bytebase.v1.SQLService.Query:input_type -> bytebase.v1.QueryRequest- 3, // 32: bytebase.v1.SQLService.Execute:input_type -> bytebase.v1.ExecuteRequest- 5, // 33: bytebase.v1.SQLService.AdminExecute:input_type -> bytebase.v1.AdminExecuteRequest- 23, // 34: bytebase.v1.SQLService.SearchQueryHistories:input_type -> bytebase.v1.SearchQueryHistoriesRequest- 13, // 35: bytebase.v1.SQLService.Export:input_type -> bytebase.v1.ExportRequest- 17, // 36: bytebase.v1.SQLService.Check:input_type -> bytebase.v1.CheckRequest- 19, // 37: bytebase.v1.SQLService.ParseMyBatisMapper:input_type -> bytebase.v1.ParseMyBatisMapperRequest- 15, // 38: bytebase.v1.SQLService.Pretty:input_type -> bytebase.v1.PrettyRequest- 21, // 39: bytebase.v1.SQLService.StringifyMetadata:input_type -> bytebase.v1.StringifyMetadataRequest- 26, // 40: bytebase.v1.SQLService.GenerateRestoreSQL:input_type -> bytebase.v1.GenerateRestoreSQLRequest- 8, // 41: bytebase.v1.SQLService.Query:output_type -> bytebase.v1.QueryResponse- 4, // 42: bytebase.v1.SQLService.Execute:output_type -> bytebase.v1.ExecuteResponse- 6, // 43: bytebase.v1.SQLService.AdminExecute:output_type -> bytebase.v1.AdminExecuteResponse- 24, // 44: bytebase.v1.SQLService.SearchQueryHistories:output_type -> bytebase.v1.SearchQueryHistoriesResponse- 14, // 45: bytebase.v1.SQLService.Export:output_type -> bytebase.v1.ExportResponse- 18, // 46: bytebase.v1.SQLService.Check:output_type -> bytebase.v1.CheckResponse- 20, // 47: bytebase.v1.SQLService.ParseMyBatisMapper:output_type -> bytebase.v1.ParseMyBatisMapperResponse- 16, // 48: bytebase.v1.SQLService.Pretty:output_type -> bytebase.v1.PrettyResponse- 22, // 49: bytebase.v1.SQLService.StringifyMetadata:output_type -> bytebase.v1.StringifyMetadataResponse- 27, // 50: bytebase.v1.SQLService.GenerateRestoreSQL:output_type -> bytebase.v1.GenerateRestoreSQLResponse- 41, // [41:51] is the sub-list for method output_type- 31, // [31:41] is the sub-list for method input_type+ 5, // 32: bytebase.v1.SQLService.AdminExecute:input_type -> bytebase.v1.AdminExecuteRequest+ 23, // 33: bytebase.v1.SQLService.SearchQueryHistories:input_type -> bytebase.v1.SearchQueryHistoriesRequest+ 13, // 34: bytebase.v1.SQLService.Export:input_type -> bytebase.v1.ExportRequest+ 17, // 35: bytebase.v1.SQLService.Check:input_type -> bytebase.v1.CheckRequest+ 19, // 36: bytebase.v1.SQLService.ParseMyBatisMapper:input_type -> bytebase.v1.ParseMyBatisMapperRequest+ 15, // 37: bytebase.v1.SQLService.Pretty:input_type -> bytebase.v1.PrettyRequest+ 21, // 38: bytebase.v1.SQLService.StringifyMetadata:input_type -> bytebase.v1.StringifyMetadataRequest+ 26, // 39: bytebase.v1.SQLService.GenerateRestoreSQL:input_type -> bytebase.v1.GenerateRestoreSQLRequest+ 8, // 40: bytebase.v1.SQLService.Query:output_type -> bytebase.v1.QueryResponse+ 6, // 41: bytebase.v1.SQLService.AdminExecute:output_type -> bytebase.v1.AdminExecuteResponse+ 24, // 42: bytebase.v1.SQLService.SearchQueryHistories:output_type -> bytebase.v1.SearchQueryHistoriesResponse+ 14, // 43: bytebase.v1.SQLService.Export:output_type -> bytebase.v1.ExportResponse+ 18, // 44: bytebase.v1.SQLService.Check:output_type -> bytebase.v1.CheckResponse+ 20, // 45: bytebase.v1.SQLService.ParseMyBatisMapper:output_type -> bytebase.v1.ParseMyBatisMapperResponse+ 16, // 46: bytebase.v1.SQLService.Pretty:output_type -> bytebase.v1.PrettyResponse+ 22, // 47: bytebase.v1.SQLService.StringifyMetadata:output_type -> bytebase.v1.StringifyMetadataResponse+ 27, // 48: bytebase.v1.SQLService.GenerateRestoreSQL:output_type -> bytebase.v1.GenerateRestoreSQLResponse+ 40, // [40:49] is the sub-list for method output_type+ 31, // [31:40] is the sub-list for method input_type31, // [31:31] is the sub-list for extension type_name31, // [31:31] is the sub-list for extension extendee0, // [0:31] is the sub-list for field type_namediff --git a/proto/generated-go/v1/sql_service.pb.gw.go b/proto/generated-go/v1/sql_service.pb.gw.goindex ee2b6860f0..6b3709cadc 100644--- a/proto/generated-go/v1/sql_service.pb.gw.go+++ b/proto/generated-go/v1/sql_service.pb.gw.go@@ -151,66 +151,6 @@ func local_request_SQLService_Query_1(ctx context.Context, marshaler runtime.Mar}-func request_SQLService_Execute_0(ctx context.Context, marshaler runtime.Marshaler, client SQLServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var protoReq ExecuteRequest- 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.Execute(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))- return msg, metadata, err--}--func local_request_SQLService_Execute_0(ctx context.Context, marshaler runtime.Marshaler, server SQLServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var protoReq ExecuteRequest- 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.Execute(ctx, &protoReq)- return msg, metadata, err--}-func request_SQLService_AdminExecute_0(ctx context.Context, marshaler runtime.Marshaler, client SQLServiceClient, req *http.Request, pathParams map[string]string) (SQLService_AdminExecuteClient, runtime.ServerMetadata, chan error, error) {var metadata runtime.ServerMetadataerrChan := make(chan error, 1)@@ -685,31 +625,6 @@ func RegisterSQLServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,})- mux.Handle("POST", pattern_SQLService_Execute_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/Execute", runtime.WithHTTPPathPattern("/v1/{name=instances/*/databases/*}:execute"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := local_request_SQLService_Execute_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_Execute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)-- })-mux.Handle("GET", pattern_SQLService_AdminExecute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")_, outboundMarshaler := runtime.MarshalerForRequest(mux, req)@@ -1027,28 +942,6 @@ func RegisterSQLServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,})- mux.Handle("POST", pattern_SQLService_Execute_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/Execute", runtime.WithHTTPPathPattern("/v1/{name=instances/*/databases/*}:execute"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := request_SQLService_Execute_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_Execute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)-- })-mux.Handle("GET", pattern_SQLService_AdminExecute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()@@ -1285,8 +1178,6 @@ var (pattern_SQLService_Query_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "instances", "name"}, "query"))- pattern_SQLService_Execute_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"}, "execute"))-pattern_SQLService_AdminExecute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"v1"}, "adminExecute"))pattern_SQLService_SearchQueryHistories_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "queryHistories"}, "search"))@@ -1313,8 +1204,6 @@ var (forward_SQLService_Query_1 = runtime.ForwardResponseMessage- forward_SQLService_Execute_0 = runtime.ForwardResponseMessage-forward_SQLService_AdminExecute_0 = runtime.ForwardResponseStreamforward_SQLService_SearchQueryHistories_0 = runtime.ForwardResponseMessagediff --git a/proto/generated-go/v1/sql_service_grpc.pb.go b/proto/generated-go/v1/sql_service_grpc.pb.goindex b7e7ec3f4f..74c0c2542d 100644--- a/proto/generated-go/v1/sql_service_grpc.pb.go+++ b/proto/generated-go/v1/sql_service_grpc.pb.go@@ -20,7 +20,6 @@ const _ = grpc.SupportPackageIsVersion9const (SQLService_Query_FullMethodName = "/bytebase.v1.SQLService/Query"- SQLService_Execute_FullMethodName = "/bytebase.v1.SQLService/Execute"SQLService_AdminExecute_FullMethodName = "/bytebase.v1.SQLService/AdminExecute"SQLService_SearchQueryHistories_FullMethodName = "/bytebase.v1.SQLService/SearchQueryHistories"SQLService_Export_FullMethodName = "/bytebase.v1.SQLService/Export"@@ -36,7 +35,6 @@ const (// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.type SQLServiceClient interface {Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)- Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error)AdminExecute(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[AdminExecuteRequest, AdminExecuteResponse], error)// SearchQueryHistories searches query histories for the caller.SearchQueryHistories(ctx context.Context, in *SearchQueryHistoriesRequest, opts ...grpc.CallOption) (*SearchQueryHistoriesResponse, error)@@ -67,16 +65,6 @@ func (c *sQLServiceClient) Query(ctx context.Context, in *QueryRequest, opts ...return out, nil}-func (c *sQLServiceClient) Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error) {- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)- out := new(ExecuteResponse)- err := c.cc.Invoke(ctx, SQLService_Execute_FullMethodName, in, out, cOpts...)- if err != nil {- return nil, err- }- return out, nil-}-func (c *sQLServiceClient) AdminExecute(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[AdminExecuteRequest, AdminExecuteResponse], error) {cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)stream, err := c.cc.NewStream(ctx, &SQLService_ServiceDesc.Streams[0], SQLService_AdminExecute_FullMethodName, cOpts...)@@ -165,7 +153,6 @@ func (c *sQLServiceClient) GenerateRestoreSQL(ctx context.Context, in *GenerateR// for forward compatibility.type SQLServiceServer interface {Query(context.Context, *QueryRequest) (*QueryResponse, error)- Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error)AdminExecute(grpc.BidiStreamingServer[AdminExecuteRequest, AdminExecuteResponse]) error// SearchQueryHistories searches query histories for the caller.SearchQueryHistories(context.Context, *SearchQueryHistoriesRequest) (*SearchQueryHistoriesResponse, error)@@ -189,9 +176,6 @@ type UnimplementedSQLServiceServer struct{}func (UnimplementedSQLServiceServer) Query(context.Context, *QueryRequest) (*QueryResponse, error) {return nil, status.Errorf(codes.Unimplemented, "method Query not implemented")}-func (UnimplementedSQLServiceServer) Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error) {- return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented")-}func (UnimplementedSQLServiceServer) AdminExecute(grpc.BidiStreamingServer[AdminExecuteRequest, AdminExecuteResponse]) error {return status.Errorf(codes.Unimplemented, "method AdminExecute not implemented")}@@ -255,24 +239,6 @@ func _SQLService_Query_Handler(srv interface{}, ctx context.Context, dec func(inreturn interceptor(ctx, in, info, handler)}-func _SQLService_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {- in := new(ExecuteRequest)- if err := dec(in); err != nil {- return nil, err- }- if interceptor == nil {- return srv.(SQLServiceServer).Execute(ctx, in)- }- info := &grpc.UnaryServerInfo{- Server: srv,- FullMethod: SQLService_Execute_FullMethodName,- }- handler := func(ctx context.Context, req interface{}) (interface{}, error) {- return srv.(SQLServiceServer).Execute(ctx, req.(*ExecuteRequest))- }- return interceptor(ctx, in, info, handler)-}-func _SQLService_AdminExecute_Handler(srv interface{}, stream grpc.ServerStream) error {return srv.(SQLServiceServer).AdminExecute(&grpc.GenericServerStream[AdminExecuteRequest, AdminExecuteResponse]{ServerStream: stream})}@@ -417,10 +383,6 @@ var SQLService_ServiceDesc = grpc.ServiceDesc{MethodName: "Query",Handler: _SQLService_Query_Handler,},- {- MethodName: "Execute",- Handler: _SQLService_Execute_Handler,- },{MethodName: "SearchQueryHistories",Handler: _SQLService_SearchQueryHistories_Handler,diff --git a/proto/v1/sql_service.proto b/proto/v1/sql_service.protoindex 73f38c8500..038f84453b 100644--- a/proto/v1/sql_service.proto+++ b/proto/v1/sql_service.proto@@ -30,16 +30,6 @@ service SQLService {option (bytebase.v1.audit) = true;}- rpc Execute(ExecuteRequest) returns (ExecuteResponse) {- option (google.api.http) = {- post: "/v1/{name=instances/*/databases/*}:execute"- body: "*"- };- option (bytebase.v1.permission) = "bb.databases.execute";- option (bytebase.v1.auth_method) = IAM;- option (bytebase.v1.audit) = true;- }-rpc AdminExecute(stream AdminExecuteRequest) returns (stream AdminExecuteResponse) {// GRPC streaming / websocket requires GET method instead of POST.option (google.api.http) = {get: "/v1:adminExecute"};