Skip to content

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

chore: move diff metadata (#15033)

Danny Xuf7e90595c383
diff --git a/backend/api/v1/branch_service.go b/backend/api/v1/branch_service.go
deleted file mode 100644
index 617272ab83..0000000000
--- a/backend/api/v1/branch_service.go
+++ /dev/null
@@ -1,210 +0,0 @@
-package v1
-
-import (
- "context"
-
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/status"
-
- "github.com/bytebase/bytebase/backend/common"
- "github.com/bytebase/bytebase/backend/plugin/parser/base"
- "github.com/bytebase/bytebase/backend/plugin/schema"
- "github.com/bytebase/bytebase/backend/store/model"
- storepb "github.com/bytebase/bytebase/proto/generated-go/store"
- v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
-)
-
-// NewBranchService implements BranchServiceServer interface.
-type BranchService struct {
- v1pb.UnimplementedBranchServiceServer
-}
-
-// NewBranchService creates a new BranchService.
-func NewBranchService() *BranchService {
- return &BranchService{}
-}
-
-func (*BranchService) DiffMetadata(_ context.Context, request *v1pb.DiffMetadataRequest) (*v1pb.DiffMetadataResponse, error) {
- switch request.Engine {
- case v1pb.Engine_MYSQL, v1pb.Engine_POSTGRES, v1pb.Engine_TIDB, v1pb.Engine_ORACLE:
- default:
- return nil, status.Errorf(codes.InvalidArgument, "unsupported engine: %v", request.Engine)
- }
- if request.SourceMetadata == nil || request.TargetMetadata == nil {
- return nil, status.Errorf(codes.InvalidArgument, "source_metadata and target_metadata are required")
- }
- storeSourceMetadata, err := convertV1DatabaseMetadata(request.SourceMetadata)
- if err != nil {
- return nil, err
- }
- sourceConfig := convertV1DatabaseConfig(
- &v1pb.DatabaseConfig{
- Name: request.SourceMetadata.Name,
- SchemaConfigs: request.SourceMetadata.SchemaConfigs,
- },
- )
- sanitizeCommentForSchemaMetadata(storeSourceMetadata, model.NewDatabaseConfig(sourceConfig), request.ClassificationFromConfig)
-
- storeTargetMetadata, err := convertV1DatabaseMetadata(request.TargetMetadata)
- if err != nil {
- return nil, err
- }
- targetConfig := convertV1DatabaseConfig(
- &v1pb.DatabaseConfig{
- Name: request.TargetMetadata.Name,
- SchemaConfigs: request.TargetMetadata.SchemaConfigs,
- },
- )
- if err := checkDatabaseMetadata(storepb.Engine(request.Engine), storeTargetMetadata); err != nil {
- return nil, status.Errorf(codes.InvalidArgument, "invalid target metadata: %v", err)
- }
- sanitizeCommentForSchemaMetadata(storeTargetMetadata, model.NewDatabaseConfig(targetConfig), request.ClassificationFromConfig)
-
- storeSourceMetadata, storeTargetMetadata = trimDatabaseMetadata(storeSourceMetadata, storeTargetMetadata)
- if err := checkDatabaseMetadataColumnType(storepb.Engine(request.Engine), storeTargetMetadata); err != nil {
- return nil, status.Errorf(codes.InvalidArgument, "invalid target metadata: %v", err)
- }
-
- sourceSchema, err := schema.GetDesignSchema(storepb.Engine(request.Engine), storeSourceMetadata)
- if err != nil {
- return nil, err
- }
- targetSchema, err := schema.GetDesignSchema(storepb.Engine(request.Engine), storeTargetMetadata)
- if err != nil {
- return nil, err
- }
-
- diff, err := base.SchemaDiff(convertEngine(request.Engine), base.DiffContext{
- IgnoreCaseSensitive: false,
- StrictMode: true,
- }, sourceSchema, targetSchema)
- if err != nil {
- return nil, status.Errorf(codes.Internal, "failed to compute diff between source and target schemas, error: %v", err)
- }
-
- return &v1pb.DiffMetadataResponse{
- Diff: diff,
- }, nil
-}
-func trimDatabaseMetadata(sourceMetadata *storepb.DatabaseSchemaMetadata, targetMetadata *storepb.DatabaseSchemaMetadata) (*storepb.DatabaseSchemaMetadata, *storepb.DatabaseSchemaMetadata) {
- // TODO(d): handle indexes, etc.
- sourceModel, targetModel := model.NewDatabaseMetadata(sourceMetadata), model.NewDatabaseMetadata(targetMetadata)
- s, t := &storepb.DatabaseSchemaMetadata{}, &storepb.DatabaseSchemaMetadata{}
- for _, schema := range sourceMetadata.GetSchemas() {
- ts := targetModel.GetSchema(schema.GetName())
- if ts == nil {
- s.Schemas = append(s.Schemas, schema)
- continue
- }
- trimSchema := &storepb.SchemaMetadata{Name: schema.GetName()}
- for _, table := range schema.GetTables() {
- tt := ts.GetTable(table.GetName())
- if tt == nil {
- trimSchema.Tables = append(trimSchema.Tables, table)
- continue
- }
-
- if !common.EqualTable(table, tt.GetProto()) {
- trimSchema.Tables = append(trimSchema.Tables, table)
- continue
- }
- }
- for _, view := range schema.GetViews() {
- tv := ts.GetView(view.GetName())
- if tv == nil {
- trimSchema.Views = append(trimSchema.Views, view)
- continue
- }
- if view.GetComment() != tv.GetProto().GetComment() {
- trimSchema.Views = append(trimSchema.Views, view)
- continue
- }
- if view.GetDefinition() != tv.Definition {
- trimSchema.Views = append(trimSchema.Views, view)
- continue
- }
- }
- for _, function := range schema.GetFunctions() {
- tf := ts.GetFunction(function.GetName())
- if tf == nil {
- trimSchema.Functions = append(trimSchema.Functions, function)
- continue
- }
- if function.GetDefinition() != tf.Definition {
- trimSchema.Functions = append(trimSchema.Functions, function)
- continue
- }
- }
- for _, procedure := range schema.GetProcedures() {
- tp := ts.GetProcedure(procedure.GetName())
- if tp == nil {
- trimSchema.Procedures = append(trimSchema.Procedures, procedure)
- continue
- }
- if procedure.GetDefinition() != tp.Definition {
- trimSchema.Procedures = append(trimSchema.Procedures, procedure)
- continue
- }
- }
- // Always append empty schema to avoid creating schema duplicates.
- s.Schemas = append(s.Schemas, trimSchema)
- }
-
- for _, schema := range targetMetadata.GetSchemas() {
- ts := sourceModel.GetSchema(schema.GetName())
- if ts == nil {
- t.Schemas = append(t.Schemas, schema)
- continue
- }
- trimSchema := &storepb.SchemaMetadata{Name: schema.GetName()}
- for _, table := range schema.GetTables() {
- tt := ts.GetTable(table.GetName())
- if tt == nil {
- trimSchema.Tables = append(trimSchema.Tables, table)
- continue
- }
-
- if !common.EqualTable(table, tt.GetProto()) {
- trimSchema.Tables = append(trimSchema.Tables, table)
- continue
- }
- }
- for _, view := range schema.GetViews() {
- tv := ts.GetView(view.GetName())
- if tv == nil {
- trimSchema.Views = append(trimSchema.Views, view)
- continue
- }
- if view.GetDefinition() != tv.Definition {
- trimSchema.Views = append(trimSchema.Views, view)
- continue
- }
- }
- for _, function := range schema.GetFunctions() {
- tf := ts.GetFunction(function.GetName())
- if tf == nil {
- trimSchema.Functions = append(trimSchema.Functions, function)
- continue
- }
- if function.GetDefinition() != tf.Definition {
- trimSchema.Functions = append(trimSchema.Functions, function)
- continue
- }
- }
- for _, procedure := range schema.GetProcedures() {
- tp := ts.GetProcedure(procedure.GetName())
- if tp == nil {
- trimSchema.Procedures = append(trimSchema.Procedures, procedure)
- continue
- }
- if procedure.GetDefinition() != tp.Definition {
- trimSchema.Procedures = append(trimSchema.Procedures, procedure)
- continue
- }
- }
- // Always append empty schema to avoid creating schema duplicates.
- t.Schemas = append(t.Schemas, trimSchema)
- }
-
- return s, t
-}
diff --git a/backend/api/v1/sql_service.go b/backend/api/v1/sql_service.go
index 4d088d3d11..74d6f49d2d 100644
--- a/backend/api/v1/sql_service.go
+++ b/backend/api/v1/sql_service.go
@@ -1555,6 +1555,192 @@ func (*SQLService) StringifyMetadata(_ context.Context, request *v1pb.StringifyM
}, nil
}
+func (*SQLService) DiffMetadata(_ context.Context, request *v1pb.DiffMetadataRequest) (*v1pb.DiffMetadataResponse, error) {
+ switch request.Engine {
+ case v1pb.Engine_MYSQL, v1pb.Engine_POSTGRES, v1pb.Engine_TIDB, v1pb.Engine_ORACLE:
+ default:
+ return nil, status.Errorf(codes.InvalidArgument, "unsupported engine: %v", request.Engine)
+ }
+ if request.SourceMetadata == nil || request.TargetMetadata == nil {
+ return nil, status.Errorf(codes.InvalidArgument, "source_metadata and target_metadata are required")
+ }
+ storeSourceMetadata, err := convertV1DatabaseMetadata(request.SourceMetadata)
+ if err != nil {
+ return nil, err
+ }
+ sourceConfig := convertV1DatabaseConfig(
+ &v1pb.DatabaseConfig{
+ Name: request.SourceMetadata.Name,
+ SchemaConfigs: request.SourceMetadata.SchemaConfigs,
+ },
+ )
+ sanitizeCommentForSchemaMetadata(storeSourceMetadata, model.NewDatabaseConfig(sourceConfig), request.ClassificationFromConfig)
+
+ storeTargetMetadata, err := convertV1DatabaseMetadata(request.TargetMetadata)
+ if err != nil {
+ return nil, err
+ }
+ targetConfig := convertV1DatabaseConfig(
+ &v1pb.DatabaseConfig{
+ Name: request.TargetMetadata.Name,
+ SchemaConfigs: request.TargetMetadata.SchemaConfigs,
+ },
+ )
+ if err := checkDatabaseMetadata(storepb.Engine(request.Engine), storeTargetMetadata); err != nil {
+ return nil, status.Errorf(codes.InvalidArgument, "invalid target metadata: %v", err)
+ }
+ sanitizeCommentForSchemaMetadata(storeTargetMetadata, model.NewDatabaseConfig(targetConfig), request.ClassificationFromConfig)
+
+ storeSourceMetadata, storeTargetMetadata = trimDatabaseMetadata(storeSourceMetadata, storeTargetMetadata)
+ if err := checkDatabaseMetadataColumnType(storepb.Engine(request.Engine), storeTargetMetadata); err != nil {
+ return nil, status.Errorf(codes.InvalidArgument, "invalid target metadata: %v", err)
+ }
+
+ sourceSchema, err := schema.GetDesignSchema(storepb.Engine(request.Engine), storeSourceMetadata)
+ if err != nil {
+ return nil, err
+ }
+ targetSchema, err := schema.GetDesignSchema(storepb.Engine(request.Engine), storeTargetMetadata)
+ if err != nil {
+ return nil, err
+ }
+
+ diff, err := base.SchemaDiff(convertEngine(request.Engine), base.DiffContext{
+ IgnoreCaseSensitive: false,
+ StrictMode: true,
+ }, sourceSchema, targetSchema)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to compute diff between source and target schemas, error: %v", err)
+ }
+
+ return &v1pb.DiffMetadataResponse{
+ Diff: diff,
+ }, nil
+}
+
+func trimDatabaseMetadata(sourceMetadata *storepb.DatabaseSchemaMetadata, targetMetadata *storepb.DatabaseSchemaMetadata) (*storepb.DatabaseSchemaMetadata, *storepb.DatabaseSchemaMetadata) {
+ // TODO(d): handle indexes, etc.
+ sourceModel, targetModel := model.NewDatabaseMetadata(sourceMetadata), model.NewDatabaseMetadata(targetMetadata)
+ s, t := &storepb.DatabaseSchemaMetadata{}, &storepb.DatabaseSchemaMetadata{}
+ for _, schema := range sourceMetadata.GetSchemas() {
+ ts := targetModel.GetSchema(schema.GetName())
+ if ts == nil {
+ s.Schemas = append(s.Schemas, schema)
+ continue
+ }
+ trimSchema := &storepb.SchemaMetadata{Name: schema.GetName()}
+ for _, table := range schema.GetTables() {
+ tt := ts.GetTable(table.GetName())
+ if tt == nil {
+ trimSchema.Tables = append(trimSchema.Tables, table)
+ continue
+ }
+
+ if !common.EqualTable(table, tt.GetProto()) {
+ trimSchema.Tables = append(trimSchema.Tables, table)
+ continue
+ }
+ }
+ for _, view := range schema.GetViews() {
+ tv := ts.GetView(view.GetName())
+ if tv == nil {
+ trimSchema.Views = append(trimSchema.Views, view)
+ continue
+ }
+ if view.GetComment() != tv.GetProto().GetComment() {
+ trimSchema.Views = append(trimSchema.Views, view)
+ continue
+ }
+ if view.GetDefinition() != tv.Definition {
+ trimSchema.Views = append(trimSchema.Views, view)
+ continue
+ }
+ }
+ for _, function := range schema.GetFunctions() {
+ tf := ts.GetFunction(function.GetName())
+ if tf == nil {
+ trimSchema.Functions = append(trimSchema.Functions, function)
+ continue
+ }
+ if function.GetDefinition() != tf.Definition {
+ trimSchema.Functions = append(trimSchema.Functions, function)
+ continue
+ }
+ }
+ for _, procedure := range schema.GetProcedures() {
+ tp := ts.GetProcedure(procedure.GetName())
+ if tp == nil {
+ trimSchema.Procedures = append(trimSchema.Procedures, procedure)
+ continue
+ }
+ if procedure.GetDefinition() != tp.Definition {
+ trimSchema.Procedures = append(trimSchema.Procedures, procedure)
+ continue
+ }
+ }
+ // Always append empty schema to avoid creating schema duplicates.
+ s.Schemas = append(s.Schemas, trimSchema)
+ }
+
+ for _, schema := range targetMetadata.GetSchemas() {
+ ts := sourceModel.GetSchema(schema.GetName())
+ if ts == nil {
+ t.Schemas = append(t.Schemas, schema)
+ continue
+ }
+ trimSchema := &storepb.SchemaMetadata{Name: schema.GetName()}
+ for _, table := range schema.GetTables() {
+ tt := ts.GetTable(table.GetName())
+ if tt == nil {
+ trimSchema.Tables = append(trimSchema.Tables, table)
+ continue
+ }
+
+ if !common.EqualTable(table, tt.GetProto()) {
+ trimSchema.Tables = append(trimSchema.Tables, table)
+ continue
+ }
+ }
+ for _, view := range schema.GetViews() {
+ tv := ts.GetView(view.GetName())
+ if tv == nil {
+ trimSchema.Views = append(trimSchema.Views, view)
+ continue
+ }
+ if view.GetDefinition() != tv.Definition {
+ trimSchema.Views = append(trimSchema.Views, view)
+ continue
+ }
+ }
+ for _, function := range schema.GetFunctions() {
+ tf := ts.GetFunction(function.GetName())
+ if tf == nil {
+ trimSchema.Functions = append(trimSchema.Functions, function)
+ continue
+ }
+ if function.GetDefinition() != tf.Definition {
+ trimSchema.Functions = append(trimSchema.Functions, function)
+ continue
+ }
+ }
+ for _, procedure := range schema.GetProcedures() {
+ tp := ts.GetProcedure(procedure.GetName())
+ if tp == nil {
+ trimSchema.Procedures = append(trimSchema.Procedures, procedure)
+ continue
+ }
+ if procedure.GetDefinition() != tp.Definition {
+ trimSchema.Procedures = append(trimSchema.Procedures, procedure)
+ continue
+ }
+ }
+ // Always append empty schema to avoid creating schema duplicates.
+ t.Schemas = append(t.Schemas, trimSchema)
+ }
+
+ return s, t
+}
+
func sanitizeCommentForSchemaMetadata(dbSchema *storepb.DatabaseSchemaMetadata, dbModelConfig *model.DatabaseConfig, classificationFromConfig bool) {
for _, schema := range dbSchema.Schemas {
schemaConfig := dbModelConfig.CreateOrGetSchemaConfig(schema.Name)
diff --git a/backend/server/grpc_routes.go b/backend/server/grpc_routes.go
index 600cfcc32a..bb41eba600 100644
--- a/backend/server/grpc_routes.go
+++ b/backend/server/grpc_routes.go
@@ -88,7 +88,6 @@ func configureGrpcRouters(
v1pb.RegisterRoleServiceServer(grpcServer, apiv1.NewRoleService(stores, iamManager, licenseService))
v1pb.RegisterSheetServiceServer(grpcServer, apiv1.NewSheetService(stores, sheetManager, licenseService, iamManager, profile))
v1pb.RegisterWorksheetServiceServer(grpcServer, apiv1.NewWorksheetService(stores, iamManager))
- v1pb.RegisterBranchServiceServer(grpcServer, apiv1.NewBranchService())
v1pb.RegisterCelServiceServer(grpcServer, apiv1.NewCelService())
v1pb.RegisterDatabaseGroupServiceServer(grpcServer, apiv1.NewDatabaseGroupService(stores, profile, iamManager, licenseService))
v1pb.RegisterChangelistServiceServer(grpcServer, apiv1.NewChangelistService(stores, profile, iamManager))
@@ -122,9 +121,6 @@ func configureGrpcRouters(
if err := v1pb.RegisterAuthServiceHandler(ctx, mux, grpcConn); err != nil {
return nil, nil, nil, nil, nil, err
}
- if err := v1pb.RegisterBranchServiceHandler(ctx, mux, grpcConn); err != nil {
- return nil, nil, nil, nil, nil, err
- }
if err := v1pb.RegisterCelServiceHandler(ctx, mux, grpcConn); err != nil {
return nil, nil, nil, nil, nil, err
}
diff --git a/frontend/src/components/SchemaEditorLite/common.ts b/frontend/src/components/SchemaEditorLite/common.ts
index 255dca2c8b..685506a485 100644
--- a/frontend/src/components/SchemaEditorLite/common.ts
+++ b/frontend/src/components/SchemaEditorLite/common.ts
@@ -1,5 +1,5 @@
import { isEqual } from "lodash-es";
-import { branchServiceClient } from "@/grpcweb";
+import { sqlServiceClient } from "@/grpcweb";
import { t } from "@/plugins/i18n";
import { useSettingV1Store } from "@/store";
import type { ComposedDatabase } from "@/types";
@@ -46,7 +46,7 @@ export const generateDiffDDL = async (
const classificationConfig = useSettingV1Store().getProjectClassification(
database.projectEntity.dataClassificationConfigId
);
- const diffResponse = await branchServiceClient.diffMetadata(
+ const diffResponse = await sqlServiceClient.diffMetadata(
{
sourceMetadata: source,
targetMetadata: target,
diff --git a/frontend/src/grpcweb/index.ts b/frontend/src/grpcweb/index.ts
index 1f705932d8..20bf2ef470 100644
--- a/frontend/src/grpcweb/index.ts
+++ b/frontend/src/grpcweb/index.ts
@@ -9,7 +9,6 @@ import { ActuatorServiceDefinition } from "@/types/proto/v1/actuator_service";
import { AnomalyServiceDefinition } from "@/types/proto/v1/anomaly_service";
import { AuditLogServiceDefinition } from "@/types/proto/v1/audit_log_service";
import { AuthServiceDefinition } from "@/types/proto/v1/auth_service";
-import { BranchServiceDefinition } from "@/types/proto/v1/branch_service";
import { CelServiceDefinition } from "@/types/proto/v1/cel_service";
import { ChangelistServiceDefinition } from "@/types/proto/v1/changelist_service";
import { DatabaseGroupServiceDefinition } from "@/types/proto/v1/database_group_service";
@@ -199,11 +198,6 @@ export const anomalyServiceClient = clientFactory.create(
channel
);
-export const branchServiceClient = clientFactory.create(
- BranchServiceDefinition,
- channel
-);
-
export const changelistServiceClient = clientFactory.create(
ChangelistServiceDefinition,
channel
diff --git a/frontend/src/grpcweb/methods.ts b/frontend/src/grpcweb/methods.ts
index 2293eb72a8..d938298152 100644
--- a/frontend/src/grpcweb/methods.ts
+++ b/frontend/src/grpcweb/methods.ts
@@ -2,7 +2,6 @@ import { ActuatorServiceDefinition } from "@/types/proto/v1/actuator_service";
import { AnomalyServiceDefinition } from "@/types/proto/v1/anomaly_service";
import { AuditLogServiceDefinition } from "@/types/proto/v1/audit_log_service";
import { AuthServiceDefinition } from "@/types/proto/v1/auth_service";
-import { BranchServiceDefinition } from "@/types/proto/v1/branch_service";
import { CelServiceDefinition } from "@/types/proto/v1/cel_service";
import { ChangelistServiceDefinition } from "@/types/proto/v1/changelist_service";
import { DatabaseGroupServiceDefinition } from "@/types/proto/v1/database_group_service";
@@ -42,7 +41,6 @@ export const ALL_METHODS_WITH_AUDIT = [
AnomalyServiceDefinition,
AuditLogServiceDefinition,
AuthServiceDefinition,
- BranchServiceDefinition,
CelServiceDefinition,
ChangelistServiceDefinition,
DatabaseGroupServiceDefinition,
diff --git a/frontend/src/types/proto/store/branch.ts b/frontend/src/types/proto/store/branch.ts
deleted file mode 100644
index ed3fae9076..0000000000
--- a/frontend/src/types/proto/store/branch.ts
+++ /dev/null
@@ -1,209 +0,0 @@
-// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
-// versions:
-// protoc-gen-ts_proto v2.3.0
-// protoc unknown
-// source: store/branch.proto
-
-/* eslint-disable */
-import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
-import Long from "long";
-import { DatabaseConfig, DatabaseSchemaMetadata } from "./database";
-
-export const protobufPackage = "bytebase.store";
-
-export interface BranchSnapshot {
- metadata: DatabaseSchemaMetadata | undefined;
- databaseConfig: DatabaseConfig | undefined;
-}
-
-export interface BranchConfig {
- /**
- * The name of source database.
- * Optional.
- * Example: instances/instance-id/databases/database-name.
- */
- sourceDatabase: string;
- /**
- * The name of the source branch.
- * Optional.
- * Example: projects/project-id/branches/branch-id.
- */
- sourceBranch: string;
-}
-
-function createBaseBranchSnapshot(): BranchSnapshot {
- return { metadata: undefined, databaseConfig: undefined };
-}
-
-export const BranchSnapshot: MessageFns<BranchSnapshot> = {
- encode(message: BranchSnapshot, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
- if (message.metadata !== undefined) {
- DatabaseSchemaMetadata.encode(message.metadata, writer.uint32(10).fork()).join();
- }
- if (message.databaseConfig !== undefined) {
- DatabaseConfig.encode(message.databaseConfig, writer.uint32(18).fork()).join();
- }
- return writer;
- },
-
- decode(input: BinaryReader | Uint8Array, length?: number): BranchSnapshot {
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseBranchSnapshot();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- if (tag !== 10) {
- break;
- }
-
- message.metadata = DatabaseSchemaMetadata.decode(reader, reader.uint32());
- continue;
- }
- case 2: {
- if (tag !== 18) {
- break;
- }
-
- message.databaseConfig = DatabaseConfig.decode(reader, reader.uint32());
- continue;
- }
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skip(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): BranchSnapshot {
- return {
- metadata: isSet(object.metadata) ? DatabaseSchemaMetadata.fromJSON(object.metadata) : undefined,
- databaseConfig: isSet(object.databaseConfig) ? DatabaseConfig.fromJSON(object.databaseConfig) : undefined,
- };
- },
-
- toJSON(message: BranchSnapshot): unknown {
- const obj: any = {};
- if (message.metadata !== undefined) {
- obj.metadata = DatabaseSchemaMetadata.toJSON(message.metadata);
- }
- if (message.databaseConfig !== undefined) {
- obj.databaseConfig = DatabaseConfig.toJSON(message.databaseConfig);
- }
- return obj;
- },
-
- create(base?: DeepPartial<BranchSnapshot>): BranchSnapshot {
- return BranchSnapshot.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<BranchSnapshot>): BranchSnapshot {
- const message = createBaseBranchSnapshot();
- message.metadata = (object.metadata !== undefined && object.metadata !== null)
- ? DatabaseSchemaMetadata.fromPartial(object.metadata)
- : undefined;
- message.databaseConfig = (object.databaseConfig !== undefined && object.databaseConfig !== null)
- ? DatabaseConfig.fromPartial(object.databaseConfig)
- : undefined;
- return message;
- },
-};
-
-function createBaseBranchConfig(): BranchConfig {
- return { sourceDatabase: "", sourceBranch: "" };
-}
-
-export const BranchConfig: MessageFns<BranchConfig> = {
- encode(message: BranchConfig, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
- if (message.sourceDatabase !== "") {
- writer.uint32(10).string(message.sourceDatabase);
- }
- if (message.sourceBranch !== "") {
- writer.uint32(18).string(message.sourceBranch);
- }
- return writer;
- },
-
- decode(input: BinaryReader | Uint8Array, length?: number): BranchConfig {
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseBranchConfig();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- if (tag !== 10) {
- break;
- }
-
- message.sourceDatabase = reader.string();
- continue;
- }
- case 2: {
- if (tag !== 18) {
- break;
- }
-
- message.sourceBranch = reader.string();
- continue;
- }
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skip(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): BranchConfig {
- return {
- sourceDatabase: isSet(object.sourceDatabase) ? globalThis.String(object.sourceDatabase) : "",
- sourceBranch: isSet(object.sourceBranch) ? globalThis.String(object.sourceBranch) : "",
- };
- },
-
- toJSON(message: BranchConfig): unknown {
- const obj: any = {};
- if (message.sourceDatabase !== "") {
- obj.sourceDatabase = message.sourceDatabase;
- }
- if (message.sourceBranch !== "") {
- obj.sourceBranch = message.sourceBranch;
- }
- return obj;
- },
-
- create(base?: DeepPartial<BranchConfig>): BranchConfig {
- return BranchConfig.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<BranchConfig>): BranchConfig {
- const message = createBaseBranchConfig();
- message.sourceDatabase = object.sourceDatabase ?? "";
- message.sourceBranch = object.sourceBranch ?? "";
- return message;
- },
-};
-
-type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
-
-export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
- : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
- : Partial<T>;
-
-function isSet(value: any): boolean {
- return value !== null && value !== undefined;
-}
-
-export interface MessageFns<T> {
- encode(message: T, writer?: BinaryWriter): BinaryWriter;
- decode(input: BinaryReader | Uint8Array, length?: number): T;
- fromJSON(object: any): T;
- toJSON(message: T): unknown;
- create(base?: DeepPartial<T>): T;
- fromPartial(object: DeepPartial<T>): T;
-}
diff --git a/frontend/src/types/proto/v1/branch_service.ts b/frontend/src/types/proto/v1/branch_service.ts
deleted file mode 100644
index d7f281396d..0000000000
--- a/frontend/src/types/proto/v1/branch_service.ts
+++ /dev/null
@@ -1,290 +0,0 @@
-// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
-// versions:
-// protoc-gen-ts_proto v2.3.0
-// protoc unknown
-// source: v1/branch_service.proto
-
-/* eslint-disable */
-import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
-import Long from "long";
-import { Engine, engineFromJSON, engineToJSON, engineToNumber } from "./common";
-import { DatabaseMetadata } from "./database_service";
-
-export const protobufPackage = "bytebase.v1";
-
-export interface DiffMetadataRequest {
- /** The metadata of the source schema. */
- sourceMetadata:
- | DatabaseMetadata
- | undefined;
- /** The metadata of the target schema. */
- targetMetadata:
- | DatabaseMetadata
- | undefined;
- /** The database engine of the schema. */
- engine: Engine;
- /** If false, we will build the raw common by classification in database config. */
- classificationFromConfig: boolean;
-}
-
-export interface DiffMetadataResponse {
- /** The diff of the metadata. */
- diff: string;
-}
-
-function createBaseDiffMetadataRequest(): DiffMetadataRequest {
- return {
- sourceMetadata: undefined,
- targetMetadata: undefined,
- engine: Engine.ENGINE_UNSPECIFIED,
- classificationFromConfig: false,
- };
-}
-
-export const DiffMetadataRequest: MessageFns<DiffMetadataRequest> = {
- encode(message: DiffMetadataRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
- if (message.sourceMetadata !== undefined) {
- DatabaseMetadata.encode(message.sourceMetadata, writer.uint32(10).fork()).join();
- }
- if (message.targetMetadata !== undefined) {
- DatabaseMetadata.encode(message.targetMetadata, writer.uint32(18).fork()).join();
- }
- if (message.engine !== Engine.ENGINE_UNSPECIFIED) {
- writer.uint32(24).int32(engineToNumber(message.engine));
- }
- if (message.classificationFromConfig !== false) {
- writer.uint32(32).bool(message.classificationFromConfig);
- }
- return writer;
- },
-
- decode(input: BinaryReader | Uint8Array, length?: number): DiffMetadataRequest {
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseDiffMetadataRequest();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- if (tag !== 10) {
- break;
- }
-
- message.sourceMetadata = DatabaseMetadata.decode(reader, reader.uint32());
- continue;
- }
- case 2: {
- if (tag !== 18) {
- break;
- }
-
- message.targetMetadata = DatabaseMetadata.decode(reader, reader.uint32());
- continue;
- }
- case 3: {
- if (tag !== 24) {
- break;
- }
-
- message.engine = engineFromJSON(reader.int32());
- continue;
- }
- case 4: {
- if (tag !== 32) {
- break;
- }
-
- message.classificationFromConfig = reader.bool();
- continue;
- }
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skip(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): DiffMetadataRequest {
- return {
- sourceMetadata: isSet(object.sourceMetadata) ? DatabaseMetadata.fromJSON(object.sourceMetadata) : undefined,
- targetMetadata: isSet(object.targetMetadata) ? DatabaseMetadata.fromJSON(object.targetMetadata) : undefined,
- engine: isSet(object.engine) ? engineFromJSON(object.engine) : Engine.ENGINE_UNSPECIFIED,
- classificationFromConfig: isSet(object.classificationFromConfig)
- ? globalThis.Boolean(object.classificationFromConfig)
- : false,
- };
- },
-
- toJSON(message: DiffMetadataRequest): unknown {
- const obj: any = {};
- if (message.sourceMetadata !== undefined) {
- obj.sourceMetadata = DatabaseMetadata.toJSON(message.sourceMetadata);
- }
- if (message.targetMetadata !== undefined) {
- obj.targetMetadata = DatabaseMetadata.toJSON(message.targetMetadata);
- }
- if (message.engine !== Engine.ENGINE_UNSPECIFIED) {
- obj.engine = engineToJSON(message.engine);
- }
- if (message.classificationFromConfig !== false) {
- obj.classificationFromConfig = message.classificationFromConfig;
- }
- return obj;
- },
-
- create(base?: DeepPartial<DiffMetadataRequest>): DiffMetadataRequest {
- return DiffMetadataRequest.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<DiffMetadataRequest>): DiffMetadataRequest {
- const message = createBaseDiffMetadataRequest();
- message.sourceMetadata = (object.sourceMetadata !== undefined && object.sourceMetadata !== null)
- ? DatabaseMetadata.fromPartial(object.sourceMetadata)
- : undefined;
- message.targetMetadata = (object.targetMetadata !== undefined && object.targetMetadata !== null)
- ? DatabaseMetadata.fromPartial(object.targetMetadata)
- : undefined;
- message.engine = object.engine ?? Engine.ENGINE_UNSPECIFIED;
- message.classificationFromConfig = object.classificationFromConfig ?? false;
- return message;
- },
-};
-
-function createBaseDiffMetadataResponse(): DiffMetadataResponse {
- return { diff: "" };
-}
-
-export const DiffMetadataResponse: MessageFns<DiffMetadataResponse> = {
- encode(message: DiffMetadataResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
- if (message.diff !== "") {
- writer.uint32(10).string(message.diff);
- }
- return writer;
- },
-
- decode(input: BinaryReader | Uint8Array, length?: number): DiffMetadataResponse {
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseDiffMetadataResponse();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- if (tag !== 10) {
- break;
- }
-
- message.diff = reader.string();
- continue;
- }
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skip(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): DiffMetadataResponse {
- return { diff: isSet(object.diff) ? globalThis.String(object.diff) : "" };
- },
-
- toJSON(message: DiffMetadataResponse): unknown {
- const obj: any = {};
- if (message.diff !== "") {
- obj.diff = message.diff;
- }
- return obj;
- },
-
- create(base?: DeepPartial<DiffMetadataResponse>): DiffMetadataResponse {
- return DiffMetadataResponse.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<DiffMetadataResponse>): DiffMetadataResponse {
- const message = createBaseDiffMetadataResponse();
- message.diff = object.diff ?? "";
- return message;
- },
-};
-
-export type BranchServiceDefinition = typeof BranchServiceDefinition;
-export const BranchServiceDefinition = {
- name: "BranchService",
- fullName: "bytebase.v1.BranchService",
- methods: {
- diffMetadata: {
- name: "DiffMetadata",
- requestType: DiffMetadataRequest,
- requestStream: false,
- responseType: DiffMetadataResponse,
- responseStream: false,
- options: {
- _unknownFields: {
- 800000: [new Uint8Array([1])],
- 578365826: [
- new Uint8Array([
- 34,
- 58,
- 1,
- 42,
- 34,
- 29,
- 47,
- 118,
- 49,
- 47,
- 115,
- 99,
- 104,
- 101,
- 109,
- 97,
- 68,
- 101,
- 115,
- 105,
- 103,
- 110,
- 58,
- 100,
- 105,
- 102,
- 102,
- 77,
- 101,
- 116,
- 97,
- 100,
- 97,
- 116,
- 97,
- ]),
- ],
- },
- },
- },
- },
-} as const;
-
-type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
-
-export type DeepPartial<T> = T extends Builtin ? T
- : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
- : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
- : Partial<T>;
-
-function isSet(value: any): boolean {
- return value !== null && value !== undefined;
-}
-
-export interface MessageFns<T> {
- encode(message: T, writer?: BinaryWriter): BinaryWriter;
- decode(input: BinaryReader | Uint8Array, length?: number): T;
- fromJSON(object: any): T;
- toJSON(message: T): unknown;
- create(base?: DeepPartial<T>): T;
- fromPartial(object: DeepPartial<T>): T;
-}
diff --git a/frontend/src/types/proto/v1/sql_service.ts b/frontend/src/types/proto/v1/sql_service.ts
index 0c72cc2b4b..ffb37d25eb 100644
--- a/frontend/src/types/proto/v1/sql_service.ts
+++ b/frontend/src/types/proto/v1/sql_service.ts
@@ -519,6 +519,26 @@ export interface StringifyMetadataResponse {
schema: string;
}
+export interface DiffMetadataRequest {
+ /** The metadata of the source schema. */
+ sourceMetadata:
+ | DatabaseMetadata
+ | undefined;
+ /** The metadata of the target schema. */
+ targetMetadata:
+ | DatabaseMetadata
+ | undefined;
+ /** The database engine of the schema. */
+ engine: Engine;
+ /** If false, we will build the raw common by classification in database config. */
+ classificationFromConfig: boolean;
+}
+
+export interface DiffMetadataResponse {
+ /** The diff of the metadata. */
+ diff: string;
+}
+
export interface SearchQueryHistoriesRequest {
/**
* The maximum number of histories to return.
@@ -3209,6 +3229,183 @@ export const StringifyMetadataResponse: MessageFns<StringifyMetadataResponse> =
},
};
+function createBaseDiffMetadataRequest(): DiffMetadataRequest {
+ return {
+ sourceMetadata: undefined,
+ targetMetadata: undefined,
+ engine: Engine.ENGINE_UNSPECIFIED,
+ classificationFromConfig: false,
+ };
+}
+
+export const DiffMetadataRequest: MessageFns<DiffMetadataRequest> = {
+ encode(message: DiffMetadataRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.sourceMetadata !== undefined) {
+ DatabaseMetadata.encode(message.sourceMetadata, writer.uint32(10).fork()).join();
+ }
+ if (message.targetMetadata !== undefined) {
+ DatabaseMetadata.encode(message.targetMetadata, writer.uint32(18).fork()).join();
+ }
+ if (message.engine !== Engine.ENGINE_UNSPECIFIED) {
+ writer.uint32(24).int32(engineToNumber(message.engine));
+ }
+ if (message.classificationFromConfig !== false) {
+ writer.uint32(32).bool(message.classificationFromConfig);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): DiffMetadataRequest {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseDiffMetadataRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 10) {
+ break;
+ }
+
+ message.sourceMetadata = DatabaseMetadata.decode(reader, reader.uint32());
+ continue;
+ }
+ case 2: {
+ if (tag !== 18) {
+ break;
+ }
+
+ message.targetMetadata = DatabaseMetadata.decode(reader, reader.uint32());
+ continue;
+ }
+ case 3: {
+ if (tag !== 24) {
+ break;
+ }
+
+ message.engine = engineFromJSON(reader.int32());
+ continue;
+ }
+ case 4: {
+ if (tag !== 32) {
+ break;
+ }
+
+ message.classificationFromConfig = reader.bool();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): DiffMetadataRequest {
+ return {
+ sourceMetadata: isSet(object.sourceMetadata) ? DatabaseMetadata.fromJSON(object.sourceMetadata) : undefined,
+ targetMetadata: isSet(object.targetMetadata) ? DatabaseMetadata.fromJSON(object.targetMetadata) : undefined,
+ engine: isSet(object.engine) ? engineFromJSON(object.engine) : Engine.ENGINE_UNSPECIFIED,
+ classificationFromConfig: isSet(object.classificationFromConfig)
+ ? globalThis.Boolean(object.classificationFromConfig)
+ : false,
+ };
+ },
+
+ toJSON(message: DiffMetadataRequest): unknown {
+ const obj: any = {};
+ if (message.sourceMetadata !== undefined) {
+ obj.sourceMetadata = DatabaseMetadata.toJSON(message.sourceMetadata);
+ }
+ if (message.targetMetadata !== undefined) {
+ obj.targetMetadata = DatabaseMetadata.toJSON(message.targetMetadata);
+ }
+ if (message.engine !== Engine.ENGINE_UNSPECIFIED) {
+ obj.engine = engineToJSON(message.engine);
+ }
+ if (message.classificationFromConfig !== false) {
+ obj.classificationFromConfig = message.classificationFromConfig;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<DiffMetadataRequest>): DiffMetadataRequest {
+ return DiffMetadataRequest.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<DiffMetadataRequest>): DiffMetadataRequest {
+ const message = createBaseDiffMetadataRequest();
+ message.sourceMetadata = (object.sourceMetadata !== undefined && object.sourceMetadata !== null)
+ ? DatabaseMetadata.fromPartial(object.sourceMetadata)
+ : undefined;
+ message.targetMetadata = (object.targetMetadata !== undefined && object.targetMetadata !== null)
+ ? DatabaseMetadata.fromPartial(object.targetMetadata)
+ : undefined;
+ message.engine = object.engine ?? Engine.ENGINE_UNSPECIFIED;
+ message.classificationFromConfig = object.classificationFromConfig ?? false;
+ return message;
+ },
+};
+
+function createBaseDiffMetadataResponse(): DiffMetadataResponse {
+ return { diff: "" };
+}
+
+export const DiffMetadataResponse: MessageFns<DiffMetadataResponse> = {
+ encode(message: DiffMetadataResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.diff !== "") {
+ writer.uint32(10).string(message.diff);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): DiffMetadataResponse {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseDiffMetadataResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 10) {
+ break;
+ }
+
+ message.diff = reader.string();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): DiffMetadataResponse {
+ return { diff: isSet(object.diff) ? globalThis.String(object.diff) : "" };
+ },
+
+ toJSON(message: DiffMetadataResponse): unknown {
+ const obj: any = {};
+ if (message.diff !== "") {
+ obj.diff = message.diff;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<DiffMetadataResponse>): DiffMetadataResponse {
+ return DiffMetadataResponse.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<DiffMetadataResponse>): DiffMetadataResponse {
+ const message = createBaseDiffMetadataResponse();
+ message.diff = object.diff ?? "";
+ return message;
+ },
+};
+
function createBaseSearchQueryHistoriesRequest(): SearchQueryHistoriesRequest {
return { pageSize: 0, pageToken: "", filter: "" };
}
@@ -4015,6 +4212,57 @@ export const SQLServiceDefinition = {
},
},
},
+ diffMetadata: {
+ name: "DiffMetadata",
+ requestType: DiffMetadataRequest,
+ requestStream: false,
+ responseType: DiffMetadataResponse,
+ responseStream: false,
+ options: {
+ _unknownFields: {
+ 800000: [new Uint8Array([1])],
+ 578365826: [
+ new Uint8Array([
+ 34,
+ 58,
+ 1,
+ 42,
+ 34,
+ 29,
+ 47,
+ 118,
+ 49,
+ 47,
+ 115,
+ 99,
+ 104,
+ 101,
+ 109,
+ 97,
+ 68,
+ 101,
+ 115,
+ 105,
+ 103,
+ 110,
+ 58,
+ 100,
+ 105,
+ 102,
+ 102,
+ 77,
+ 101,
+ 116,
+ 97,
+ 100,
+ 97,
+ 116,
+ 97,
+ ]),
+ ],
+ },
+ },
+ },
},
} as const;
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index f291d9a161..62bd358a5d 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -7087,8 +7087,8 @@ paths:
/v1/schemaDesign:diffMetadata:
post:
tags:
- - BranchService
- operationId: BranchService_DiffMetadata
+ - SQLService
+ operationId: SQLService_DiffMetadata
requestBody:
content:
application/json:
@@ -14846,7 +14846,6 @@ tags:
- name: AnomalyService
- name: AuditLogService
- name: AuthService
- - name: BranchService
- name: CelService
- name: ChangelistService
- name: DatabaseCatalogService
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index dd5767322c..347a72a36d 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -346,12 +346,6 @@
- [AuthService](#bytebase-v1-AuthService)
-- [v1/branch_service.proto](#v1_branch_service-proto)
- - [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest)
- - [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse)
-
- - [BranchService](#bytebase-v1-BranchService)
-
- [v1/cel_service.proto](#v1_cel_service-proto)
- [BatchDeparseRequest](#bytebase-v1-BatchDeparseRequest)
- [BatchDeparseResponse](#bytebase-v1-BatchDeparseResponse)
@@ -553,6 +547,8 @@
- [Advice](#bytebase-v1-Advice)
- [CheckRequest](#bytebase-v1-CheckRequest)
- [CheckResponse](#bytebase-v1-CheckResponse)
+ - [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest)
+ - [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse)
- [ExportRequest](#bytebase-v1-ExportRequest)
- [ExportResponse](#bytebase-v1-ExportResponse)
- [ParseMyBatisMapperRequest](#bytebase-v1-ParseMyBatisMapperRequest)
@@ -5985,65 +5981,6 @@ The user&#39;s `name` field is used to identify the user to update. Format: user
-<a name="v1_branch_service-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-
-## v1/branch_service.proto
-
-
-
-<a name="bytebase-v1-DiffMetadataRequest"></a>
-
-### DiffMetadataRequest
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| source_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the source schema. |
-| target_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the target schema. |
-| engine | [Engine](#bytebase-v1-Engine) | | The database engine of the schema. |
-| classification_from_config | [bool](#bool) | | If false, we will build the raw common by classification in database config. |
-
-
-
-
-
-
-<a name="bytebase-v1-DiffMetadataResponse"></a>
-
-### DiffMetadataResponse
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| diff | [string](#string) | | The diff of the metadata. |
-
-
-
-
-
-
-
-
-
-
-
-
-<a name="bytebase-v1-BranchService"></a>
-
-### BranchService
-
-
-| Method Name | Request Type | Response Type | Description |
-| ----------- | ------------ | ------------- | ------------|
-| DiffMetadata | [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest) | [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse) | |
-
-
-
-
-
<a name="v1_cel_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
@@ -9002,6 +8939,39 @@ Type is the database change type.
+<a name="bytebase-v1-DiffMetadataRequest"></a>
+
+### DiffMetadataRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| source_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the source schema. |
+| target_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The metadata of the target schema. |
+| engine | [Engine](#bytebase-v1-Engine) | | The database engine of the schema. |
+| classification_from_config | [bool](#bool) | | If false, we will build the raw common by classification in database config. |
+
+
+
+
+
+
+<a name="bytebase-v1-DiffMetadataResponse"></a>
+
+### DiffMetadataResponse
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| diff | [string](#string) | | The diff of the metadata. |
+
+
+
+
+
+
<a name="bytebase-v1-ExportRequest"></a>
### ExportRequest
@@ -9433,6 +9403,7 @@ for field description.
| ParseMyBatisMapper | [ParseMyBatisMapperRequest](#bytebase-v1-ParseMyBatisMapperRequest) | [ParseMyBatisMapperResponse](#bytebase-v1-ParseMyBatisMapperResponse) | |
| Pretty | [PrettyRequest](#bytebase-v1-PrettyRequest) | [PrettyResponse](#bytebase-v1-PrettyResponse) | |
| StringifyMetadata | [StringifyMetadataRequest](#bytebase-v1-StringifyMetadataRequest) | [StringifyMetadataResponse](#bytebase-v1-StringifyMetadataResponse) | |
+| DiffMetadata | [DiffMetadataRequest](#bytebase-v1-DiffMetadataRequest) | [DiffMetadataResponse](#bytebase-v1-DiffMetadataResponse) | |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index ac8c69d945..d36ff2f34b 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -1496,29 +1496,6 @@
</li>
- <li>
- <a href="#v1%2fbranch_service.proto">v1/branch_service.proto</a>
- <ul>
-
- <li>
- <a href="#bytebase.v1.DiffMetadataRequest"><span class="badge">M</span>DiffMetadataRequest</a>
- </li>
-
- <li>
- <a href="#bytebase.v1.DiffMetadataResponse"><span class="badge">M</span>DiffMetadataResponse</a>
- </li>
-
-
-
-
- <li>
- <a href="#bytebase.v1.BranchService"><span class="badge">S</span>BranchService</a>
- </li>
-
- </ul>
- </li>
-
-
<li>
<a href="#v1%2fcel_service.proto">v1/cel_service.proto</a>
<ul>
@@ -2286,6 +2263,14 @@
<a href="#bytebase.v1.CheckResponse"><span class="badge">M</span>CheckResponse</a>
</li>
+ <li>
+ <a href="#bytebase.v1.DiffMetadataRequest"><span class="badge">M</span>DiffMetadataRequest</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.v1.DiffMetadataResponse"><span class="badge">M</span>DiffMetadataResponse</a>
+ </li>
+
<li>
<a href="#bytebase.v1.ExportRequest"><span class="badge">M</span>ExportRequest</a>
</li>
@@ -17025,136 +17010,6 @@ The last remaining workspace admin cannot be deleted.</p></td>
- <div class="file-heading">
- <h2 id="v1/branch_service.proto">v1/branch_service.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>source_metadata</td>
- <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
- <td></td>
- <td><p>The metadata of the source schema. </p></td>
- </tr>
-
- <tr>
- <td>target_metadata</td>
- <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
- <td></td>
- <td><p>The metadata of the target schema. </p></td>
- </tr>
-
- <tr>
- <td>engine</td>
- <td><a href="#bytebase.v1.Engine">Engine</a></td>
- <td></td>
- <td><p>The database engine of the schema. </p></td>
- </tr>
-
- <tr>
- <td>classification_from_config</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If false, we will build the raw common by classification in database config. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>diff</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The diff of the metadata. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
-
-
-
-
-
-
- <h3 id="bytebase.v1.BranchService">BranchService</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>DiffMetadata</td>
- <td><a href="#bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</a></td>
- <td><a href="#bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</a></td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
- <h4>Methods with HTTP bindings</h4>
- <table>
- <thead>
- <tr>
- <td>Method Name</td>
- <td>Method</td>
- <td>Pattern</td>
- <td>Body</td>
- </tr>
- </thead>
- <tbody>
-
-
-
- <tr>
- <td>DiffMetadata</td>
- <td>POST</td>
- <td>/v1/schemaDesign:diffMetadata</td>
- <td>*</td>
- </tr>
-
-
- </tbody>
- </table>
-
-
-
-
<div class="file-heading">
<h2 id="v1/cel_service.proto">v1/cel_service.proto</h2><a href="#title">Top</a>
</div>
@@ -24865,6 +24720,75 @@ fetched from the database. </p></td>
+ <h3 id="bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>source_metadata</td>
+ <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
+ <td></td>
+ <td><p>The metadata of the source schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>target_metadata</td>
+ <td><a href="#bytebase.v1.DatabaseMetadata">DatabaseMetadata</a></td>
+ <td></td>
+ <td><p>The metadata of the target schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>engine</td>
+ <td><a href="#bytebase.v1.Engine">Engine</a></td>
+ <td></td>
+ <td><p>The database engine of the schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>classification_from_config</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>If false, we will build the raw common by classification in database config. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>diff</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The diff of the metadata. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
<h3 id="bytebase.v1.ExportRequest">ExportRequest</h3>
<p></p>
@@ -26051,6 +25975,13 @@ config. </p></td>
<td><p></p></td>
</tr>
+ <tr>
+ <td>DiffMetadata</td>
+ <td><a href="#bytebase.v1.DiffMetadataRequest">DiffMetadataRequest</a></td>
+ <td><a href="#bytebase.v1.DiffMetadataResponse">DiffMetadataResponse</a></td>
+ <td><p></p></td>
+ </tr>
+
</tbody>
</table>
@@ -26170,6 +26101,16 @@ config. </p></td>
</tr>
+
+
+ <tr>
+ <td>DiffMetadata</td>
+ <td>POST</td>
+ <td>/v1/schemaDesign:diffMetadata</td>
+ <td>*</td>
+ </tr>
+
+
</tbody>
</table>
diff --git a/proto/generated-go/v1/branch_service.pb.go b/proto/generated-go/v1/branch_service.pb.go
deleted file mode 100644
index ffead629db..0000000000
--- a/proto/generated-go/v1/branch_service.pb.go
+++ /dev/null
@@ -1,247 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// versions:
-// protoc-gen-go v1.36.3
-// protoc (unknown)
-// source: v1/branch_service.proto
-
-package v1
-
-import (
- _ "google.golang.org/genproto/googleapis/api/annotations"
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- reflect "reflect"
- sync "sync"
-)
-
-const (
- // Verify that this generated code is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
- // Verify that runtime/protoimpl is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
-)
-
-type DiffMetadataRequest struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // The metadata of the source schema.
- SourceMetadata *DatabaseMetadata `protobuf:"bytes,1,opt,name=source_metadata,json=sourceMetadata,proto3" json:"source_metadata,omitempty"`
- // The metadata of the target schema.
- TargetMetadata *DatabaseMetadata `protobuf:"bytes,2,opt,name=target_metadata,json=targetMetadata,proto3" json:"target_metadata,omitempty"`
- // The database engine of the schema.
- Engine Engine `protobuf:"varint,3,opt,name=engine,proto3,enum=bytebase.v1.Engine" json:"engine,omitempty"`
- // If false, we will build the raw common by classification in database config.
- ClassificationFromConfig bool `protobuf:"varint,4,opt,name=classification_from_config,json=classificationFromConfig,proto3" json:"classification_from_config,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *DiffMetadataRequest) Reset() {
- *x = DiffMetadataRequest{}
- mi := &file_v1_branch_service_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *DiffMetadataRequest) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DiffMetadataRequest) ProtoMessage() {}
-
-func (x *DiffMetadataRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_branch_service_proto_msgTypes[0]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use DiffMetadataRequest.ProtoReflect.Descriptor instead.
-func (*DiffMetadataRequest) Descriptor() ([]byte, []int) {
- return file_v1_branch_service_proto_rawDescGZIP(), []int{0}
-}
-
-func (x *DiffMetadataRequest) GetSourceMetadata() *DatabaseMetadata {
- if x != nil {
- return x.SourceMetadata
- }
- return nil
-}
-
-func (x *DiffMetadataRequest) GetTargetMetadata() *DatabaseMetadata {
- if x != nil {
- return x.TargetMetadata
- }
- return nil
-}
-
-func (x *DiffMetadataRequest) GetEngine() Engine {
- if x != nil {
- return x.Engine
- }
- return Engine_ENGINE_UNSPECIFIED
-}
-
-func (x *DiffMetadataRequest) GetClassificationFromConfig() bool {
- if x != nil {
- return x.ClassificationFromConfig
- }
- return false
-}
-
-type DiffMetadataResponse struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // The diff of the metadata.
- Diff string `protobuf:"bytes,1,opt,name=diff,proto3" json:"diff,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *DiffMetadataResponse) Reset() {
- *x = DiffMetadataResponse{}
- mi := &file_v1_branch_service_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *DiffMetadataResponse) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*DiffMetadataResponse) ProtoMessage() {}
-
-func (x *DiffMetadataResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_branch_service_proto_msgTypes[1]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use DiffMetadataResponse.ProtoReflect.Descriptor instead.
-func (*DiffMetadataResponse) Descriptor() ([]byte, []int) {
- return file_v1_branch_service_proto_rawDescGZIP(), []int{1}
-}
-
-func (x *DiffMetadataResponse) GetDiff() string {
- if x != nil {
- return x.Diff
- }
- return ""
-}
-
-var File_v1_branch_service_proto protoreflect.FileDescriptor
-
-var file_v1_branch_service_proto_rawDesc = []byte{
- 0x0a, 0x17, 0x76, 0x31, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x72, 0x76,
- 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61,
- 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69,
- 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x76, 0x31, 0x2f, 0x63,
- 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x76, 0x31, 0x2f,
- 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x02, 0x0a, 0x13, 0x44, 0x69, 0x66, 0x66, 0x4d,
- 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4c,
- 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
- 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65,
- 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x0e, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4c, 0x0a, 0x0f,
- 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61,
- 0x64, 0x61, 0x74, 0x61, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67,
- 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x0a, 0x06, 0x65, 0x6e,
- 0x67, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74,
- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52,
- 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x3c, 0x0a, 0x1a, 0x63, 0x6c, 0x61, 0x73, 0x73,
- 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x63,
- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x63, 0x6c, 0x61,
- 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x6f, 0x6d, 0x43,
- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x2a, 0x0a, 0x14, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74,
- 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a,
- 0x04, 0x64, 0x69, 0x66, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x69, 0x66,
- 0x66, 0x32, 0x93, 0x01, 0x0a, 0x0d, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76,
- 0x69, 0x63, 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, 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 (
- file_v1_branch_service_proto_rawDescOnce sync.Once
- file_v1_branch_service_proto_rawDescData = file_v1_branch_service_proto_rawDesc
-)
-
-func file_v1_branch_service_proto_rawDescGZIP() []byte {
- file_v1_branch_service_proto_rawDescOnce.Do(func() {
- file_v1_branch_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_branch_service_proto_rawDescData)
- })
- return file_v1_branch_service_proto_rawDescData
-}
-
-var file_v1_branch_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
-var file_v1_branch_service_proto_goTypes = []any{
- (*DiffMetadataRequest)(nil), // 0: bytebase.v1.DiffMetadataRequest
- (*DiffMetadataResponse)(nil), // 1: bytebase.v1.DiffMetadataResponse
- (*DatabaseMetadata)(nil), // 2: bytebase.v1.DatabaseMetadata
- (Engine)(0), // 3: bytebase.v1.Engine
-}
-var file_v1_branch_service_proto_depIdxs = []int32{
- 2, // 0: bytebase.v1.DiffMetadataRequest.source_metadata:type_name -> bytebase.v1.DatabaseMetadata
- 2, // 1: bytebase.v1.DiffMetadataRequest.target_metadata:type_name -> bytebase.v1.DatabaseMetadata
- 3, // 2: bytebase.v1.DiffMetadataRequest.engine:type_name -> bytebase.v1.Engine
- 0, // 3: bytebase.v1.BranchService.DiffMetadata:input_type -> bytebase.v1.DiffMetadataRequest
- 1, // 4: bytebase.v1.BranchService.DiffMetadata:output_type -> bytebase.v1.DiffMetadataResponse
- 4, // [4:5] is the sub-list for method output_type
- 3, // [3:4] is the sub-list for method input_type
- 3, // [3:3] is the sub-list for extension type_name
- 3, // [3:3] is the sub-list for extension extendee
- 0, // [0:3] is the sub-list for field type_name
-}
-
-func init() { file_v1_branch_service_proto_init() }
-func file_v1_branch_service_proto_init() {
- if File_v1_branch_service_proto != nil {
- return
- }
- file_v1_annotation_proto_init()
- file_v1_common_proto_init()
- file_v1_database_service_proto_init()
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_v1_branch_service_proto_rawDesc,
- NumEnums: 0,
- NumMessages: 2,
- NumExtensions: 0,
- NumServices: 1,
- },
- GoTypes: file_v1_branch_service_proto_goTypes,
- DependencyIndexes: file_v1_branch_service_proto_depIdxs,
- MessageInfos: file_v1_branch_service_proto_msgTypes,
- }.Build()
- File_v1_branch_service_proto = out.File
- file_v1_branch_service_proto_rawDesc = nil
- file_v1_branch_service_proto_goTypes = nil
- file_v1_branch_service_proto_depIdxs = nil
-}
diff --git a/proto/generated-go/v1/branch_service.pb.gw.go b/proto/generated-go/v1/branch_service.pb.gw.go
deleted file mode 100644
index 70646d9647..0000000000
--- a/proto/generated-go/v1/branch_service.pb.gw.go
+++ /dev/null
@@ -1,154 +0,0 @@
-// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
-// source: v1/branch_service.proto
-
-/*
-Package v1 is a reverse proxy.
-
-It translates gRPC into RESTful JSON APIs.
-*/
-package v1
-
-import (
- "context"
- "errors"
- "io"
- "net/http"
-
- "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
- "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
- "google.golang.org/grpc"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/grpclog"
- "google.golang.org/grpc/metadata"
- "google.golang.org/grpc/status"
- "google.golang.org/protobuf/proto"
-)
-
-// Suppress "imported and not used" errors
-var (
- _ codes.Code
- _ io.Reader
- _ status.Status
- _ = errors.New
- _ = runtime.String
- _ = utilities.NewDoubleArray
- _ = metadata.Join
-)
-
-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
- metadata runtime.ServerMetadata
- )
- if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- msg, err := client.DiffMetadata(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
- return msg, metadata, err
-}
-
-func local_request_BranchService_DiffMetadata_0(ctx context.Context, marshaler runtime.Marshaler, server BranchServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var (
- protoReq DiffMetadataRequest
- metadata runtime.ServerMetadata
- )
- if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- msg, err := server.DiffMetadata(ctx, &protoReq)
- return msg, metadata, err
-}
-
-// RegisterBranchServiceHandlerServer registers the http handlers for service BranchService to "mux".
-// UnaryRPC :call BranchServiceServer directly.
-// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
-// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBranchServiceHandlerFromEndpoint instead.
-// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
-func RegisterBranchServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BranchServiceServer) error {
- mux.Handle(http.MethodPost, pattern_BranchService_DiffMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- var stream runtime.ServerTransportStream
- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.BranchService/DiffMetadata", runtime.WithHTTPPathPattern("/v1/schemaDesign:diffMetadata"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_BranchService_DiffMetadata_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_DiffMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
- })
-
- return nil
-}
-
-// RegisterBranchServiceHandlerFromEndpoint is same as RegisterBranchServiceHandler but
-// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
-func RegisterBranchServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
- conn, err := grpc.NewClient(endpoint, opts...)
- if err != nil {
- return err
- }
- defer func() {
- if err != nil {
- if cerr := conn.Close(); cerr != nil {
- grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
- }
- return
- }
- go func() {
- <-ctx.Done()
- if cerr := conn.Close(); cerr != nil {
- grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
- }
- }()
- }()
- return RegisterBranchServiceHandler(ctx, mux, conn)
-}
-
-// RegisterBranchServiceHandler registers the http handlers for service BranchService to "mux".
-// The handlers forward requests to the grpc endpoint over "conn".
-func RegisterBranchServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
- return RegisterBranchServiceHandlerClient(ctx, mux, NewBranchServiceClient(conn))
-}
-
-// RegisterBranchServiceHandlerClient registers the http handlers for service BranchService
-// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BranchServiceClient".
-// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BranchServiceClient"
-// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
-// "BranchServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
-func RegisterBranchServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BranchServiceClient) error {
- mux.Handle(http.MethodPost, pattern_BranchService_DiffMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.BranchService/DiffMetadata", runtime.WithHTTPPathPattern("/v1/schemaDesign:diffMetadata"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := request_BranchService_DiffMetadata_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_DiffMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
- })
- return nil
-}
-
-var (
- pattern_BranchService_DiffMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "schemaDesign"}, "diffMetadata"))
-)
-
-var (
- 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
deleted file mode 100644
index d36c1fcbed..0000000000
--- a/proto/generated-go/v1/branch_service_grpc.pb.go
+++ /dev/null
@@ -1,121 +0,0 @@
-// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
-// versions:
-// - protoc-gen-go-grpc v1.5.1
-// - protoc (unknown)
-// source: v1/branch_service.proto
-
-package v1
-
-import (
- context "context"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.64.0 or later.
-const _ = grpc.SupportPackageIsVersion9
-
-const (
- BranchService_DiffMetadata_FullMethodName = "/bytebase.v1.BranchService/DiffMetadata"
-)
-
-// BranchServiceClient is the client API for BranchService service.
-//
-// 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 BranchServiceClient interface {
- DiffMetadata(ctx context.Context, in *DiffMetadataRequest, opts ...grpc.CallOption) (*DiffMetadataResponse, error)
-}
-
-type branchServiceClient struct {
- cc grpc.ClientConnInterface
-}
-
-func NewBranchServiceClient(cc grpc.ClientConnInterface) BranchServiceClient {
- return &branchServiceClient{cc}
-}
-
-func (c *branchServiceClient) DiffMetadata(ctx context.Context, in *DiffMetadataRequest, opts ...grpc.CallOption) (*DiffMetadataResponse, error) {
- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(DiffMetadataResponse)
- err := c.cc.Invoke(ctx, BranchService_DiffMetadata_FullMethodName, in, out, cOpts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-// BranchServiceServer is the server API for BranchService service.
-// All implementations must embed UnimplementedBranchServiceServer
-// for forward compatibility.
-type BranchServiceServer interface {
- DiffMetadata(context.Context, *DiffMetadataRequest) (*DiffMetadataResponse, error)
- mustEmbedUnimplementedBranchServiceServer()
-}
-
-// UnimplementedBranchServiceServer must be embedded to have
-// forward compatible implementations.
-//
-// NOTE: this should be embedded by value instead of pointer to avoid a nil
-// pointer dereference when methods are called.
-type UnimplementedBranchServiceServer struct{}
-
-func (UnimplementedBranchServiceServer) DiffMetadata(context.Context, *DiffMetadataRequest) (*DiffMetadataResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method DiffMetadata not implemented")
-}
-func (UnimplementedBranchServiceServer) mustEmbedUnimplementedBranchServiceServer() {}
-func (UnimplementedBranchServiceServer) testEmbeddedByValue() {}
-
-// UnsafeBranchServiceServer may be embedded to opt out of forward compatibility for this service.
-// Use of this interface is not recommended, as added methods to BranchServiceServer will
-// result in compilation errors.
-type UnsafeBranchServiceServer interface {
- mustEmbedUnimplementedBranchServiceServer()
-}
-
-func RegisterBranchServiceServer(s grpc.ServiceRegistrar, srv BranchServiceServer) {
- // If the following call pancis, it indicates UnimplementedBranchServiceServer was
- // embedded by pointer and is nil. This will cause panics if an
- // unimplemented method is ever invoked, so we test this at initialization
- // time to prevent it from happening at runtime later due to I/O.
- if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
- t.testEmbeddedByValue()
- }
- s.RegisterService(&BranchService_ServiceDesc, srv)
-}
-
-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 {
- return nil, err
- }
- if interceptor == nil {
- return srv.(BranchServiceServer).DiffMetadata(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: BranchService_DiffMetadata_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(BranchServiceServer).DiffMetadata(ctx, req.(*DiffMetadataRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-// BranchService_ServiceDesc is the grpc.ServiceDesc for BranchService service.
-// It's only intended for direct use with grpc.RegisterService,
-// and not to be introspected or modified (even as a copy)
-var BranchService_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "bytebase.v1.BranchService",
- HandlerType: (*BranchServiceServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "DiffMetadata",
- Handler: _BranchService_DiffMetadata_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "v1/branch_service.proto",
-}
diff --git a/proto/generated-go/v1/sql_service.pb.go b/proto/generated-go/v1/sql_service.pb.go
index 7f14692985..f69d44e206 100644
--- a/proto/generated-go/v1/sql_service.pb.go
+++ b/proto/generated-go/v1/sql_service.pb.go
@@ -228,7 +228,7 @@ func (x QueryHistory_Type) Number() protoreflect.EnumNumber {
// Deprecated: Use QueryHistory_Type.Descriptor instead.
func (QueryHistory_Type) EnumDescriptor() ([]byte, []int) {
- return file_v1_sql_service_proto_rawDescGZIP(), []int{21, 0}
+ return file_v1_sql_service_proto_rawDescGZIP(), []int{23, 0}
}
type AdminExecuteRequest struct {
@@ -1735,6 +1735,123 @@ func (x *StringifyMetadataResponse) GetSchema() string {
return ""
}
+type DiffMetadataRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The metadata of the source schema.
+ SourceMetadata *DatabaseMetadata `protobuf:"bytes,1,opt,name=source_metadata,json=sourceMetadata,proto3" json:"source_metadata,omitempty"`
+ // The metadata of the target schema.
+ TargetMetadata *DatabaseMetadata `protobuf:"bytes,2,opt,name=target_metadata,json=targetMetadata,proto3" json:"target_metadata,omitempty"`
+ // The database engine of the schema.
+ Engine Engine `protobuf:"varint,3,opt,name=engine,proto3,enum=bytebase.v1.Engine" json:"engine,omitempty"`
+ // If false, we will build the raw common by classification in database config.
+ ClassificationFromConfig bool `protobuf:"varint,4,opt,name=classification_from_config,json=classificationFromConfig,proto3" json:"classification_from_config,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *DiffMetadataRequest) Reset() {
+ *x = DiffMetadataRequest{}
+ mi := &file_v1_sql_service_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *DiffMetadataRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DiffMetadataRequest) ProtoMessage() {}
+
+func (x *DiffMetadataRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_sql_service_proto_msgTypes[19]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DiffMetadataRequest.ProtoReflect.Descriptor instead.
+func (*DiffMetadataRequest) Descriptor() ([]byte, []int) {
+ return file_v1_sql_service_proto_rawDescGZIP(), []int{19}
+}
+
+func (x *DiffMetadataRequest) GetSourceMetadata() *DatabaseMetadata {
+ if x != nil {
+ return x.SourceMetadata
+ }
+ return nil
+}
+
+func (x *DiffMetadataRequest) GetTargetMetadata() *DatabaseMetadata {
+ if x != nil {
+ return x.TargetMetadata
+ }
+ return nil
+}
+
+func (x *DiffMetadataRequest) GetEngine() Engine {
+ if x != nil {
+ return x.Engine
+ }
+ return Engine_ENGINE_UNSPECIFIED
+}
+
+func (x *DiffMetadataRequest) GetClassificationFromConfig() bool {
+ if x != nil {
+ return x.ClassificationFromConfig
+ }
+ return false
+}
+
+type DiffMetadataResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The diff of the metadata.
+ Diff string `protobuf:"bytes,1,opt,name=diff,proto3" json:"diff,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *DiffMetadataResponse) Reset() {
+ *x = DiffMetadataResponse{}
+ mi := &file_v1_sql_service_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *DiffMetadataResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DiffMetadataResponse) ProtoMessage() {}
+
+func (x *DiffMetadataResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_sql_service_proto_msgTypes[20]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DiffMetadataResponse.ProtoReflect.Descriptor instead.
+func (*DiffMetadataResponse) Descriptor() ([]byte, []int) {
+ return file_v1_sql_service_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *DiffMetadataResponse) GetDiff() string {
+ if x != nil {
+ return x.Diff
+ }
+ return ""
+}
+
type SearchQueryHistoriesRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The maximum number of histories to return.
@@ -1762,7 +1879,7 @@ type SearchQueryHistoriesRequest struct {
func (x *SearchQueryHistoriesRequest) Reset() {
*x = SearchQueryHistoriesRequest{}
- mi := &file_v1_sql_service_proto_msgTypes[19]
+ mi := &file_v1_sql_service_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1774,7 +1891,7 @@ func (x *SearchQueryHistoriesRequest) String() string {
func (*SearchQueryHistoriesRequest) ProtoMessage() {}
func (x *SearchQueryHistoriesRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_sql_service_proto_msgTypes[19]
+ mi := &file_v1_sql_service_proto_msgTypes[21]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1787,7 +1904,7 @@ func (x *SearchQueryHistoriesRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use SearchQueryHistoriesRequest.ProtoReflect.Descriptor instead.
func (*SearchQueryHistoriesRequest) Descriptor() ([]byte, []int) {
- return file_v1_sql_service_proto_rawDescGZIP(), []int{19}
+ return file_v1_sql_service_proto_rawDescGZIP(), []int{21}
}
func (x *SearchQueryHistoriesRequest) GetPageSize() int32 {
@@ -1825,7 +1942,7 @@ type SearchQueryHistoriesResponse struct {
func (x *SearchQueryHistoriesResponse) Reset() {
*x = SearchQueryHistoriesResponse{}
- mi := &file_v1_sql_service_proto_msgTypes[20]
+ mi := &file_v1_sql_service_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1837,7 +1954,7 @@ func (x *SearchQueryHistoriesResponse) String() string {
func (*SearchQueryHistoriesResponse) ProtoMessage() {}
func (x *SearchQueryHistoriesResponse) ProtoReflect() protoreflect.Message {
- mi := &file_v1_sql_service_proto_msgTypes[20]
+ mi := &file_v1_sql_service_proto_msgTypes[22]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1850,7 +1967,7 @@ func (x *SearchQueryHistoriesResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use SearchQueryHistoriesResponse.ProtoReflect.Descriptor instead.
func (*SearchQueryHistoriesResponse) Descriptor() ([]byte, []int) {
- return file_v1_sql_service_proto_rawDescGZIP(), []int{20}
+ return file_v1_sql_service_proto_rawDescGZIP(), []int{22}
}
func (x *SearchQueryHistoriesResponse) GetQueryHistories() []*QueryHistory {
@@ -1887,7 +2004,7 @@ type QueryHistory struct {
func (x *QueryHistory) Reset() {
*x = QueryHistory{}
- mi := &file_v1_sql_service_proto_msgTypes[21]
+ mi := &file_v1_sql_service_proto_msgTypes[23]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1899,7 +2016,7 @@ func (x *QueryHistory) String() string {
func (*QueryHistory) ProtoMessage() {}
func (x *QueryHistory) ProtoReflect() protoreflect.Message {
- mi := &file_v1_sql_service_proto_msgTypes[21]
+ mi := &file_v1_sql_service_proto_msgTypes[23]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1912,7 +2029,7 @@ func (x *QueryHistory) ProtoReflect() protoreflect.Message {
// Deprecated: Use QueryHistory.ProtoReflect.Descriptor instead.
func (*QueryHistory) Descriptor() ([]byte, []int) {
- return file_v1_sql_service_proto_rawDescGZIP(), []int{21}
+ return file_v1_sql_service_proto_rawDescGZIP(), []int{23}
}
func (x *QueryHistory) GetName() string {
@@ -1998,7 +2115,7 @@ type QueryResult_PostgresError struct {
func (x *QueryResult_PostgresError) Reset() {
*x = QueryResult_PostgresError{}
- mi := &file_v1_sql_service_proto_msgTypes[22]
+ mi := &file_v1_sql_service_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2010,7 +2127,7 @@ func (x *QueryResult_PostgresError) String() string {
func (*QueryResult_PostgresError) ProtoMessage() {}
func (x *QueryResult_PostgresError) ProtoReflect() protoreflect.Message {
- mi := &file_v1_sql_service_proto_msgTypes[22]
+ mi := &file_v1_sql_service_proto_msgTypes[24]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2163,7 +2280,7 @@ type RowValue_TimestampTZ struct {
func (x *RowValue_TimestampTZ) Reset() {
*x = RowValue_TimestampTZ{}
- mi := &file_v1_sql_service_proto_msgTypes[23]
+ mi := &file_v1_sql_service_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2175,7 +2292,7 @@ func (x *RowValue_TimestampTZ) String() string {
func (*RowValue_TimestampTZ) ProtoMessage() {}
func (x *RowValue_TimestampTZ) ProtoReflect() protoreflect.Message {
- mi := &file_v1_sql_service_proto_msgTypes[23]
+ mi := &file_v1_sql_service_proto_msgTypes[25]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2514,128 +2631,157 @@ var file_v1_sql_service_proto_rawDesc = []byte{
0x67, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65,
- 0x6d, 0x61, 0x22, 0x71, 0x0a, 0x1b, 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, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d,
- 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a,
- 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66,
- 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x90, 0x01, 0x0a, 0x1c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68,
+ 0x6d, 0x61, 0x22, 0x9c, 0x02, 0x0a, 0x13, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x0f, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4c, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67,
+ 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
+ 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x67,
+ 0x69, 0x6e, 0x65, 0x12, 0x3c, 0x0a, 0x1a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66,
+ 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x22, 0x2a, 0x0a, 0x14, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69, 0x66,
+ 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x69, 0x66, 0x66, 0x22, 0x71, 0x0a,
+ 0x1b, 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, 0x12, 0x1b, 0x0a, 0x09,
+ 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
+ 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67,
+ 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70,
+ 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74,
+ 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72,
+ 0x22, 0x90, 0x01, 0x0a, 0x1c, 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, 0x12, 0x48, 0x0a, 0x0f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f,
+ 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69,
+ 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x0e, 0x71, 0x75, 0x65,
+ 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e,
+ 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f,
+ 0x6b, 0x65, 0x6e, 0x22, 0xa2, 0x03, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73,
+ 0x74, 0x6f, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20,
+ 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
+ 0x12, 0x1e, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72,
+ 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
+ 0x70, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54,
+ 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x09, 0x73, 0x74,
+ 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72,
+ 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x48, 0x00, 0x52, 0x05,
+ 0x65, 0x72, 0x72, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x08, 0x64, 0x75, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20,
+ 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x54,
+ 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x33, 0x0a, 0x04, 0x54, 0x79, 0x70,
+ 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,
+ 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x51, 0x55, 0x45, 0x52, 0x59,
+ 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x58, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x42, 0x08,
+ 0x0a, 0x06, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x32, 0xd1, 0x0a, 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, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x72, 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, 0x50, 0x3a, 0x01, 0x2a, 0x5a,
+ 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
+ 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x71, 0x75, 0x65,
+ 0x72, 0x79, 0x22, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e,
+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61,
+ 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x89, 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, 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, 0x30, 0x8a, 0xea, 0x30, 0x0c, 0x62, 0x62, 0x2e, 0x73, 0x71, 0x6c, 0x2e, 0x61,
+ 0x64, 0x6d, 0x69, 0x6e, 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, 0x12, 0x48, 0x0a, 0x0f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f,
- 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75,
- 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03,
- 0x52, 0x0e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73,
- 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f,
- 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50,
- 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xa2, 0x03, 0x0a, 0x0c, 0x51, 0x75, 0x65,
- 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
- 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x04, 0x6e,
- 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x08, 0x64, 0x61, 0x74,
- 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x07, 0x63, 0x72,
- 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f,
- 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
- 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x0a, 0x63, 0x72,
- 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74,
- 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01,
- 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x05,
- 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01,
- 0x03, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a,
- 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03,
- 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x79,
- 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74,
- 0x6f, 0x72, 0x79, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x33,
- 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55,
- 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,
- 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x58, 0x50, 0x4f, 0x52,
- 0x54, 0x10, 0x02, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x32, 0xcd, 0x09,
- 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, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
- 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x72, 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,
- 0x50, 0x3a, 0x01, 0x2a, 0x5a, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x7b,
- 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a,
- 0x7d, 0x3a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61,
- 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64,
- 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x71, 0x75, 0x65, 0x72,
- 0x79, 0x12, 0x89, 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, 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, 0x30, 0x8a, 0xea, 0x30, 0x0c, 0x62, 0x62, 0x2e,
- 0x73, 0x71, 0x6c, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 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, 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,
+ 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, 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, 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 (
@@ -2651,7 +2797,7 @@ func file_v1_sql_service_proto_rawDescGZIP() []byte {
}
var file_v1_sql_service_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
-var file_v1_sql_service_proto_msgTypes = make([]protoimpl.MessageInfo, 24)
+var file_v1_sql_service_proto_msgTypes = make([]protoimpl.MessageInfo, 26)
var file_v1_sql_service_proto_goTypes = []any{
(QueryOption_RedisRunCommandsOn)(0), // 0: bytebase.v1.QueryOption.RedisRunCommandsOn
(Advice_Status)(0), // 1: bytebase.v1.Advice.Status
@@ -2676,71 +2822,78 @@ var file_v1_sql_service_proto_goTypes = []any{
(*ParseMyBatisMapperResponse)(nil), // 20: bytebase.v1.ParseMyBatisMapperResponse
(*StringifyMetadataRequest)(nil), // 21: bytebase.v1.StringifyMetadataRequest
(*StringifyMetadataResponse)(nil), // 22: bytebase.v1.StringifyMetadataResponse
- (*SearchQueryHistoriesRequest)(nil), // 23: bytebase.v1.SearchQueryHistoriesRequest
- (*SearchQueryHistoriesResponse)(nil), // 24: bytebase.v1.SearchQueryHistoriesResponse
- (*QueryHistory)(nil), // 25: bytebase.v1.QueryHistory
- (*QueryResult_PostgresError)(nil), // 26: bytebase.v1.QueryResult.PostgresError
- (*RowValue_TimestampTZ)(nil), // 27: bytebase.v1.RowValue.TimestampTZ
- (*durationpb.Duration)(nil), // 28: google.protobuf.Duration
- (structpb.NullValue)(0), // 29: google.protobuf.NullValue
- (*structpb.Value)(nil), // 30: google.protobuf.Value
- (*timestamppb.Timestamp)(nil), // 31: google.protobuf.Timestamp
- (*Position)(nil), // 32: bytebase.v1.Position
- (ExportFormat)(0), // 33: bytebase.v1.ExportFormat
- (Engine)(0), // 34: bytebase.v1.Engine
- (*DatabaseMetadata)(nil), // 35: bytebase.v1.DatabaseMetadata
+ (*DiffMetadataRequest)(nil), // 23: bytebase.v1.DiffMetadataRequest
+ (*DiffMetadataResponse)(nil), // 24: bytebase.v1.DiffMetadataResponse
+ (*SearchQueryHistoriesRequest)(nil), // 25: bytebase.v1.SearchQueryHistoriesRequest
+ (*SearchQueryHistoriesResponse)(nil), // 26: bytebase.v1.SearchQueryHistoriesResponse
+ (*QueryHistory)(nil), // 27: bytebase.v1.QueryHistory
+ (*QueryResult_PostgresError)(nil), // 28: bytebase.v1.QueryResult.PostgresError
+ (*RowValue_TimestampTZ)(nil), // 29: bytebase.v1.RowValue.TimestampTZ
+ (*durationpb.Duration)(nil), // 30: google.protobuf.Duration
+ (structpb.NullValue)(0), // 31: google.protobuf.NullValue
+ (*structpb.Value)(nil), // 32: google.protobuf.Value
+ (*timestamppb.Timestamp)(nil), // 33: google.protobuf.Timestamp
+ (*Position)(nil), // 34: bytebase.v1.Position
+ (ExportFormat)(0), // 35: bytebase.v1.ExportFormat
+ (Engine)(0), // 36: bytebase.v1.Engine
+ (*DatabaseMetadata)(nil), // 37: bytebase.v1.DatabaseMetadata
}
var file_v1_sql_service_proto_depIdxs = []int32{
- 28, // 0: bytebase.v1.AdminExecuteRequest.timeout:type_name -> google.protobuf.Duration
+ 30, // 0: bytebase.v1.AdminExecuteRequest.timeout:type_name -> google.protobuf.Duration
9, // 1: bytebase.v1.AdminExecuteResponse.results:type_name -> bytebase.v1.QueryResult
- 28, // 2: bytebase.v1.QueryRequest.timeout:type_name -> google.protobuf.Duration
+ 30, // 2: bytebase.v1.QueryRequest.timeout:type_name -> google.protobuf.Duration
8, // 3: bytebase.v1.QueryRequest.query_option:type_name -> bytebase.v1.QueryOption
9, // 4: bytebase.v1.QueryResponse.results:type_name -> bytebase.v1.QueryResult
0, // 5: bytebase.v1.QueryOption.redis_run_commands_on:type_name -> bytebase.v1.QueryOption.RedisRunCommandsOn
10, // 6: bytebase.v1.QueryResult.rows:type_name -> bytebase.v1.QueryRow
- 28, // 7: bytebase.v1.QueryResult.latency:type_name -> google.protobuf.Duration
- 26, // 8: bytebase.v1.QueryResult.postgres_error:type_name -> bytebase.v1.QueryResult.PostgresError
+ 30, // 7: bytebase.v1.QueryResult.latency:type_name -> google.protobuf.Duration
+ 28, // 8: bytebase.v1.QueryResult.postgres_error:type_name -> bytebase.v1.QueryResult.PostgresError
11, // 9: bytebase.v1.QueryRow.values:type_name -> bytebase.v1.RowValue
- 29, // 10: bytebase.v1.RowValue.null_value:type_name -> google.protobuf.NullValue
- 30, // 11: bytebase.v1.RowValue.value_value:type_name -> google.protobuf.Value
- 31, // 12: bytebase.v1.RowValue.timestamp_value:type_name -> google.protobuf.Timestamp
- 27, // 13: bytebase.v1.RowValue.timestamp_tz_value:type_name -> bytebase.v1.RowValue.TimestampTZ
+ 31, // 10: bytebase.v1.RowValue.null_value:type_name -> google.protobuf.NullValue
+ 32, // 11: bytebase.v1.RowValue.value_value:type_name -> google.protobuf.Value
+ 33, // 12: bytebase.v1.RowValue.timestamp_value:type_name -> google.protobuf.Timestamp
+ 29, // 13: bytebase.v1.RowValue.timestamp_tz_value:type_name -> bytebase.v1.RowValue.TimestampTZ
1, // 14: bytebase.v1.Advice.status:type_name -> bytebase.v1.Advice.Status
- 32, // 15: bytebase.v1.Advice.start_position:type_name -> bytebase.v1.Position
- 32, // 16: bytebase.v1.Advice.end_position:type_name -> bytebase.v1.Position
- 33, // 17: bytebase.v1.ExportRequest.format:type_name -> bytebase.v1.ExportFormat
- 34, // 18: bytebase.v1.PrettyRequest.engine:type_name -> bytebase.v1.Engine
- 35, // 19: bytebase.v1.CheckRequest.metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 34, // 15: bytebase.v1.Advice.start_position:type_name -> bytebase.v1.Position
+ 34, // 16: bytebase.v1.Advice.end_position:type_name -> bytebase.v1.Position
+ 35, // 17: bytebase.v1.ExportRequest.format:type_name -> bytebase.v1.ExportFormat
+ 36, // 18: bytebase.v1.PrettyRequest.engine:type_name -> bytebase.v1.Engine
+ 37, // 19: bytebase.v1.CheckRequest.metadata:type_name -> bytebase.v1.DatabaseMetadata
2, // 20: bytebase.v1.CheckRequest.change_type:type_name -> bytebase.v1.CheckRequest.ChangeType
12, // 21: bytebase.v1.CheckResponse.advices:type_name -> bytebase.v1.Advice
- 35, // 22: bytebase.v1.StringifyMetadataRequest.metadata:type_name -> bytebase.v1.DatabaseMetadata
- 34, // 23: bytebase.v1.StringifyMetadataRequest.engine:type_name -> bytebase.v1.Engine
- 25, // 24: bytebase.v1.SearchQueryHistoriesResponse.query_histories:type_name -> bytebase.v1.QueryHistory
- 31, // 25: bytebase.v1.QueryHistory.create_time:type_name -> google.protobuf.Timestamp
- 28, // 26: bytebase.v1.QueryHistory.duration:type_name -> google.protobuf.Duration
- 3, // 27: bytebase.v1.QueryHistory.type:type_name -> bytebase.v1.QueryHistory.Type
- 31, // 28: bytebase.v1.RowValue.TimestampTZ.timestamp:type_name -> google.protobuf.Timestamp
- 6, // 29: bytebase.v1.SQLService.Query:input_type -> bytebase.v1.QueryRequest
- 4, // 30: bytebase.v1.SQLService.AdminExecute:input_type -> bytebase.v1.AdminExecuteRequest
- 23, // 31: bytebase.v1.SQLService.SearchQueryHistories:input_type -> bytebase.v1.SearchQueryHistoriesRequest
- 13, // 32: bytebase.v1.SQLService.Export:input_type -> bytebase.v1.ExportRequest
- 17, // 33: bytebase.v1.SQLService.Check:input_type -> bytebase.v1.CheckRequest
- 19, // 34: bytebase.v1.SQLService.ParseMyBatisMapper:input_type -> bytebase.v1.ParseMyBatisMapperRequest
- 15, // 35: bytebase.v1.SQLService.Pretty:input_type -> bytebase.v1.PrettyRequest
- 21, // 36: bytebase.v1.SQLService.StringifyMetadata:input_type -> bytebase.v1.StringifyMetadataRequest
- 7, // 37: bytebase.v1.SQLService.Query:output_type -> bytebase.v1.QueryResponse
- 5, // 38: bytebase.v1.SQLService.AdminExecute:output_type -> bytebase.v1.AdminExecuteResponse
- 24, // 39: bytebase.v1.SQLService.SearchQueryHistories:output_type -> bytebase.v1.SearchQueryHistoriesResponse
- 14, // 40: bytebase.v1.SQLService.Export:output_type -> bytebase.v1.ExportResponse
- 18, // 41: bytebase.v1.SQLService.Check:output_type -> bytebase.v1.CheckResponse
- 20, // 42: bytebase.v1.SQLService.ParseMyBatisMapper:output_type -> bytebase.v1.ParseMyBatisMapperResponse
- 16, // 43: bytebase.v1.SQLService.Pretty:output_type -> bytebase.v1.PrettyResponse
- 22, // 44: bytebase.v1.SQLService.StringifyMetadata:output_type -> bytebase.v1.StringifyMetadataResponse
- 37, // [37:45] is the sub-list for method output_type
- 29, // [29:37] 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
+ 37, // 22: bytebase.v1.StringifyMetadataRequest.metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 36, // 23: bytebase.v1.StringifyMetadataRequest.engine:type_name -> bytebase.v1.Engine
+ 37, // 24: bytebase.v1.DiffMetadataRequest.source_metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 37, // 25: bytebase.v1.DiffMetadataRequest.target_metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 36, // 26: bytebase.v1.DiffMetadataRequest.engine:type_name -> bytebase.v1.Engine
+ 27, // 27: bytebase.v1.SearchQueryHistoriesResponse.query_histories:type_name -> bytebase.v1.QueryHistory
+ 33, // 28: bytebase.v1.QueryHistory.create_time:type_name -> google.protobuf.Timestamp
+ 30, // 29: bytebase.v1.QueryHistory.duration:type_name -> google.protobuf.Duration
+ 3, // 30: bytebase.v1.QueryHistory.type:type_name -> bytebase.v1.QueryHistory.Type
+ 33, // 31: bytebase.v1.RowValue.TimestampTZ.timestamp:type_name -> google.protobuf.Timestamp
+ 6, // 32: bytebase.v1.SQLService.Query:input_type -> bytebase.v1.QueryRequest
+ 4, // 33: bytebase.v1.SQLService.AdminExecute:input_type -> bytebase.v1.AdminExecuteRequest
+ 25, // 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
+ 23, // 40: bytebase.v1.SQLService.DiffMetadata:input_type -> bytebase.v1.DiffMetadataRequest
+ 7, // 41: bytebase.v1.SQLService.Query:output_type -> bytebase.v1.QueryResponse
+ 5, // 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
+ 18, // 45: bytebase.v1.SQLService.Check:output_type -> bytebase.v1.CheckResponse
+ 20, // 46: bytebase.v1.SQLService.ParseMyBatisMapper:output_type -> bytebase.v1.ParseMyBatisMapperResponse
+ 16, // 47: bytebase.v1.SQLService.Pretty:output_type -> bytebase.v1.PrettyResponse
+ 22, // 48: bytebase.v1.SQLService.StringifyMetadata:output_type -> bytebase.v1.StringifyMetadataResponse
+ 24, // 49: bytebase.v1.SQLService.DiffMetadata:output_type -> bytebase.v1.DiffMetadataResponse
+ 41, // [41:50] is the sub-list for method output_type
+ 32, // [32:41] is the sub-list for method input_type
+ 32, // [32:32] is the sub-list for extension type_name
+ 32, // [32:32] is the sub-list for extension extendee
+ 0, // [0:32] is the sub-list for field type_name
}
func init() { file_v1_sql_service_proto_init() }
@@ -2771,14 +2924,14 @@ func file_v1_sql_service_proto_init() {
(*RowValue_TimestampValue)(nil),
(*RowValue_TimestampTzValue)(nil),
}
- file_v1_sql_service_proto_msgTypes[21].OneofWrappers = []any{}
+ file_v1_sql_service_proto_msgTypes[23].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_v1_sql_service_proto_rawDesc,
NumEnums: 4,
- NumMessages: 24,
+ NumMessages: 26,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/proto/generated-go/v1/sql_service.pb.gw.go b/proto/generated-go/v1/sql_service.pb.gw.go
index f700800c14..4bb37507a6 100644
--- a/proto/generated-go/v1/sql_service.pb.gw.go
+++ b/proto/generated-go/v1/sql_service.pb.gw.go
@@ -412,6 +412,30 @@ func local_request_SQLService_StringifyMetadata_0(ctx context.Context, marshaler
return msg, metadata, err
}
+func request_SQLService_DiffMetadata_0(ctx context.Context, marshaler runtime.Marshaler, client SQLServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq DiffMetadataRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.DiffMetadata(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_SQLService_DiffMetadata_0(ctx context.Context, marshaler runtime.Marshaler, server SQLServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq DiffMetadataRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.DiffMetadata(ctx, &protoReq)
+ return msg, metadata, err
+}
+
// RegisterSQLServiceHandlerServer registers the http handlers for service SQLService to "mux".
// UnaryRPC :call SQLServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@@ -625,6 +649,26 @@ func RegisterSQLServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux,
}
forward_SQLService_StringifyMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
+ mux.Handle(http.MethodPost, pattern_SQLService_DiffMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SQLService/DiffMetadata", runtime.WithHTTPPathPattern("/v1/schemaDesign:diffMetadata"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_SQLService_DiffMetadata_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_DiffMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
return nil
}
@@ -860,6 +904,23 @@ func RegisterSQLServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux,
}
forward_SQLService_StringifyMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
+ mux.Handle(http.MethodPost, pattern_SQLService_DiffMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.SQLService/DiffMetadata", runtime.WithHTTPPathPattern("/v1/schemaDesign:diffMetadata"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_SQLService_DiffMetadata_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_DiffMetadata_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
return nil
}
@@ -875,6 +936,7 @@ var (
pattern_SQLService_ParseMyBatisMapper_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "sql", "parseMyBatisMapper"}, ""))
pattern_SQLService_Pretty_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "sql", "pretty"}, ""))
pattern_SQLService_StringifyMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "schemaDesign"}, "stringifyMetadata"))
+ pattern_SQLService_DiffMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "schemaDesign"}, "diffMetadata"))
)
var (
@@ -889,4 +951,5 @@ var (
forward_SQLService_ParseMyBatisMapper_0 = runtime.ForwardResponseMessage
forward_SQLService_Pretty_0 = runtime.ForwardResponseMessage
forward_SQLService_StringifyMetadata_0 = runtime.ForwardResponseMessage
+ forward_SQLService_DiffMetadata_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 157f7eb1e0..b54e05bbe0 100644
--- a/proto/generated-go/v1/sql_service_grpc.pb.go
+++ b/proto/generated-go/v1/sql_service_grpc.pb.go
@@ -27,6 +27,7 @@ const (
SQLService_ParseMyBatisMapper_FullMethodName = "/bytebase.v1.SQLService/ParseMyBatisMapper"
SQLService_Pretty_FullMethodName = "/bytebase.v1.SQLService/Pretty"
SQLService_StringifyMetadata_FullMethodName = "/bytebase.v1.SQLService/StringifyMetadata"
+ SQLService_DiffMetadata_FullMethodName = "/bytebase.v1.SQLService/DiffMetadata"
)
// SQLServiceClient is the client API for SQLService service.
@@ -42,6 +43,7 @@ type SQLServiceClient interface {
ParseMyBatisMapper(ctx context.Context, in *ParseMyBatisMapperRequest, opts ...grpc.CallOption) (*ParseMyBatisMapperResponse, error)
Pretty(ctx context.Context, in *PrettyRequest, opts ...grpc.CallOption) (*PrettyResponse, error)
StringifyMetadata(ctx context.Context, in *StringifyMetadataRequest, opts ...grpc.CallOption) (*StringifyMetadataResponse, error)
+ DiffMetadata(ctx context.Context, in *DiffMetadataRequest, opts ...grpc.CallOption) (*DiffMetadataResponse, error)
}
type sQLServiceClient struct {
@@ -135,6 +137,16 @@ func (c *sQLServiceClient) StringifyMetadata(ctx context.Context, in *StringifyM
return out, nil
}
+func (c *sQLServiceClient) DiffMetadata(ctx context.Context, in *DiffMetadataRequest, opts ...grpc.CallOption) (*DiffMetadataResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(DiffMetadataResponse)
+ err := c.cc.Invoke(ctx, SQLService_DiffMetadata_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
// SQLServiceServer is the server API for SQLService service.
// All implementations must embed UnimplementedSQLServiceServer
// for forward compatibility.
@@ -148,6 +160,7 @@ type SQLServiceServer interface {
ParseMyBatisMapper(context.Context, *ParseMyBatisMapperRequest) (*ParseMyBatisMapperResponse, error)
Pretty(context.Context, *PrettyRequest) (*PrettyResponse, error)
StringifyMetadata(context.Context, *StringifyMetadataRequest) (*StringifyMetadataResponse, error)
+ DiffMetadata(context.Context, *DiffMetadataRequest) (*DiffMetadataResponse, error)
mustEmbedUnimplementedSQLServiceServer()
}
@@ -182,6 +195,9 @@ func (UnimplementedSQLServiceServer) Pretty(context.Context, *PrettyRequest) (*P
func (UnimplementedSQLServiceServer) StringifyMetadata(context.Context, *StringifyMetadataRequest) (*StringifyMetadataResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method StringifyMetadata not implemented")
}
+func (UnimplementedSQLServiceServer) DiffMetadata(context.Context, *DiffMetadataRequest) (*DiffMetadataResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method DiffMetadata not implemented")
+}
func (UnimplementedSQLServiceServer) mustEmbedUnimplementedSQLServiceServer() {}
func (UnimplementedSQLServiceServer) testEmbeddedByValue() {}
@@ -336,6 +352,24 @@ func _SQLService_StringifyMetadata_Handler(srv interface{}, ctx context.Context,
return interceptor(ctx, in, info, handler)
}
+func _SQLService_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 {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(SQLServiceServer).DiffMetadata(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: SQLService_DiffMetadata_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(SQLServiceServer).DiffMetadata(ctx, req.(*DiffMetadataRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
// SQLService_ServiceDesc is the grpc.ServiceDesc for SQLService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -371,6 +405,10 @@ var SQLService_ServiceDesc = grpc.ServiceDesc{
MethodName: "StringifyMetadata",
Handler: _SQLService_StringifyMetadata_Handler,
},
+ {
+ MethodName: "DiffMetadata",
+ Handler: _SQLService_DiffMetadata_Handler,
+ },
},
Streams: []grpc.StreamDesc{
{
diff --git a/proto/v1/branch_service.proto b/proto/v1/branch_service.proto
deleted file mode 100644
index e5c7a50936..0000000000
--- a/proto/v1/branch_service.proto
+++ /dev/null
@@ -1,41 +0,0 @@
-syntax = "proto3";
-
-package bytebase.v1;
-
-import "google/api/annotations.proto";
-import "google/api/field_behavior.proto";
-import "v1/annotation.proto";
-import "v1/common.proto";
-import "v1/database_service.proto";
-
-option go_package = "generated-go/v1";
-
-service BranchService {
- rpc DiffMetadata(DiffMetadataRequest) returns (DiffMetadataResponse) {
- option (google.api.http) = {
- post: "/v1/schemaDesign:diffMetadata"
- body: "*"
- };
- option (bytebase.v1.allow_without_credential) = true;
- // This is a util method requiring no authentication thus no authorization.
- }
-}
-
-message DiffMetadataRequest {
- // The metadata of the source schema.
- DatabaseMetadata source_metadata = 1 [(google.api.field_behavior) = REQUIRED];
-
- // The metadata of the target schema.
- DatabaseMetadata target_metadata = 2 [(google.api.field_behavior) = REQUIRED];
-
- // The database engine of the schema.
- Engine engine = 3;
-
- // If false, we will build the raw common by classification in database config.
- bool classification_from_config = 4;
-}
-
-message DiffMetadataResponse {
- // The diff of the metadata.
- string diff = 1;
-}
diff --git a/proto/v1/sql_service.proto b/proto/v1/sql_service.proto
index 48c94e43cd..2cb4966c88 100644
--- a/proto/v1/sql_service.proto
+++ b/proto/v1/sql_service.proto
@@ -98,6 +98,15 @@ service SQLService {
};
option (bytebase.v1.allow_without_credential) = true;
}
+
+ rpc DiffMetadata(DiffMetadataRequest) returns (DiffMetadataResponse) {
+ option (google.api.http) = {
+ post: "/v1/schemaDesign:diffMetadata"
+ body: "*"
+ };
+ option (bytebase.v1.allow_without_credential) = true;
+ // This is a util method requiring no authentication thus no authorization.
+ }
}
message AdminExecuteRequest {
@@ -434,6 +443,25 @@ message StringifyMetadataResponse {
string schema = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
}
+message DiffMetadataRequest {
+ // The metadata of the source schema.
+ DatabaseMetadata source_metadata = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The metadata of the target schema.
+ DatabaseMetadata target_metadata = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // The database engine of the schema.
+ Engine engine = 3;
+
+ // If false, we will build the raw common by classification in database config.
+ bool classification_from_config = 4;
+}
+
+message DiffMetadataResponse {
+ // The diff of the metadata.
+ string diff = 1;
+}
+
message SearchQueryHistoriesRequest {
// The maximum number of histories to return.
// The service may return fewer than this value.