Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: delete unused api (#13438)

h3n4lcc1df82765c7
diff --git a/backend/api/v1/sql_service.go b/backend/api/v1/sql_service.go
index cd64a9018c..a0ce8c0092 100644
--- a/backend/api/v1/sql_service.go
+++ b/backend/api/v1/sql_service.go
@@ -1234,23 +1234,6 @@ func (*SQLService) ParseMyBatisMapper(_ context.Context, request *v1pb.ParseMyBa
}, nil
}
-// DifferPreview returns the diff preview of the given SQL statement and metadata.
-func (*SQLService) DifferPreview(ctx context.Context, request *v1pb.DifferPreviewRequest) (*v1pb.DifferPreviewResponse, error) {
- storeSchemaMetadata, _, err := convertV1DatabaseMetadata(ctx, request.NewMetadata, nil /* optionalStores */)
- if err != nil {
- return nil, err
- }
- defaultSchema := extractDefaultSchemaForOracleBranch(storepb.Engine(request.Engine), storeSchemaMetadata)
- schema, err := schema.GetDesignSchema(storepb.Engine(request.Engine), defaultSchema, request.OldSchema, storeSchemaMetadata)
- if err != nil {
- return nil, err
- }
-
- return &v1pb.DifferPreviewResponse{
- Schema: schema,
- }, nil
-}
-
// StringifyMetadata returns the stringified schema of the given metadata.
func (*SQLService) StringifyMetadata(ctx context.Context, request *v1pb.StringifyMetadataRequest) (*v1pb.StringifyMetadataResponse, error) {
switch request.Engine {
diff --git a/frontend/src/types/proto/v1/branch_service.ts b/frontend/src/types/proto/v1/branch_service.ts
index 3709f77fa5..54481c4a2f 100644
--- a/frontend/src/types/proto/v1/branch_service.ts
+++ b/frontend/src/types/proto/v1/branch_service.ts
@@ -2188,82 +2188,6 @@ export const BranchServiceDefinition = {
},
},
},
- /**
- * DiffDatabase works similar to branch rebase.
- * 1) set the base as the schema of a database;
- * 2) apply the changes between base and head of branch to the new base (schema of database);
- * 3) return the diff DDLs similar to DiffSchema in database service.
- * 4) return the conflict schema if conflict needs to be resolved by user. Once resolved, user
- * will call DiffSchema() in database service to get diff DDLs.
- */
- diffDatabase: {
- name: "DiffDatabase",
- requestType: DiffDatabaseRequest,
- requestStream: false,
- responseType: DiffDatabaseResponse,
- responseStream: false,
- options: {
- _unknownFields: {
- 8410: [new Uint8Array([4, 110, 97, 109, 101])],
- 800010: [
- new Uint8Array([18, 98, 98, 46, 98, 114, 97, 110, 99, 104, 101, 115, 46, 117, 112, 100, 97, 116, 101]),
- ],
- 800016: [new Uint8Array([1])],
- 578365826: [
- new Uint8Array([
- 47,
- 34,
- 45,
- 47,
- 118,
- 49,
- 47,
- 123,
- 110,
- 97,
- 109,
- 101,
- 61,
- 112,
- 114,
- 111,
- 106,
- 101,
- 99,
- 116,
- 115,
- 47,
- 42,
- 47,
- 98,
- 114,
- 97,
- 110,
- 99,
- 104,
- 101,
- 115,
- 47,
- 42,
- 125,
- 58,
- 100,
- 105,
- 102,
- 102,
- 68,
- 97,
- 116,
- 97,
- 98,
- 97,
- 115,
- 101,
- ]),
- ],
- },
- },
- },
diffMetadata: {
name: "DiffMetadata",
requestType: DiffMetadataRequest,
diff --git a/frontend/src/types/proto/v1/sql_service.ts b/frontend/src/types/proto/v1/sql_service.ts
index 781b1a17e0..8a511a54c8 100644
--- a/frontend/src/types/proto/v1/sql_service.ts
+++ b/frontend/src/types/proto/v1/sql_service.ts
@@ -3676,49 +3676,6 @@ export const SQLServiceDefinition = {
},
},
},
- differPreview: {
- name: "DifferPreview",
- requestType: DifferPreviewRequest,
- requestStream: false,
- responseType: DifferPreviewResponse,
- responseStream: false,
- options: {
- _unknownFields: {
- 800000: [new Uint8Array([1])],
- 578365826: [
- new Uint8Array([
- 26,
- 58,
- 1,
- 42,
- 34,
- 21,
- 47,
- 118,
- 49,
- 47,
- 115,
- 113,
- 108,
- 47,
- 100,
- 105,
- 102,
- 102,
- 101,
- 114,
- 80,
- 114,
- 101,
- 118,
- 105,
- 101,
- 119,
- ]),
- ],
- },
- },
- },
check: {
name: "Check",
requestType: CheckRequest,
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index eb0fbc5eae..a0115a6b83 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -3591,49 +3591,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Status'
- /v1/projects/{project}/branches/{branche}:diffDatabase:
- post:
- tags:
- - BranchService
- description: |-
- DiffDatabase works similar to branch rebase.
- 1) set the base as the schema of a database;
- 2) apply the changes between base and head of branch to the new base (schema of database);
- 3) return the diff DDLs similar to DiffSchema in database service.
- 4) return the conflict schema if conflict needs to be resolved by user. Once resolved, user
- will call DiffSchema() in database service to get diff DDLs.
- operationId: BranchService_DiffDatabase
- parameters:
- - name: project
- in: path
- description: The project id.
- required: true
- schema:
- type: string
- - name: branche
- in: path
- description: The branche id.
- required: true
- schema:
- type: string
- - name: database
- in: query
- description: The name of the databsae to merge the branch to.
- schema:
- type: string
- responses:
- "200":
- description: OK
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DiffDatabaseResponse'
- default:
- description: Default error response
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Status'
/v1/projects/{project}/branches/{branche}:merge:
post:
tags:
@@ -6922,30 +6879,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Status'
- /v1/sql/differPreview:
- post:
- tags:
- - SQLService
- operationId: SQLService_DifferPreview
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DifferPreviewRequest'
- required: true
- responses:
- "200":
- description: OK
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DifferPreviewResponse'
- default:
- description: Default error response
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Status'
/v1/sql/parseMyBatisMapper:
post:
tags:
@@ -9317,23 +9250,6 @@ components:
properties:
labelSelector:
$ref: '#/components/schemas/LabelSelector'
- DiffDatabaseResponse:
- type: object
- properties:
- diff:
- type: string
- description: The schema diff when merge occurs seamlessly.
- schema:
- type: string
- description: The merged schema if there is no conflict.
- conflictSchema:
- type: string
- description: |-
- The conflict schema when rebase has conflicts.
- The conflict section is enclosed by the following.
- <<<<< HEAD
- ====
- >>>>> main
DiffMetadataRequest:
required:
- sourceMetadata
@@ -9415,47 +9331,6 @@ components:
properties:
diff:
type: string
- DifferPreviewRequest:
- type: object
- properties:
- engine:
- enum:
- - ENGINE_UNSPECIFIED
- - CLICKHOUSE
- - MYSQL
- - POSTGRES
- - SNOWFLAKE
- - SQLITE
- - TIDB
- - MONGODB
- - REDIS
- - ORACLE
- - SPANNER
- - MSSQL
- - REDSHIFT
- - MARIADB
- - OCEANBASE
- - DM
- - RISINGWAVE
- - OCEANBASE_ORACLE
- - STARROCKS
- - DORIS
- - HIVE
- - ELASTICSEARCH
- - BIGQUERY
- - DYNAMODB
- - DATABRICKS
- type: string
- format: enum
- oldSchema:
- type: string
- newMetadata:
- $ref: '#/components/schemas/DatabaseMetadata'
- DifferPreviewResponse:
- type: object
- properties:
- schema:
- type: string
DisableCopyDataPolicy:
type: object
properties:
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 9dfac9c33f..64a5a2572a 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -4132,7 +4132,6 @@ The branch&#39;s `name` field is used to identify the branch to update. Format:
| MergeBranch | [MergeBranchRequest](#bytebase-v1-MergeBranchRequest) | [Branch](#bytebase-v1-Branch) | |
| RebaseBranch | [RebaseBranchRequest](#bytebase-v1-RebaseBranchRequest) | [RebaseBranchResponse](#bytebase-v1-RebaseBranchResponse) | |
| DeleteBranch | [DeleteBranchRequest](#bytebase-v1-DeleteBranchRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
-| DiffDatabase | [DiffDatabaseRequest](#bytebase-v1-DiffDatabaseRequest) | [DiffDatabaseResponse](#bytebase-v1-DiffDatabaseResponse) | DiffDatabase works similar to branch rebase. 1) set the base as the schema of a database; 2) apply the changes between base and head of branch to the new base (schema of database); 3) return the diff DDLs similar to DiffSchema in database service. 4) return the conflict schema if conflict needs to be resolved by user. Once resolved, user will call DiffSchema() in database service to get diff DDLs. |
| DiffMetadata | [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest) | [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse) | |
@@ -10542,7 +10541,6 @@ Type of the SheetPayload.
| 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) | |
-| DifferPreview | [DifferPreviewRequest](#bytebase-v1-DifferPreviewRequest) | [DifferPreviewResponse](#bytebase-v1-DifferPreviewResponse) | |
| Check | [CheckRequest](#bytebase-v1-CheckRequest) | [CheckResponse](#bytebase-v1-CheckResponse) | |
| ParseMyBatisMapper | [ParseMyBatisMapperRequest](#bytebase-v1-ParseMyBatisMapperRequest) | [ParseMyBatisMapperResponse](#bytebase-v1-ParseMyBatisMapperResponse) | |
| Pretty | [PrettyRequest](#bytebase-v1-PrettyRequest) | [PrettyResponse](#bytebase-v1-PrettyResponse) | |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index 8a84007c79..2d06624a06 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -12132,18 +12132,6 @@ The API will default to the BASIC view.</p></td>
<td><p></p></td>
</tr>
- <tr>
- <td>DiffDatabase</td>
- <td><a href="#bytebase.v1.DiffDatabaseRequest">DiffDatabaseRequest</a></td>
- <td><a href="#bytebase.v1.DiffDatabaseResponse">DiffDatabaseResponse</a></td>
- <td><p>DiffDatabase works similar to branch rebase.
-1) set the base as the schema of a database;
-2) apply the changes between base and head of branch to the new base (schema of database);
-3) return the diff DDLs similar to DiffSchema in database service.
-4) return the conflict schema if conflict needs to be resolved by user. Once resolved, user
-will call DiffSchema() in database service to get diff DDLs.</p></td>
- </tr>
-
<tr>
<td>DiffMetadata</td>
<td><a href="#bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</a></td>
@@ -12241,16 +12229,6 @@ will call DiffSchema() in database service to get diff DDLs.</p></td>
- <tr>
- <td>DiffDatabase</td>
- <td>POST</td>
- <td>/v1/{name=projects/*/branches/*}:diffDatabase</td>
- <td></td>
- </tr>
-
-
-
-
<tr>
<td>DiffMetadata</td>
<td>POST</td>
@@ -28656,13 +28634,6 @@ to retrieve the next page of history. </p></td>
<td><p></p></td>
</tr>
- <tr>
- <td>DifferPreview</td>
- <td><a href="#bytebase.v1.DifferPreviewRequest">DifferPreviewRequest</a></td>
- <td><a href="#bytebase.v1.DifferPreviewResponse">DifferPreviewResponse</a></td>
- <td><p></p></td>
- </tr>
-
<tr>
<td>Check</td>
<td><a href="#bytebase.v1.CheckRequest">CheckRequest</a></td>
@@ -28789,16 +28760,6 @@ to retrieve the next page of history. </p></td>
- <tr>
- <td>DifferPreview</td>
- <td>POST</td>
- <td>/v1/sql/differPreview</td>
- <td>*</td>
- </tr>
-
-
-
-
<tr>
<td>Check</td>
<td>POST</td>
diff --git a/proto/generated-go/v1/branch_service.pb.go b/proto/generated-go/v1/branch_service.pb.go
index 8e29d5b9a0..d775367dd1 100644
--- a/proto/generated-go/v1/branch_service.pb.go
+++ b/proto/generated-go/v1/branch_service.pb.go
@@ -1383,7 +1383,7 @@ var file_v1_branch_service_proto_rawDesc = []byte{
0x45, 0x57, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
0x12, 0x15, 0x0a, 0x11, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f,
0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x52, 0x41, 0x4e, 0x43,
- 0x48, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x02, 0x32, 0x8d, 0x0b,
+ 0x48, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x02, 0x32, 0xdf, 0x09,
0x0a, 0x0d, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
0x87, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x1d, 0x2e,
0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42,
@@ -1453,28 +1453,17 @@ var file_v1_branch_service_proto_rawDesc = []byte{
0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x90,
0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x2a, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b,
0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f,
- 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xab, 0x01, 0x0a, 0x0c,
- 0x44, 0x69, 0x66, 0x66, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x20, 0x2e, 0x62,
- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x44,
- 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21,
- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66,
- 0x66, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x22, 0x56, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xea, 0x30, 0x12, 0x62, 0x62,
- 0x2e, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
- 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x22, 0x2d, 0x2f, 0x76, 0x31, 0x2f,
- 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a,
- 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x64, 0x69, 0x66,
- 0x66, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x0c, 0x44, 0x69,
- 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74,
- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74,
- 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62,
+ 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x81, 0x01, 0x0a, 0x0c,
+ 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x20, 0x2e, 0x62,
0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x4d,
- 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
- 0x2c, 0x80, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d,
- 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e,
- 0x3a, 0x64, 0x69, 0x66, 0x66, 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, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66,
+ 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x22, 0x2c, 0x80, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a,
+ 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69,
+ 0x67, 0x6e, 0x3a, 0x64, 0x69, 0x66, 0x66, 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,
}
var (
@@ -1535,19 +1524,17 @@ var file_v1_branch_service_proto_depIdxs = []int32{
7, // 18: bytebase.v1.BranchService.MergeBranch:input_type -> bytebase.v1.MergeBranchRequest
8, // 19: bytebase.v1.BranchService.RebaseBranch:input_type -> bytebase.v1.RebaseBranchRequest
10, // 20: bytebase.v1.BranchService.DeleteBranch:input_type -> bytebase.v1.DeleteBranchRequest
- 11, // 21: bytebase.v1.BranchService.DiffDatabase:input_type -> bytebase.v1.DiffDatabaseRequest
- 13, // 22: bytebase.v1.BranchService.DiffMetadata:input_type -> bytebase.v1.DiffMetadataRequest
- 1, // 23: bytebase.v1.BranchService.GetBranch:output_type -> bytebase.v1.Branch
- 4, // 24: bytebase.v1.BranchService.ListBranches:output_type -> bytebase.v1.ListBranchesResponse
- 1, // 25: bytebase.v1.BranchService.CreateBranch:output_type -> bytebase.v1.Branch
- 1, // 26: bytebase.v1.BranchService.UpdateBranch:output_type -> bytebase.v1.Branch
- 1, // 27: bytebase.v1.BranchService.MergeBranch:output_type -> bytebase.v1.Branch
- 9, // 28: bytebase.v1.BranchService.RebaseBranch:output_type -> bytebase.v1.RebaseBranchResponse
- 19, // 29: bytebase.v1.BranchService.DeleteBranch:output_type -> google.protobuf.Empty
- 12, // 30: bytebase.v1.BranchService.DiffDatabase:output_type -> bytebase.v1.DiffDatabaseResponse
- 14, // 31: bytebase.v1.BranchService.DiffMetadata:output_type -> bytebase.v1.DiffMetadataResponse
- 23, // [23:32] is the sub-list for method output_type
- 14, // [14:23] is the sub-list for method input_type
+ 13, // 21: bytebase.v1.BranchService.DiffMetadata:input_type -> bytebase.v1.DiffMetadataRequest
+ 1, // 22: bytebase.v1.BranchService.GetBranch:output_type -> bytebase.v1.Branch
+ 4, // 23: bytebase.v1.BranchService.ListBranches:output_type -> bytebase.v1.ListBranchesResponse
+ 1, // 24: bytebase.v1.BranchService.CreateBranch:output_type -> bytebase.v1.Branch
+ 1, // 25: bytebase.v1.BranchService.UpdateBranch:output_type -> bytebase.v1.Branch
+ 1, // 26: bytebase.v1.BranchService.MergeBranch:output_type -> bytebase.v1.Branch
+ 9, // 27: bytebase.v1.BranchService.RebaseBranch:output_type -> bytebase.v1.RebaseBranchResponse
+ 19, // 28: bytebase.v1.BranchService.DeleteBranch:output_type -> google.protobuf.Empty
+ 14, // 29: bytebase.v1.BranchService.DiffMetadata:output_type -> bytebase.v1.DiffMetadataResponse
+ 22, // [22:30] is the sub-list for method output_type
+ 14, // [14:22] is the sub-list for method input_type
14, // [14:14] is the sub-list for extension type_name
14, // [14:14] is the sub-list for extension extendee
0, // [0:14] is the sub-list for field type_name
diff --git a/proto/generated-go/v1/branch_service.pb.gw.go b/proto/generated-go/v1/branch_service.pb.gw.go
index 61ecf29b44..e056b7dffb 100644
--- a/proto/generated-go/v1/branch_service.pb.gw.go
+++ b/proto/generated-go/v1/branch_service.pb.gw.go
@@ -541,76 +541,6 @@ func local_request_BranchService_DeleteBranch_0(ctx context.Context, marshaler r
}
-var (
- filter_BranchService_DiffDatabase_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
-)
-
-func request_BranchService_DiffDatabase_0(ctx context.Context, marshaler runtime.Marshaler, client BranchServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq DiffDatabaseRequest
- var metadata runtime.ServerMetadata
-
- 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)
- }
-
- if err := req.ParseForm(); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BranchService_DiffDatabase_0); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
-
- msg, err := client.DiffDatabase(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
- return msg, metadata, err
-
-}
-
-func local_request_BranchService_DiffDatabase_0(ctx context.Context, marshaler runtime.Marshaler, server BranchServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq DiffDatabaseRequest
- var metadata runtime.ServerMetadata
-
- 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)
- }
-
- if err := req.ParseForm(); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BranchService_DiffDatabase_0); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
-
- msg, err := server.DiffDatabase(ctx, &protoReq)
- return msg, metadata, err
-
-}
-
func request_BranchService_DiffMetadata_0(ctx context.Context, marshaler runtime.Marshaler, client BranchServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq DiffMetadataRequest
var metadata runtime.ServerMetadata
@@ -819,31 +749,6 @@ func RegisterBranchServiceHandlerServer(ctx context.Context, mux *runtime.ServeM
})
- mux.Handle("POST", pattern_BranchService_DiffDatabase_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.BranchService/DiffDatabase", runtime.WithHTTPPathPattern("/v1/{name=projects/*/branches/*}:diffDatabase"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_BranchService_DiffDatabase_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_BranchService_DiffDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
- })
-
mux.Handle("POST", pattern_BranchService_DiffMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1064,28 +969,6 @@ func RegisterBranchServiceHandlerClient(ctx context.Context, mux *runtime.ServeM
})
- mux.Handle("POST", pattern_BranchService_DiffDatabase_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.BranchService/DiffDatabase", runtime.WithHTTPPathPattern("/v1/{name=projects/*/branches/*}:diffDatabase"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := request_BranchService_DiffDatabase_0(annotatedContext, inboundMarshaler, client, req, pathParams)
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
-
- forward_BranchService_DiffDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
- })
-
mux.Handle("POST", pattern_BranchService_DiffMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1126,8 +1009,6 @@ var (
pattern_BranchService_DeleteBranch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "branches", "name"}, ""))
- pattern_BranchService_DiffDatabase_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "branches", "name"}, "diffDatabase"))
-
pattern_BranchService_DiffMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "schemaDesign"}, "diffMetadata"))
)
@@ -1146,7 +1027,5 @@ var (
forward_BranchService_DeleteBranch_0 = runtime.ForwardResponseMessage
- forward_BranchService_DiffDatabase_0 = runtime.ForwardResponseMessage
-
forward_BranchService_DiffMetadata_0 = runtime.ForwardResponseMessage
)
diff --git a/proto/generated-go/v1/branch_service_grpc.pb.go b/proto/generated-go/v1/branch_service_grpc.pb.go
index 05899c79a0..e5c4cee320 100644
--- a/proto/generated-go/v1/branch_service_grpc.pb.go
+++ b/proto/generated-go/v1/branch_service_grpc.pb.go
@@ -27,7 +27,6 @@ const (
BranchService_MergeBranch_FullMethodName = "/bytebase.v1.BranchService/MergeBranch"
BranchService_RebaseBranch_FullMethodName = "/bytebase.v1.BranchService/RebaseBranch"
BranchService_DeleteBranch_FullMethodName = "/bytebase.v1.BranchService/DeleteBranch"
- BranchService_DiffDatabase_FullMethodName = "/bytebase.v1.BranchService/DiffDatabase"
BranchService_DiffMetadata_FullMethodName = "/bytebase.v1.BranchService/DiffMetadata"
)
@@ -42,13 +41,6 @@ type BranchServiceClient interface {
MergeBranch(ctx context.Context, in *MergeBranchRequest, opts ...grpc.CallOption) (*Branch, error)
RebaseBranch(ctx context.Context, in *RebaseBranchRequest, opts ...grpc.CallOption) (*RebaseBranchResponse, error)
DeleteBranch(ctx context.Context, in *DeleteBranchRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
- // DiffDatabase works similar to branch rebase.
- // 1) set the base as the schema of a database;
- // 2) apply the changes between base and head of branch to the new base (schema of database);
- // 3) return the diff DDLs similar to DiffSchema in database service.
- // 4) return the conflict schema if conflict needs to be resolved by user. Once resolved, user
- // will call DiffSchema() in database service to get diff DDLs.
- DiffDatabase(ctx context.Context, in *DiffDatabaseRequest, opts ...grpc.CallOption) (*DiffDatabaseResponse, error)
DiffMetadata(ctx context.Context, in *DiffMetadataRequest, opts ...grpc.CallOption) (*DiffMetadataResponse, error)
}
@@ -130,16 +122,6 @@ func (c *branchServiceClient) DeleteBranch(ctx context.Context, in *DeleteBranch
return out, nil
}
-func (c *branchServiceClient) DiffDatabase(ctx context.Context, in *DiffDatabaseRequest, opts ...grpc.CallOption) (*DiffDatabaseResponse, error) {
- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(DiffDatabaseResponse)
- err := c.cc.Invoke(ctx, BranchService_DiffDatabase_FullMethodName, in, out, cOpts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
func (c *branchServiceClient) DiffMetadata(ctx context.Context, in *DiffMetadataRequest, opts ...grpc.CallOption) (*DiffMetadataResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DiffMetadataResponse)
@@ -161,13 +143,6 @@ type BranchServiceServer interface {
MergeBranch(context.Context, *MergeBranchRequest) (*Branch, error)
RebaseBranch(context.Context, *RebaseBranchRequest) (*RebaseBranchResponse, error)
DeleteBranch(context.Context, *DeleteBranchRequest) (*emptypb.Empty, error)
- // DiffDatabase works similar to branch rebase.
- // 1) set the base as the schema of a database;
- // 2) apply the changes between base and head of branch to the new base (schema of database);
- // 3) return the diff DDLs similar to DiffSchema in database service.
- // 4) return the conflict schema if conflict needs to be resolved by user. Once resolved, user
- // will call DiffSchema() in database service to get diff DDLs.
- DiffDatabase(context.Context, *DiffDatabaseRequest) (*DiffDatabaseResponse, error)
DiffMetadata(context.Context, *DiffMetadataRequest) (*DiffMetadataResponse, error)
mustEmbedUnimplementedBranchServiceServer()
}
@@ -200,9 +175,6 @@ func (UnimplementedBranchServiceServer) RebaseBranch(context.Context, *RebaseBra
func (UnimplementedBranchServiceServer) DeleteBranch(context.Context, *DeleteBranchRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteBranch not implemented")
}
-func (UnimplementedBranchServiceServer) DiffDatabase(context.Context, *DiffDatabaseRequest) (*DiffDatabaseResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method DiffDatabase not implemented")
-}
func (UnimplementedBranchServiceServer) DiffMetadata(context.Context, *DiffMetadataRequest) (*DiffMetadataResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DiffMetadata not implemented")
}
@@ -353,24 +325,6 @@ func _BranchService_DeleteBranch_Handler(srv interface{}, ctx context.Context, d
return interceptor(ctx, in, info, handler)
}
-func _BranchService_DiffDatabase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DiffDatabaseRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(BranchServiceServer).DiffDatabase(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: BranchService_DiffDatabase_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(BranchServiceServer).DiffDatabase(ctx, req.(*DiffDatabaseRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
func _BranchService_DiffMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DiffMetadataRequest)
if err := dec(in); err != nil {
@@ -424,10 +378,6 @@ var BranchService_ServiceDesc = grpc.ServiceDesc{
MethodName: "DeleteBranch",
Handler: _BranchService_DeleteBranch_Handler,
},
- {
- MethodName: "DiffDatabase",
- Handler: _BranchService_DiffDatabase_Handler,
- },
{
MethodName: "DiffMetadata",
Handler: _BranchService_DiffMetadata_Handler,
diff --git a/proto/generated-go/v1/sql_service.pb.go b/proto/generated-go/v1/sql_service.pb.go
index e0f6fb5adc..bc5999143e 100644
--- a/proto/generated-go/v1/sql_service.pb.go
+++ b/proto/generated-go/v1/sql_service.pb.go
@@ -2484,7 +2484,7 @@ var file_v1_sql_service_proto_rawDesc = []byte{
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, 0xa4, 0x0d, 0x0a, 0x0a, 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72,
+ 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0xa6, 0x0c, 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, 0x74, 0x65,
@@ -2540,59 +2540,51 @@ var file_v1_sql_service_proto_rawDesc = []byte{
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,
- 0x7c, 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,
- 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x65, 0x72, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x80, 0xea, 0x30, 0x01, 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, 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,
+ 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,
}
var (
@@ -2684,25 +2676,23 @@ var file_v1_sql_service_proto_depIdxs = []int32{
5, // 31: bytebase.v1.SQLService.AdminExecute:input_type -> bytebase.v1.AdminExecuteRequest
25, // 32: bytebase.v1.SQLService.SearchQueryHistories:input_type -> bytebase.v1.SearchQueryHistoriesRequest
13, // 33: bytebase.v1.SQLService.Export:input_type -> bytebase.v1.ExportRequest
- 15, // 34: bytebase.v1.SQLService.DifferPreview:input_type -> bytebase.v1.DifferPreviewRequest
- 19, // 35: bytebase.v1.SQLService.Check:input_type -> bytebase.v1.CheckRequest
- 21, // 36: bytebase.v1.SQLService.ParseMyBatisMapper:input_type -> bytebase.v1.ParseMyBatisMapperRequest
- 17, // 37: bytebase.v1.SQLService.Pretty:input_type -> bytebase.v1.PrettyRequest
- 23, // 38: bytebase.v1.SQLService.StringifyMetadata:input_type -> bytebase.v1.StringifyMetadataRequest
- 28, // 39: bytebase.v1.SQLService.GenerateRestoreSQL:input_type -> bytebase.v1.GenerateRestoreSQLRequest
- 8, // 40: bytebase.v1.SQLService.Query:output_type -> bytebase.v1.QueryResponse
- 4, // 41: bytebase.v1.SQLService.Execute:output_type -> bytebase.v1.ExecuteResponse
- 6, // 42: bytebase.v1.SQLService.AdminExecute:output_type -> bytebase.v1.AdminExecuteResponse
- 26, // 43: bytebase.v1.SQLService.SearchQueryHistories:output_type -> bytebase.v1.SearchQueryHistoriesResponse
- 14, // 44: bytebase.v1.SQLService.Export:output_type -> bytebase.v1.ExportResponse
- 16, // 45: bytebase.v1.SQLService.DifferPreview:output_type -> bytebase.v1.DifferPreviewResponse
- 20, // 46: bytebase.v1.SQLService.Check:output_type -> bytebase.v1.CheckResponse
- 22, // 47: bytebase.v1.SQLService.ParseMyBatisMapper:output_type -> bytebase.v1.ParseMyBatisMapperResponse
- 18, // 48: bytebase.v1.SQLService.Pretty:output_type -> bytebase.v1.PrettyResponse
- 24, // 49: bytebase.v1.SQLService.StringifyMetadata:output_type -> bytebase.v1.StringifyMetadataResponse
- 29, // 50: bytebase.v1.SQLService.GenerateRestoreSQL:output_type -> bytebase.v1.GenerateRestoreSQLResponse
- 40, // [40:51] is the sub-list for method output_type
- 29, // [29:40] is the sub-list for method input_type
+ 19, // 34: bytebase.v1.SQLService.Check:input_type -> bytebase.v1.CheckRequest
+ 21, // 35: bytebase.v1.SQLService.ParseMyBatisMapper:input_type -> bytebase.v1.ParseMyBatisMapperRequest
+ 17, // 36: bytebase.v1.SQLService.Pretty:input_type -> bytebase.v1.PrettyRequest
+ 23, // 37: bytebase.v1.SQLService.StringifyMetadata:input_type -> bytebase.v1.StringifyMetadataRequest
+ 28, // 38: bytebase.v1.SQLService.GenerateRestoreSQL:input_type -> bytebase.v1.GenerateRestoreSQLRequest
+ 8, // 39: bytebase.v1.SQLService.Query:output_type -> bytebase.v1.QueryResponse
+ 4, // 40: bytebase.v1.SQLService.Execute:output_type -> bytebase.v1.ExecuteResponse
+ 6, // 41: bytebase.v1.SQLService.AdminExecute:output_type -> bytebase.v1.AdminExecuteResponse
+ 26, // 42: bytebase.v1.SQLService.SearchQueryHistories:output_type -> bytebase.v1.SearchQueryHistoriesResponse
+ 14, // 43: bytebase.v1.SQLService.Export:output_type -> bytebase.v1.ExportResponse
+ 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
+ 39, // [39:49] is the sub-list for method output_type
+ 29, // [29:39] is the sub-list for method input_type
29, // [29:29] is the sub-list for extension type_name
29, // [29:29] is the sub-list for extension extendee
0, // [0:29] is the sub-list for field type_name
diff --git a/proto/generated-go/v1/sql_service.pb.gw.go b/proto/generated-go/v1/sql_service.pb.gw.go
index 2c3251eed2..b35492e803 100644
--- a/proto/generated-go/v1/sql_service.pb.gw.go
+++ b/proto/generated-go/v1/sql_service.pb.gw.go
@@ -460,32 +460,6 @@ func local_request_SQLService_Export_2(ctx context.Context, marshaler runtime.Ma
}
-func request_SQLService_DifferPreview_0(ctx context.Context, marshaler runtime.Marshaler, client SQLServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq DifferPreviewRequest
- 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)
- }
-
- msg, err := client.DifferPreview(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
- return msg, metadata, err
-
-}
-
-func local_request_SQLService_DifferPreview_0(ctx context.Context, marshaler runtime.Marshaler, server SQLServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq DifferPreviewRequest
- 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)
- }
-
- msg, err := server.DifferPreview(ctx, &protoReq)
- return msg, metadata, err
-
-}
-
func request_SQLService_Check_0(ctx context.Context, marshaler runtime.Marshaler, client SQLServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq CheckRequest
var metadata runtime.ServerMetadata
@@ -839,31 +813,6 @@ func RegisterSQLServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
})
- mux.Handle("POST", pattern_SQLService_DifferPreview_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/DifferPreview", runtime.WithHTTPPathPattern("/v1/sql/differPreview"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_SQLService_DifferPreview_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_DifferPreview_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
- })
-
mux.Handle("POST", pattern_SQLService_Check_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1206,28 +1155,6 @@ func RegisterSQLServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
})
- mux.Handle("POST", pattern_SQLService_DifferPreview_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/DifferPreview", runtime.WithHTTPPathPattern("/v1/sql/differPreview"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := request_SQLService_DifferPreview_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_DifferPreview_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
- })
-
mux.Handle("POST", pattern_SQLService_Check_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1358,8 +1285,6 @@ var (
pattern_SQLService_Export_2 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "issues", "name"}, "export"))
- pattern_SQLService_DifferPreview_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "sql", "differPreview"}, ""))
-
pattern_SQLService_Check_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "sql", "check"}, ""))
pattern_SQLService_ParseMyBatisMapper_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "sql", "parseMyBatisMapper"}, ""))
@@ -1388,8 +1313,6 @@ var (
forward_SQLService_Export_2 = runtime.ForwardResponseMessage
- forward_SQLService_DifferPreview_0 = runtime.ForwardResponseMessage
-
forward_SQLService_Check_0 = runtime.ForwardResponseMessage
forward_SQLService_ParseMyBatisMapper_0 = runtime.ForwardResponseMessage
diff --git a/proto/generated-go/v1/sql_service_grpc.pb.go b/proto/generated-go/v1/sql_service_grpc.pb.go
index f66bff0295..b7e7ec3f4f 100644
--- a/proto/generated-go/v1/sql_service_grpc.pb.go
+++ b/proto/generated-go/v1/sql_service_grpc.pb.go
@@ -24,7 +24,6 @@ const (
SQLService_AdminExecute_FullMethodName = "/bytebase.v1.SQLService/AdminExecute"
SQLService_SearchQueryHistories_FullMethodName = "/bytebase.v1.SQLService/SearchQueryHistories"
SQLService_Export_FullMethodName = "/bytebase.v1.SQLService/Export"
- SQLService_DifferPreview_FullMethodName = "/bytebase.v1.SQLService/DifferPreview"
SQLService_Check_FullMethodName = "/bytebase.v1.SQLService/Check"
SQLService_ParseMyBatisMapper_FullMethodName = "/bytebase.v1.SQLService/ParseMyBatisMapper"
SQLService_Pretty_FullMethodName = "/bytebase.v1.SQLService/Pretty"
@@ -42,7 +41,6 @@ type SQLServiceClient interface {
// SearchQueryHistories searches query histories for the caller.
SearchQueryHistories(ctx context.Context, in *SearchQueryHistoriesRequest, opts ...grpc.CallOption) (*SearchQueryHistoriesResponse, error)
Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (*ExportResponse, error)
- DifferPreview(ctx context.Context, in *DifferPreviewRequest, opts ...grpc.CallOption) (*DifferPreviewResponse, error)
Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error)
ParseMyBatisMapper(ctx context.Context, in *ParseMyBatisMapperRequest, opts ...grpc.CallOption) (*ParseMyBatisMapperResponse, error)
Pretty(ctx context.Context, in *PrettyRequest, opts ...grpc.CallOption) (*PrettyResponse, error)
@@ -112,16 +110,6 @@ func (c *sQLServiceClient) Export(ctx context.Context, in *ExportRequest, opts .
return out, nil
}
-func (c *sQLServiceClient) DifferPreview(ctx context.Context, in *DifferPreviewRequest, opts ...grpc.CallOption) (*DifferPreviewResponse, error) {
- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(DifferPreviewResponse)
- err := c.cc.Invoke(ctx, SQLService_DifferPreview_FullMethodName, in, out, cOpts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
func (c *sQLServiceClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CheckResponse)
@@ -182,7 +170,6 @@ type SQLServiceServer interface {
// SearchQueryHistories searches query histories for the caller.
SearchQueryHistories(context.Context, *SearchQueryHistoriesRequest) (*SearchQueryHistoriesResponse, error)
Export(context.Context, *ExportRequest) (*ExportResponse, error)
- DifferPreview(context.Context, *DifferPreviewRequest) (*DifferPreviewResponse, error)
Check(context.Context, *CheckRequest) (*CheckResponse, error)
ParseMyBatisMapper(context.Context, *ParseMyBatisMapperRequest) (*ParseMyBatisMapperResponse, error)
Pretty(context.Context, *PrettyRequest) (*PrettyResponse, error)
@@ -214,9 +201,6 @@ func (UnimplementedSQLServiceServer) SearchQueryHistories(context.Context, *Sear
func (UnimplementedSQLServiceServer) Export(context.Context, *ExportRequest) (*ExportResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Export not implemented")
}
-func (UnimplementedSQLServiceServer) DifferPreview(context.Context, *DifferPreviewRequest) (*DifferPreviewResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method DifferPreview not implemented")
-}
func (UnimplementedSQLServiceServer) Check(context.Context, *CheckRequest) (*CheckResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Check not implemented")
}
@@ -332,24 +316,6 @@ func _SQLService_Export_Handler(srv interface{}, ctx context.Context, dec func(i
return interceptor(ctx, in, info, handler)
}
-func _SQLService_DifferPreview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DifferPreviewRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SQLServiceServer).DifferPreview(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: SQLService_DifferPreview_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SQLServiceServer).DifferPreview(ctx, req.(*DifferPreviewRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
func _SQLService_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CheckRequest)
if err := dec(in); err != nil {
@@ -463,10 +429,6 @@ var SQLService_ServiceDesc = grpc.ServiceDesc{
MethodName: "Export",
Handler: _SQLService_Export_Handler,
},
- {
- MethodName: "DifferPreview",
- Handler: _SQLService_DifferPreview_Handler,
- },
{
MethodName: "Check",
Handler: _SQLService_Check_Handler,
diff --git a/proto/v1/branch_service.proto b/proto/v1/branch_service.proto
index e85a59932e..99f4c8fe96 100644
--- a/proto/v1/branch_service.proto
+++ b/proto/v1/branch_service.proto
@@ -71,19 +71,6 @@ service BranchService {
option (bytebase.v1.auth_method) = IAM;
}
- // DiffDatabase works similar to branch rebase.
- // 1) set the base as the schema of a database;
- // 2) apply the changes between base and head of branch to the new base (schema of database);
- // 3) return the diff DDLs similar to DiffSchema in database service.
- // 4) return the conflict schema if conflict needs to be resolved by user. Once resolved, user
- // will call DiffSchema() in database service to get diff DDLs.
- rpc DiffDatabase(DiffDatabaseRequest) returns (DiffDatabaseResponse) {
- option (google.api.http) = {post: "/v1/{name=projects/*/branches/*}:diffDatabase"};
- option (google.api.method_signature) = "name";
- option (bytebase.v1.permission) = "bb.branches.update";
- option (bytebase.v1.auth_method) = IAM;
- }
-
rpc DiffMetadata(DiffMetadataRequest) returns (DiffMetadataResponse) {
option (google.api.http) = {
post: "/v1/schemaDesign:diffMetadata"
diff --git a/proto/v1/sql_service.proto b/proto/v1/sql_service.proto
index 747f0bd2f0..3a72ea2562 100644
--- a/proto/v1/sql_service.proto
+++ b/proto/v1/sql_service.proto
@@ -76,14 +76,6 @@ service SQLService {
option (bytebase.v1.audit) = true;
}
- rpc DifferPreview(DifferPreviewRequest) returns (DifferPreviewResponse) {
- option (google.api.http) = {
- post: "/v1/sql/differPreview"
- body: "*"
- };
- option (bytebase.v1.allow_without_credential) = true;
- }
-
rpc Check(CheckRequest) returns (CheckResponse) {
option (google.api.http) = {
post: "/v1/sql/check"