Skip to content

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

feat: advise using online migration (#10945)

p0nyc97132f365cf
diff --git a/backend/api/v1/rollout_service_plan_check.go b/backend/api/v1/rollout_service_plan_check.go
index bf98acf236..4c21f5a800 100644
--- a/backend/api/v1/rollout_service_plan_check.go
+++ b/backend/api/v1/rollout_service_plan_check.go
@@ -301,7 +301,7 @@ func getPlanCheckRunsFromChangeDatabaseConfigForDatabase(ctx context.Context, s
Type: store.PlanCheckDatabaseConnect,
Config: &storepb.PlanCheckRunConfig{
SheetUid: int32(sheetUID),
- ChangeDatabaseType: storepb.PlanCheckRunConfig_CHANGE_DATABASE_TYPE_UNSPECIFIED,
+ ChangeDatabaseType: convertToChangeDatabaseType(config.Type),
InstanceUid: int32(instance.UID),
DatabaseName: database.DatabaseName,
DatabaseGroupUid: nil,
@@ -377,10 +377,10 @@ func getPlanCheckRunsFromChangeDatabaseConfigForDatabase(ctx context.Context, s
func convertToChangeDatabaseType(t storepb.PlanConfig_ChangeDatabaseConfig_Type) storepb.PlanCheckRunConfig_ChangeDatabaseType {
switch t {
- case
- storepb.PlanConfig_ChangeDatabaseConfig_MIGRATE,
- storepb.PlanConfig_ChangeDatabaseConfig_MIGRATE_GHOST:
+ case storepb.PlanConfig_ChangeDatabaseConfig_MIGRATE:
return storepb.PlanCheckRunConfig_DDL
+ case storepb.PlanConfig_ChangeDatabaseConfig_MIGRATE_GHOST:
+ return storepb.PlanCheckRunConfig_DDL_GHOST
case storepb.PlanConfig_ChangeDatabaseConfig_MIGRATE_SDL:
return storepb.PlanCheckRunConfig_SDL
case storepb.PlanConfig_ChangeDatabaseConfig_DATA:
diff --git a/backend/api/v1/sql_service.go b/backend/api/v1/sql_service.go
index e00fd6e081..36e1f586d4 100644
--- a/backend/api/v1/sql_service.go
+++ b/backend/api/v1/sql_service.go
@@ -934,7 +934,7 @@ func (s *SQLService) Check(ctx context.Context, request *v1pb.CheckRequest) (*v1
if request.Metadata != nil {
overideMetadata, _ = convertV1DatabaseMetadata(request.Metadata)
}
- _, adviceList, err := s.sqlReviewCheck(ctx, request.Statement, environment, instance, database, overideMetadata)
+ _, adviceList, err := s.sqlReviewCheck(ctx, request.Statement, request.ChangeType, environment, instance, database, overideMetadata)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to do sql review check, error: %v", err)
}
@@ -1212,7 +1212,7 @@ func (s *SQLService) preCheck(ctx context.Context, instanceName, connectionDatab
}
// Run SQL review.
- adviceStatus, adviceList, err := s.sqlReviewCheck(ctx, statement, environment, instance, maybeDatabase, nil /* Override Metadata */)
+ adviceStatus, adviceList, err := s.sqlReviewCheck(ctx, statement, v1pb.CheckRequest_CHANGE_TYPE_UNSPECIFIED, environment, instance, maybeDatabase, nil /* Override Metadata */)
if err != nil {
return nil, nil, nil, adviceStatus, adviceList, nil, err
}
@@ -1715,7 +1715,7 @@ func getReadOnlyDataSource(instance *store.InstanceMessage) *store.DataSourceMes
// sqlReviewCheck checks the SQL statement against the SQL review policy bind to given environment,
// against the database schema bind to the given database, if the overrideMetadata is provided,
// it will be used instead of fetching the database schema from the store.
-func (s *SQLService) sqlReviewCheck(ctx context.Context, statement string, environment *store.EnvironmentMessage, instance *store.InstanceMessage, database *store.DatabaseMessage, overrideMetadata *storepb.DatabaseSchemaMetadata) (advisor.Status, []*v1pb.Advice, error) {
+func (s *SQLService) sqlReviewCheck(ctx context.Context, statement string, changeType v1pb.CheckRequest_ChangeType, environment *store.EnvironmentMessage, instance *store.InstanceMessage, database *store.DatabaseMessage, overrideMetadata *storepb.DatabaseSchemaMetadata) (advisor.Status, []*v1pb.Advice, error) {
if !IsSQLReviewSupported(instance.Engine) || database == nil {
return advisor.Success, nil, nil
}
@@ -1764,10 +1764,10 @@ func (s *SQLService) sqlReviewCheck(ctx context.Context, statement string, envir
adviceLevel, adviceList, err := s.sqlCheck(
ctx,
instance.Engine,
- dbMetadata.CharacterSet,
- dbMetadata.Collation,
+ dbMetadata,
environment.UID,
statement,
+ changeType,
catalog,
connection,
currentSchema,
@@ -1812,10 +1812,10 @@ func convertAdviceStatus(status advisor.Status) v1pb.Advice_Status {
func (s *SQLService) sqlCheck(
ctx context.Context,
dbType storepb.Engine,
- dbCharacterSet string,
- dbCollation string,
+ dbSchema *storepb.DatabaseSchemaMetadata,
environmentID int,
statement string,
+ changeType v1pb.CheckRequest_ChangeType,
catalog catalog.Catalog,
driver *sql.DB,
currentSchema string,
@@ -1831,8 +1831,10 @@ func (s *SQLService) sqlCheck(
}
res, err := advisor.SQLReviewCheck(statement, policy.RuleList, advisor.SQLReviewCheckContext{
- Charset: dbCharacterSet,
- Collation: dbCollation,
+ Charset: dbSchema.CharacterSet,
+ Collation: dbSchema.Collation,
+ ChangeType: convertChangeType(changeType),
+ DBSchema: dbSchema,
DbType: dbType,
Catalog: catalog,
Driver: driver,
@@ -2657,3 +2659,16 @@ func (*SQLService) DifferPreview(_ context.Context, request *v1pb.DifferPreviewR
Schema: schema,
}, nil
}
+
+func convertChangeType(t v1pb.CheckRequest_ChangeType) storepb.PlanCheckRunConfig_ChangeDatabaseType {
+ switch t {
+ case v1pb.CheckRequest_DDL:
+ return storepb.PlanCheckRunConfig_DDL
+ case v1pb.CheckRequest_DDL_GHOST:
+ return storepb.PlanCheckRunConfig_DDL_GHOST
+ case v1pb.CheckRequest_DML:
+ return storepb.PlanCheckRunConfig_DML
+ default:
+ return storepb.PlanCheckRunConfig_CHANGE_DATABASE_TYPE_UNSPECIFIED
+ }
+}
diff --git a/backend/api/v1/sql_service_v2.go b/backend/api/v1/sql_service_v2.go
index 77b23b71ae..ebeaad477a 100644
--- a/backend/api/v1/sql_service_v2.go
+++ b/backend/api/v1/sql_service_v2.go
@@ -85,7 +85,7 @@ func (s *SQLService) ExportV2(ctx context.Context, request *v1pb.ExportRequest)
}
// Run SQL review.
- if _, _, err = s.sqlReviewCheck(ctx, statement, environment, instance, maybeDatabase, nil /* Override Metadata */); err != nil {
+ if _, _, err = s.sqlReviewCheck(ctx, statement, v1pb.CheckRequest_CHANGE_TYPE_UNSPECIFIED, environment, instance, maybeDatabase, nil /* Override Metadata */); err != nil {
return nil, err
}
@@ -183,7 +183,7 @@ func (s *SQLService) QueryV2(ctx context.Context, request *v1pb.QueryRequest) (*
}
// Run SQL review.
- adviceStatus, advices, err := s.sqlReviewCheck(ctx, statement, environment, instance, maybeDatabase, nil /* Override Metadata */)
+ adviceStatus, advices, err := s.sqlReviewCheck(ctx, statement, v1pb.CheckRequest_CHANGE_TYPE_UNSPECIFIED, environment, instance, maybeDatabase, nil /* Override Metadata */)
if err != nil {
return nil, err
}
diff --git a/backend/plugin/advisor/advisor.go b/backend/plugin/advisor/advisor.go
index 16974961be..eaa0757b2b 100644
--- a/backend/plugin/advisor/advisor.go
+++ b/backend/plugin/advisor/advisor.go
@@ -71,6 +71,9 @@ const (
// MySQLUseInnoDB is an advisor type for MySQL InnoDB Engine.
MySQLUseInnoDB Type = "bb.plugin.advisor.mysql.use-innodb"
+ // MySQLOnlineMigration is an advisor type for MySQL using online migration to migrate large tables.
+ MySQLOnlineMigration Type = "bb.plugin.advisor.mysql.online-migration"
+
// MySQLMigrationCompatibility is an advisor type for MySQL migration compatibility.
MySQLMigrationCompatibility Type = "bb.plugin.advisor.mysql.migration-compatibility"
@@ -542,7 +545,9 @@ const (
type Context struct {
Charset string
Collation string
+ DBSchema *storepb.DatabaseSchemaMetadata
SyntaxMode SyntaxMode
+ ChangeType storepb.PlanCheckRunConfig_ChangeDatabaseType
// SQL review rule special fields.
AST any
diff --git a/backend/plugin/advisor/code.go b/backend/plugin/advisor/code.go
index df0bed912f..fdfa542bf8 100644
--- a/backend/plugin/advisor/code.go
+++ b/backend/plugin/advisor/code.go
@@ -156,6 +156,9 @@ const (
// 1701 ~ 1799 function error code.
DisallowCreateFunction Code = 1701
+
+ // 1801 ~ 1899 advice error code.
+ AdviseOnlineMigration Code = 1801
)
// Int returns the int type of code.
diff --git a/backend/plugin/advisor/config/sql-review.prod.yaml b/backend/plugin/advisor/config/sql-review.prod.yaml
index 52692fc51e..6c3d3ef2e4 100644
--- a/backend/plugin/advisor/config/sql-review.prod.yaml
+++ b/backend/plugin/advisor/config/sql-review.prod.yaml
@@ -223,3 +223,7 @@ ruleList:
level: WARNING
- type: system.function.disallow-create
level: WARNING
+ - type: advice.online-migration
+ level: ERROR
+ payload:
+ number: 100000000
diff --git a/backend/plugin/advisor/mysql/advisor_online_migration.go b/backend/plugin/advisor/mysql/advisor_online_migration.go
new file mode 100644
index 0000000000..77c0ea2b44
--- /dev/null
+++ b/backend/plugin/advisor/mysql/advisor_online_migration.go
@@ -0,0 +1,116 @@
+package mysql
+
+// Framework code is generated by the generator.
+
+import (
+ "fmt"
+
+ "github.com/antlr4-go/antlr/v4"
+ "github.com/pkg/errors"
+
+ mysql "github.com/bytebase/mysql-parser"
+
+ "github.com/bytebase/bytebase/backend/plugin/advisor"
+ "github.com/bytebase/bytebase/backend/plugin/parser/base"
+ mysqlparser "github.com/bytebase/bytebase/backend/plugin/parser/mysql"
+ "github.com/bytebase/bytebase/backend/store/model"
+ storepb "github.com/bytebase/bytebase/proto/generated-go/store"
+)
+
+var (
+ _ advisor.Advisor = (*OnlineMigrationAdvisor)(nil)
+)
+
+func init() {
+ advisor.Register(storepb.Engine_MYSQL, advisor.MySQLOnlineMigration, &OnlineMigrationAdvisor{})
+}
+
+// OnlineMigrationAdvisor is the advisor checking for using gh-ost to migrate large tables.
+type OnlineMigrationAdvisor struct {
+}
+
+// Check checks for using gh-ost to migrate large tables.
+func (*OnlineMigrationAdvisor) Check(ctx advisor.Context, _ string) ([]advisor.Advice, error) {
+ if ctx.ChangeType == storepb.PlanCheckRunConfig_DDL_GHOST {
+ return []advisor.Advice{
+ {
+ Status: advisor.Success,
+ Code: advisor.Ok,
+ Title: "OK",
+ Content: "",
+ },
+ }, nil
+ }
+
+ stmtList, ok := ctx.AST.([]*mysqlparser.ParseResult)
+ if !ok {
+ return nil, errors.Errorf("failed to convert to StmtNode")
+ }
+
+ payload, err := advisor.UnmarshalNumberTypeRulePayload(ctx.Rule.Payload)
+ if err != nil {
+ return nil, err
+ }
+ minRows := int64(payload.Number)
+
+ level, err := advisor.NewStatusBySQLReviewRuleLevel(ctx.Rule.Level)
+ if err != nil {
+ return nil, err
+ }
+ checker := &useGhostChecker{
+ level: level,
+ title: string(ctx.Rule.Type),
+ currentDatabase: ctx.CurrentDatabase,
+ changedResources: make(map[string]base.SchemaResource),
+ }
+
+ for _, stmt := range stmtList {
+ antlr.ParseTreeWalkerDefault.Walk(checker, stmt.Tree)
+ }
+
+ dbSchema := model.NewDBSchema(ctx.DBSchema, nil, nil)
+ for _, resource := range checker.changedResources {
+ tableRows := dbSchema.GetDatabaseMetadata().GetSchema(resource.Schema).GetTable(resource.Table).GetRowCount()
+ if tableRows >= minRows {
+ checker.adviceList = append(checker.adviceList, advisor.Advice{
+ Status: checker.level,
+ Code: advisor.AdviseOnlineMigration,
+ Title: checker.title,
+ Content: fmt.Sprintf("Estimated table row count of %q is %d exceeding the set value %d. Consider enabling online migration", fmt.Sprintf("%s.%s", resource.Schema, resource.Table), tableRows, minRows),
+ })
+ }
+ }
+
+ if len(checker.adviceList) == 0 {
+ checker.adviceList = append(checker.adviceList, advisor.Advice{
+ Status: advisor.Success,
+ Code: advisor.Ok,
+ Title: "OK",
+ Content: "",
+ })
+ }
+ return checker.adviceList, nil
+}
+
+type useGhostChecker struct {
+ *mysql.BaseMySQLParserListener
+
+ adviceList []advisor.Advice
+ level advisor.Status
+ title string
+
+ currentDatabase string
+ changedResources map[string]base.SchemaResource
+}
+
+func (c *useGhostChecker) EnterAlterTable(ctx *mysql.AlterTableContext) {
+ resource := base.SchemaResource{
+ Database: c.currentDatabase,
+ }
+ db, table := mysqlparser.NormalizeMySQLTableRef(ctx.TableRef())
+ if db != "" {
+ resource.Database = db
+ }
+ resource.Table = table
+ c.changedResources[resource.String()] = resource
+}
diff --git a/backend/plugin/advisor/sql_review.go b/backend/plugin/advisor/sql_review.go
index 678923619e..fc3b2b031f 100644
--- a/backend/plugin/advisor/sql_review.go
+++ b/backend/plugin/advisor/sql_review.go
@@ -190,6 +190,9 @@ const (
// SchemaRuleFunctionDisallowCreate disallow create function.
SchemaRuleFunctionDisallowCreate SQLReviewRuleType = "system.function.disallow-create"
+ // SchemaRuleOnlineMigration advises using online migration to migrate large tables.
+ SchemaRuleOnlineMigration SQLReviewRuleType = "advice.online-migration"
+
// TableNameTemplateToken is the token for table name.
TableNameTemplateToken = "{{table}}"
// ColumnListTemplateToken is the token for column name list.
@@ -406,12 +409,14 @@ func UnmarshalNamingCaseRulePayload(payload string) (*NamingCaseRulePayload, err
// SQLReviewCheckContext is the context for SQL review check.
type SQLReviewCheckContext struct {
- Charset string
- Collation string
- DbType storepb.Engine
- Catalog catalog.Catalog
- Driver *sql.DB
- Context context.Context
+ Charset string
+ Collation string
+ ChangeType storepb.PlanCheckRunConfig_ChangeDatabaseType
+ DBSchema *storepb.DatabaseSchemaMetadata
+ DbType storepb.Engine
+ Catalog catalog.Catalog
+ Driver *sql.DB
+ Context context.Context
// Snowflake specific fields
CurrentDatabase string
@@ -719,6 +724,8 @@ func SQLReviewCheck(statements string, ruleList []*storepb.SQLReviewRule, checkC
Context{
Charset: checkContext.Charset,
Collation: checkContext.Collation,
+ DBSchema: checkContext.DBSchema,
+ ChangeType: checkContext.ChangeType,
AST: ast,
Statements: statements,
Rule: rule,
@@ -1492,6 +1499,10 @@ func getAdvisorTypeByRule(ruleType SQLReviewRuleType, engine storepb.Engine) (Ty
if engine == storepb.Engine_MYSQL {
return MySQLFunctionDisallowCreate, nil
}
+ case SchemaRuleOnlineMigration:
+ if engine == storepb.Engine_MYSQL {
+ return MySQLOnlineMigration, nil
+ }
}
return Fake, errors.Errorf("unknown SQL review rule type %v for %v", ruleType, engine)
}
diff --git a/backend/runner/plancheck/statement_advise_executor.go b/backend/runner/plancheck/statement_advise_executor.go
index e976d2d9b6..73087a3cdf 100644
--- a/backend/runner/plancheck/statement_advise_executor.go
+++ b/backend/runner/plancheck/statement_advise_executor.go
@@ -162,12 +162,14 @@ func (e *StatementAdviseExecutor) runForDatabaseTarget(ctx context.Context, conf
// To avoid leaking the rendered statement, the error message should use the original statement and not the rendered statement.
renderedStatement := utils.RenderStatement(statement, materials)
adviceList, err := advisor.SQLReviewCheck(renderedStatement, policy.RuleList, advisor.SQLReviewCheckContext{
- Charset: dbSchema.GetMetadata().CharacterSet,
- Collation: dbSchema.GetMetadata().Collation,
- DbType: instance.Engine,
- Catalog: catalog,
- Driver: connection,
- Context: ctx,
+ Charset: dbSchema.GetMetadata().CharacterSet,
+ Collation: dbSchema.GetMetadata().Collation,
+ DBSchema: dbSchema.GetMetadata(),
+ ChangeType: changeType,
+ DbType: instance.Engine,
+ Catalog: catalog,
+ Driver: connection,
+ Context: ctx,
})
if err != nil {
return nil, err
diff --git a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckDetail.vue b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckDetail.vue
index 8d8a237f93..f8628911b6 100644
--- a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckDetail.vue
+++ b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckDetail.vue
@@ -70,6 +70,8 @@
>
{{ row.link.title }}
</a>
+
+ <slot name="row-extra" :row="row" />
</div>
</div>
</div>
@@ -127,7 +129,7 @@ type PreviewSQLReviewRule = {
payload: PayloadValueType[];
};
-type TableRow = {
+export type PlanCheckDetailTableRow = {
checkResult: PlanCheckRun_Result;
category: string;
title: string;
@@ -256,7 +258,7 @@ const errorCodeLink = (
};
const tableRows = computed(() => {
- return checkResultList.value.map<TableRow>((checkResult) => {
+ return checkResultList.value.map<PlanCheckDetailTableRow>((checkResult) => {
const [category, title] = categoryAndTitle(checkResult);
const link = errorCodeLink(checkResult);
return {
diff --git a/frontend/src/components/IssueV1/components/SQLCheckSection/OnlineMigrationAdviceExtra.vue b/frontend/src/components/IssueV1/components/SQLCheckSection/OnlineMigrationAdviceExtra.vue
new file mode 100644
index 0000000000..056c6e4380
--- /dev/null
+++ b/frontend/src/components/IssueV1/components/SQLCheckSection/OnlineMigrationAdviceExtra.vue
@@ -0,0 +1,44 @@
+<template>
+ <template v-if="allowEnableGhost">
+ <span class="border-r border-control-border ml-1"></span>
+ <span class="normal-link ml-1 inline-block" @click="enableGhost">
+ {{ $t("task.online-migration.enable") }}
+ </span>
+ </template>
+</template>
+
+<script setup lang="ts">
+import { computed } from "vue";
+import { isGroupingChangeTaskV1, useIssueContext } from "../../logic";
+import { type PlanCheckDetailTableRow } from "../PlanCheckSection/PlanCheckBar/PlanCheckDetail.vue";
+import { allowGhostForTask } from "../Sidebar/GhostSection/common";
+
+const emit = defineEmits<{
+ (event: "toggle", on: boolean): void;
+}>();
+
+defineProps<{
+ row: PlanCheckDetailTableRow;
+}>();
+
+const { isCreating, issue, activeTask } = useIssueContext();
+
+const allowEnableGhost = computed(() => {
+ if (!isCreating.value) {
+ return false;
+ }
+ if (isGroupingChangeTaskV1(issue.value, activeTask.value)) {
+ return false;
+ }
+
+ if (!allowGhostForTask(issue.value, activeTask.value)) {
+ return false;
+ }
+
+ return true;
+});
+
+const enableGhost = () => {
+ emit("toggle", true);
+};
+</script>
diff --git a/frontend/src/components/IssueV1/components/SQLCheckSection/SQLCheckBadge.vue b/frontend/src/components/IssueV1/components/SQLCheckSection/SQLCheckBadge.vue
index e9ddbde8a6..60a2458e23 100644
--- a/frontend/src/components/IssueV1/components/SQLCheckSection/SQLCheckBadge.vue
+++ b/frontend/src/components/IssueV1/components/SQLCheckSection/SQLCheckBadge.vue
@@ -28,7 +28,15 @@
:database="database"
:advices="advices"
@close="showDetailPanel = false"
- />
+ >
+ <template #row-extra="{ row }">
+ <OnlineMigrationAdviceExtra
+ v-if="row.checkResult.title === 'advice.online-migration'"
+ :row="row"
+ @toggle="handleToggleOnlineMigration"
+ />
+ </template>
+ </SQLCheckPanel>
</button>
</template>
@@ -37,6 +45,7 @@ import { computed, ref } from "vue";
import { SQLCheckPanel } from "@/components/SQLCheck";
import { Advice, Advice_Status } from "@/types/proto/v1/sql_service";
import { databaseForTask, useIssueContext } from "../../logic";
+import OnlineMigrationAdviceExtra from "./OnlineMigrationAdviceExtra.vue";
const props = defineProps<{
isRunning: boolean;
@@ -47,7 +56,7 @@ defineEmits<{
(event: "click"): void;
}>();
-const { issue, selectedTask } = useIssueContext();
+const { issue, selectedTask, events } = useIssueContext();
const showDetailPanel = ref(false);
const database = computed(() => {
@@ -112,4 +121,13 @@ const buttonClasses = computed(() => {
const handleClick = () => {
showDetailPanel.value = true;
};
+
+const handleToggleOnlineMigration = (on: boolean) => {
+ if (on) {
+ events.emit("toggle-online-migration", {
+ on: true,
+ });
+ showDetailPanel.value = true;
+ }
+};
</script>
diff --git a/frontend/src/components/IssueV1/components/SQLCheckSection/SQLCheckSection.vue b/frontend/src/components/IssueV1/components/SQLCheckSection/SQLCheckSection.vue
index 20b521e252..3fd1328b41 100644
--- a/frontend/src/components/IssueV1/components/SQLCheckSection/SQLCheckSection.vue
+++ b/frontend/src/components/IssueV1/components/SQLCheckSection/SQLCheckSection.vue
@@ -23,6 +23,14 @@
</template>
<SQLCheckBadge v-else :is-running="isRunning" :advices="advices" />
</template>
+
+ <template #row-extra="{ row, confirm }">
+ <OnlineMigrationAdviceExtra
+ v-if="row.checkResult.title === 'advice.online-migration'"
+ :row="row"
+ @toggle="handleToggleOnlineMigration($event, confirm)"
+ />
+ </template>
</SQLCheckButton>
</div>
</template>
@@ -34,9 +42,10 @@ import { useIssueContext, databaseForTask } from "@/components/IssueV1/logic";
import { SQLCheckButton } from "@/components/SQLCheck";
import { TaskTypeListWithStatement } from "@/types";
import { Task_Type } from "@/types/proto/v1/rollout_service";
+import { Defer } from "@/utils/util";
import SQLCheckBadge from "./SQLCheckBadge.vue";
-const { issue, selectedTask } = useIssueContext();
+const { issue, selectedTask, events } = useIssueContext();
const { sheetStatement } = useTaskSheet();
const database = computed(() => {
return databaseForTask(issue.value, selectedTask.value);
@@ -59,4 +68,13 @@ const show = computed(() => {
}
return false;
});
+
+const handleToggleOnlineMigration = (on: boolean, confirm: Defer<boolean>) => {
+ if (on) {
+ events.emit("toggle-online-migration", {
+ on: true,
+ });
+ confirm.resolve(false);
+ }
+};
</script>
diff --git a/frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostSwitch.vue b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostSwitch.vue
index 2bfcb03b86..3c29e06f75 100644
--- a/frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostSwitch.vue
+++ b/frontend/src/components/IssueV1/components/Sidebar/GhostSection/GhostSwitch.vue
@@ -49,7 +49,7 @@ import { allowGhostForTask, useIssueGhostContext } from "./common";
const { t } = useI18n();
const me = useCurrentUserV1();
-const { isCreating, issue, selectedTask: task } = useIssueContext();
+const { isCreating, issue, selectedTask: task, events } = useIssueContext();
const { viewType, toggleGhost, showFeatureModal, showMissingInstanceLicense } =
useIssueGhostContext();
const isUpdating = ref(false);
@@ -122,6 +122,12 @@ const toggleChecked = async (on: boolean) => {
isUpdating.value = false;
}
};
+
+events.on("toggle-online-migration", ({ on }) => {
+ if (on) {
+ toggleChecked(on);
+ }
+});
</script>
<style lang="postcss" scoped>
diff --git a/frontend/src/components/IssueV1/logic/context.ts b/frontend/src/components/IssueV1/logic/context.ts
index d25e7c7e27..f89f75a12e 100644
--- a/frontend/src/components/IssueV1/logic/context.ts
+++ b/frontend/src/components/IssueV1/logic/context.ts
@@ -20,6 +20,7 @@ export type IssueEvents = Emittery<{
"perform-issue-review-action": { action: IssueReviewAction };
"perform-issue-status-action": { action: IssueStatusAction };
"perform-task-rollout-action": { action: TaskRolloutAction; tasks: Task[] };
+ "toggle-online-migration": { on: boolean };
}>;
export type ReviewContext = {
diff --git a/frontend/src/components/SQLCheck/SQLCheckButton.vue b/frontend/src/components/SQLCheck/SQLCheckButton.vue
index 13e6cec412..235b31d0c9 100644
--- a/frontend/src/components/SQLCheck/SQLCheckButton.vue
+++ b/frontend/src/components/SQLCheck/SQLCheckButton.vue
@@ -54,7 +54,11 @@
:confirm="confirmDialog"
:override-title="$t('issue.sql-check.sql-review-violations')"
@close="confirmDialog = undefined"
- />
+ >
+ <template #row-extra="{ row }">
+ <slot name="row-extra" :row="row" :confirm="confirmDialog" />
+ </template>
+ </SQLCheckPanel>
</div>
</template>
diff --git a/frontend/src/components/SQLCheck/SQLCheckPanel.vue b/frontend/src/components/SQLCheck/SQLCheckPanel.vue
index a3425a42e8..3e57d00089 100644
--- a/frontend/src/components/SQLCheck/SQLCheckPanel.vue
+++ b/frontend/src/components/SQLCheck/SQLCheckPanel.vue
@@ -8,10 +8,11 @@
container-class="!pt-0 -mt-px"
@close="$emit('close')"
>
- <PlanCheckDetail
- :plan-check-run="planCheckRun"
- :environment="environment"
- />
+ <PlanCheckDetail :plan-check-run="planCheckRun" :environment="environment">
+ <template #row-extra="{ row }">
+ <slot name="row-extra" :row="row" />
+ </template>
+ </PlanCheckDetail>
<div
v-if="confirm"
@@ -45,6 +46,7 @@ import {
} from "@/types/proto/v1/rollout_service";
import { Advice, Advice_Status } from "@/types/proto/v1/sql_service";
import { Defer } from "@/utils";
+import PlanCheckDetail from "../IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckDetail.vue";
const { advices, database } = defineProps<{
database: ComposedDatabase;
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index 5ca65a0794..a99e5a227f 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -401,7 +401,8 @@
}
},
"show-default-parameters": "Show default parameters",
- "hide-default-parameters": "Hide default parameters"
+ "hide-default-parameters": "Hide default parameters",
+ "enable": "Enable online migration"
},
"prior-backup-tips": "Back up affected data ahead of time"
},
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index a88330caac..99bcf352f0 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -401,7 +401,8 @@
}
},
"show-default-parameters": "Mostrar parámetros predeterminados",
- "hide-default-parameters": "Ocultar parámetros predeterminados"
+ "hide-default-parameters": "Ocultar parámetros predeterminados",
+ "enable": "Habilitar la migración en línea"
},
"prior-backup-tips": "Haga una copia de seguridad de los datos afectados con anticipación"
},
diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.json
index 37f82faa01..79e708e266 100644
--- a/frontend/src/locales/ja-JP.json
+++ b/frontend/src/locales/ja-JP.json
@@ -401,7 +401,8 @@
}
},
"show-default-parameters": "デフォルトのパラメータを表示する",
- "hide-default-parameters": "デフォルトパラメータを非表示にする"
+ "hide-default-parameters": "デフォルトパラメータを非表示にする",
+ "enable": "オンライン移行を有効にする"
},
"prior-backup-tips": "影響を受けるデータを事前にバックアップする"
},
diff --git a/frontend/src/locales/sql-review/en-US.json b/frontend/src/locales/sql-review/en-US.json
index 1c2b778557..855657350b 100644
--- a/frontend/src/locales/sql-review/en-US.json
+++ b/frontend/src/locales/sql-review/en-US.json
@@ -20,7 +20,8 @@
"schema": "Schema",
"database": "Database",
"index": "Index",
- "system": "System"
+ "system": "System",
+ "advice": "Advice"
},
"template": {
"bb-sql-review-prod": "Advanced Template",
@@ -475,6 +476,10 @@
"system-function-disallow-create": {
"title": "Disallow to create functions",
"description": "This rule prohibits the creation of functions within the database. Functions provide reusable logic that can simplify queries and enhance data integrity. By disallowing their creation, it helps maintain control over database schema and prevents potential security risks. Suggested error level: Warning"
+ },
+ "advice-online-migration": {
+ "title": "Advise enabling online migration",
+ "description": "Advise enabling online migration if the migrated table row count exceeds your setting. Suggested error level: Warning"
}
},
"level": {
diff --git a/frontend/src/locales/sql-review/es-ES.json b/frontend/src/locales/sql-review/es-ES.json
index e3bf75c44d..f867cd7d71 100644
--- a/frontend/src/locales/sql-review/es-ES.json
+++ b/frontend/src/locales/sql-review/es-ES.json
@@ -20,7 +20,8 @@
"schema": "Esquema",
"database": "Base de datos",
"index": "Índice",
- "system": "Sistema"
+ "system": "Sistema",
+ "advice": "Consejo"
},
"template": {
"bb-sql-review-prod": "Plantilla Avanzada",
@@ -475,6 +476,10 @@
"system-function-disallow-create": {
"title": "Prohibición de crear funciones",
"description": "Esta regla prohíbe la creación de funciones dentro de la base de datos. Las funciones proporcionan lógica reutilizable que puede simplificar las consultas y mejorar la integridad de los datos. Al prohibir su creación, se ayuda a mantener el control sobre el esquema de la base de datos y se previenen posibles riesgos de seguridad. Nivel de error sugerido: Advertencia"
+ },
+ "advice-online-migration": {
+ "title": "Se recomienda habilitar la migración en línea",
+ "description": "Se recomienda habilitar la migración en línea si el recuento de filas de la tabla migrada supera su configuración. Nivel de error sugerido: Advertencia"
}
},
"level": {
diff --git a/frontend/src/locales/sql-review/ja-JP.json b/frontend/src/locales/sql-review/ja-JP.json
index b6551fb884..e6a6300f25 100644
--- a/frontend/src/locales/sql-review/ja-JP.json
+++ b/frontend/src/locales/sql-review/ja-JP.json
@@ -20,7 +20,8 @@
"schema": "スキーマ",
"database": "データベース",
"index": "インデックス",
- "system": "システム"
+ "system": "システム",
+ "advice": "アドバイス"
},
"template": {
"bb-sql-review-prod": "高度なテンプレート",
@@ -475,6 +476,10 @@
"system-function-disallow-create": {
"title": "関数の作成を禁止する",
"description": "このルールは、データベース内での関数の作成を禁止します。関数は再利用可能なロジックを提供し、クエリを簡素化し、データの整合性を向上させることができます。その作成を禁止することで、データベーススキーマの制御を維持し、潜在的なセキュリティリスクを防止します。推奨されるエラーレベル:警告"
+ },
+ "advice-online-migration": {
+ "title": "オンライン移行の有効化を推奨",
+ "description": "移行されたテーブル行数が設定値を超えた場合、オンライン移行の有効化を推奨します。推奨されるエラーレベル: 警告"
}
},
"level": {
diff --git a/frontend/src/locales/sql-review/vi-VN.json b/frontend/src/locales/sql-review/vi-VN.json
index 0b254b4eb3..3ede1988b9 100644
--- a/frontend/src/locales/sql-review/vi-VN.json
+++ b/frontend/src/locales/sql-review/vi-VN.json
@@ -20,7 +20,8 @@
"schema": "Lược đồ",
"database": "Cơ sở dữ liệu",
"index": "Mục lục",
- "system": "Hệ thống"
+ "system": "Hệ thống",
+ "advice": "Khuyến nghị "
},
"template": {
"bb-sql-review-prod": "Mẫu nâng cao",
@@ -475,6 +476,10 @@
"system-function-disallow-create": {
"title": "Không cho phép tạo hàm",
"description": "Quy tắc này cấm việc tạo các hàm trong cơ sở dữ liệu. Các hàm cung cấp logic có thể tái sử dụng giúp đơn giản hóa các truy vấn và tăng cường tính toàn vẹn dữ liệu. Bằng cách không cho phép tạo chúng, nó giúp duy trì kiểm soát đối với cấu trúc cơ sở dữ liệu và ngăn ngừa các rủi ro bảo mật tiềm ẩn. Mức độ lỗi đề xuất: Cảnh báo"
+ },
+ "advice-online-migration": {
+ "title": "Khuyến nghị bật di chuyển trực tuyến",
+ "description": "Nếu số lượng hàng bảng được di chuyển vượt quá cài đặt của bạn, hãy bật di chuyển trực tuyến. Mức lỗi được đề xuất: Cảnh báo"
}
},
"level": {
diff --git a/frontend/src/locales/sql-review/zh-CN.json b/frontend/src/locales/sql-review/zh-CN.json
index b8223e3632..349ca30d0d 100644
--- a/frontend/src/locales/sql-review/zh-CN.json
+++ b/frontend/src/locales/sql-review/zh-CN.json
@@ -20,7 +20,8 @@
"schema": "Schema",
"database": "数据库",
"index": "索引",
- "system": "系统"
+ "system": "系统",
+ "advice": "建议"
},
"template": {
"bb-sql-review-prod": "进阶模板",
@@ -475,6 +476,10 @@
"system-function-disallow-create": {
"title": "禁止创建函数",
"description": "该规则禁止在数据库中创建函数。函数提供可重用的逻辑,可以简化查询并增强数据完整性。通过禁止创建它们,有助于保持对数据库架构的控制,并预防潜在的安全风险。建议的错误级别:警告"
+ },
+ "advice-online-migration": {
+ "title": "建议启用在线大表变更",
+ "description": "如果迁移的表行数超过您的设置,建议启用在线迁移。建议的错误级别: 警告"
}
},
"level": {
diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.json
index 6b3736f876..bd074c4ed0 100644
--- a/frontend/src/locales/vi-VN.json
+++ b/frontend/src/locales/vi-VN.json
@@ -401,7 +401,8 @@
}
},
"show-default-parameters": "Hiển thị thông số mặc định",
- "hide-default-parameters": "Ẩn thông số mặc định"
+ "hide-default-parameters": "Ẩn thông số mặc định",
+ "enable": "Cho phép di chuyển trực tuyến"
},
"prior-backup-tips": "Sao lưu trước dữ liệu bị ảnh hưởng"
},
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 0bd232f866..46fed0e4b1 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -401,7 +401,8 @@
}
},
"show-default-parameters": "显示默认参数",
- "hide-default-parameters": "隐藏默认参数"
+ "hide-default-parameters": "隐藏默认参数",
+ "enable": "启用在线大表变更"
},
"prior-backup-tips": "提前备份受影响的数据"
},
diff --git a/frontend/src/types/proto/google/protobuf/descriptor.ts b/frontend/src/types/proto/google/protobuf/descriptor.ts
index 824c1150fd..e5804c3efe 100644
--- a/frontend/src/types/proto/google/protobuf/descriptor.ts
+++ b/frontend/src/types/proto/google/protobuf/descriptor.ts
@@ -4,98 +4,6 @@ import _m0 from "protobufjs/minimal";
export const protobufPackage = "google.protobuf";
-/** The full set of known editions. */
-export enum Edition {
- /** EDITION_UNKNOWN - A placeholder for an unknown edition value. */
- EDITION_UNKNOWN = 0,
- /**
- * EDITION_PROTO2 - Legacy syntax "editions". These pre-date editions, but behave much like
- * distinct editions. These can't be used to specify the edition of proto
- * files, but feature definitions must supply proto2/proto3 defaults for
- * backwards compatibility.
- */
- EDITION_PROTO2 = 998,
- EDITION_PROTO3 = 999,
- /**
- * EDITION_2023 - Editions that have been released. The specific values are arbitrary and
- * should not be depended on, but they will always be time-ordered for easy
- * comparison.
- */
- EDITION_2023 = 1000,
- /**
- * EDITION_1_TEST_ONLY - Placeholder editions for testing feature resolution. These should not be
- * used or relyed on outside of tests.
- */
- EDITION_1_TEST_ONLY = 1,
- EDITION_2_TEST_ONLY = 2,
- EDITION_99997_TEST_ONLY = 99997,
- EDITION_99998_TEST_ONLY = 99998,
- EDITION_99999_TEST_ONLY = 99999,
- UNRECOGNIZED = -1,
-}
-
-export function editionFromJSON(object: any): Edition {
- switch (object) {
- case 0:
- case "EDITION_UNKNOWN":
- return Edition.EDITION_UNKNOWN;
- case 998:
- case "EDITION_PROTO2":
- return Edition.EDITION_PROTO2;
- case 999:
- case "EDITION_PROTO3":
- return Edition.EDITION_PROTO3;
- case 1000:
- case "EDITION_2023":
- return Edition.EDITION_2023;
- case 1:
- case "EDITION_1_TEST_ONLY":
- return Edition.EDITION_1_TEST_ONLY;
- case 2:
- case "EDITION_2_TEST_ONLY":
- return Edition.EDITION_2_TEST_ONLY;
- case 99997:
- case "EDITION_99997_TEST_ONLY":
- return Edition.EDITION_99997_TEST_ONLY;
- case 99998:
- case "EDITION_99998_TEST_ONLY":
- return Edition.EDITION_99998_TEST_ONLY;
- case 99999:
- case "EDITION_99999_TEST_ONLY":
- return Edition.EDITION_99999_TEST_ONLY;
- case -1:
- case "UNRECOGNIZED":
- default:
- return Edition.UNRECOGNIZED;
- }
-}
-
-export function editionToJSON(object: Edition): string {
- switch (object) {
- case Edition.EDITION_UNKNOWN:
- return "EDITION_UNKNOWN";
- case Edition.EDITION_PROTO2:
- return "EDITION_PROTO2";
- case Edition.EDITION_PROTO3:
- return "EDITION_PROTO3";
- case Edition.EDITION_2023:
- return "EDITION_2023";
- case Edition.EDITION_1_TEST_ONLY:
- return "EDITION_1_TEST_ONLY";
- case Edition.EDITION_2_TEST_ONLY:
- return "EDITION_2_TEST_ONLY";
- case Edition.EDITION_99997_TEST_ONLY:
- return "EDITION_99997_TEST_ONLY";
- case Edition.EDITION_99998_TEST_ONLY:
- return "EDITION_99998_TEST_ONLY";
- case Edition.EDITION_99999_TEST_ONLY:
- return "EDITION_99999_TEST_ONLY";
- case Edition.UNRECOGNIZED:
- default:
- return "UNRECOGNIZED";
- }
-}
-
/**
* The protocol compiler can output a FileDescriptorSet containing the .proto
* files it parses.
@@ -143,8 +51,8 @@ export interface FileDescriptorProto {
* If `edition` is present, this value must be "editions".
*/
syntax: string;
- /** The edition of the proto file. */
- edition: Edition;
+ /** The edition of the proto file, which is an opaque string. */
+ edition: string;
}
/** Describes a message type. */
@@ -188,84 +96,6 @@ export interface DescriptorProto_ReservedRange {
export interface ExtensionRangeOptions {
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
- /**
- * For external users: DO NOT USE. We are in the process of open sourcing
- * extension declaration and executing internal cleanups before it can be
- * used externally.
- */
- declaration: ExtensionRangeOptions_Declaration[];
- /** Any features defined in the specific edition. */
- features:
- | FeatureSet
- | undefined;
- /**
- * The verification state of the range.
- * TODO: flip the default to DECLARATION once all empty ranges
- * are marked as UNVERIFIED.
- */
- verification: ExtensionRangeOptions_VerificationState;
-}
-
-/** The verification state of the extension range. */
-export enum ExtensionRangeOptions_VerificationState {
- /** DECLARATION - All the extensions of the range must be declared. */
- DECLARATION = 0,
- UNVERIFIED = 1,
- UNRECOGNIZED = -1,
-}
-
-export function extensionRangeOptions_VerificationStateFromJSON(object: any): ExtensionRangeOptions_VerificationState {
- switch (object) {
- case 0:
- case "DECLARATION":
- return ExtensionRangeOptions_VerificationState.DECLARATION;
- case 1:
- case "UNVERIFIED":
- return ExtensionRangeOptions_VerificationState.UNVERIFIED;
- case -1:
- case "UNRECOGNIZED":
- default:
- return ExtensionRangeOptions_VerificationState.UNRECOGNIZED;
- }
-}
-
-export function extensionRangeOptions_VerificationStateToJSON(object: ExtensionRangeOptions_VerificationState): string {
- switch (object) {
- case ExtensionRangeOptions_VerificationState.DECLARATION:
- return "DECLARATION";
- case ExtensionRangeOptions_VerificationState.UNVERIFIED:
- return "UNVERIFIED";
- case ExtensionRangeOptions_VerificationState.UNRECOGNIZED:
- default:
- return "UNRECOGNIZED";
- }
-}
-
-export interface ExtensionRangeOptions_Declaration {
- /** The extension number declared within the extension range. */
- number: number;
- /**
- * The fully-qualified name of the extension field. There must be a leading
- * dot in front of the full name.
- */
- fullName: string;
- /**
- * The fully-qualified type name of the extension field. Unlike
- * Metadata.type, Declaration.type must have a leading dot for messages
- * and enums.
- */
- type: string;
- /**
- * If true, indicates that the number is reserved in the extension range,
- * and any extension field with the number will fail to compile. Set this
- * when a declared extension field is deleted.
- */
- reserved: boolean;
- /**
- * If true, indicates that the extension must be defined as repeated.
- * Otherwise the extension must be defined as optional.
- */
- repeated: boolean;
}
/** Describes a field within a message. */
@@ -363,10 +193,9 @@ export enum FieldDescriptorProto_Type {
TYPE_STRING = 9,
/**
* TYPE_GROUP - Tag-delimited aggregate.
- * Group type is deprecated and not supported after google.protobuf. However, Proto3
+ * Group type is deprecated and not supported in proto3. However, Proto3
* implementations should still be able to parse the group wire format and
- * treat group fields as unknown fields. In Editions, the group wire format
- * can be enabled via the `message_encoding` feature.
+ * treat group fields as unknown fields.
*/
TYPE_GROUP = 10,
/** TYPE_MESSAGE - Length-delimited aggregate. */
@@ -494,13 +323,8 @@ export function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Typ
export enum FieldDescriptorProto_Label {
/** LABEL_OPTIONAL - 0 is reserved for errors */
LABEL_OPTIONAL = 1,
- LABEL_REPEATED = 3,
- /**
- * LABEL_REQUIRED - The required label is only allowed in google.protobuf. In proto3 and Editions
- * it's explicitly prohibited. In Editions, the `field_presence` feature
- * can be used to get this behavior.
- */
LABEL_REQUIRED = 2,
+ LABEL_REPEATED = 3,
UNRECOGNIZED = -1,
}
@@ -509,12 +333,12 @@ export function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptor
case 1:
case "LABEL_OPTIONAL":
return FieldDescriptorProto_Label.LABEL_OPTIONAL;
- case 3:
- case "LABEL_REPEATED":
- return FieldDescriptorProto_Label.LABEL_REPEATED;
case 2:
case "LABEL_REQUIRED":
return FieldDescriptorProto_Label.LABEL_REQUIRED;
+ case 3:
+ case "LABEL_REPEATED":
+ return FieldDescriptorProto_Label.LABEL_REPEATED;
case -1:
case "UNRECOGNIZED":
default:
@@ -526,10 +350,10 @@ export function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_La
switch (object) {
case FieldDescriptorProto_Label.LABEL_OPTIONAL:
return "LABEL_OPTIONAL";
- case FieldDescriptorProto_Label.LABEL_REPEATED:
- return "LABEL_REPEATED";
case FieldDescriptorProto_Label.LABEL_REQUIRED:
return "LABEL_REQUIRED";
+ case FieldDescriptorProto_Label.LABEL_REPEATED:
+ return "LABEL_REPEATED";
case FieldDescriptorProto_Label.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
@@ -723,10 +547,6 @@ export interface FileOptions {
* determining the ruby package.
*/
rubyPackage: string;
- /** Any features defined in the specific edition. */
- features:
- | FeatureSet
- | undefined;
/**
* The parser stores options it doesn't recognize here.
* See the documentation for the "Options" section above.
@@ -845,16 +665,12 @@ export interface MessageOptions {
* This should only be used as a temporary measure against broken builds due
* to the change in behavior for JSON field name conflicts.
*
- * TODO This is legacy behavior we plan to remove once downstream
+ * TODO(b/261750190) This is legacy behavior we plan to remove once downstream
* teams have had time to migrate.
*
* @deprecated
*/
deprecatedLegacyJsonFieldConflicts: boolean;
- /** Any features defined in the specific edition. */
- features:
- | FeatureSet
- | undefined;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
}
@@ -863,10 +679,8 @@ export interface FieldOptions {
/**
* The ctype option instructs the C++ code generator to use a different
* representation of the field than it normally would. See the specific
- * options below. This option is only implemented to support use of
- * [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
- * type "bytes" in the open source release -- sorry, we'll try to include
- * other types in a future version!
+ * options below. This option is not yet implemented in the open source
+ * release -- sorry, we'll try to include it in a future version!
*/
ctype: FieldOptions_CType;
/**
@@ -874,9 +688,7 @@ export interface FieldOptions {
* a more efficient representation on the wire. Rather than repeatedly
* writing the tag and type for each element, the entire array is encoded as
* a single length-delimited blob. In proto3, only explicit setting it to
- * false will avoid using packed encoding. This option is prohibited in
- * Editions, but the `repeated_field_encoding` feature can be used to control
- * the behavior.
+ * false will avoid using packed encoding.
*/
packed: boolean;
/**
@@ -947,12 +759,7 @@ export interface FieldOptions {
*/
debugRedact: boolean;
retention: FieldOptions_OptionRetention;
- targets: FieldOptions_OptionTargetType[];
- editionDefaults: FieldOptions_EditionDefault[];
- /** Any features defined in the specific edition. */
- features:
- | FeatureSet
- | undefined;
+ target: FieldOptions_OptionTargetType;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
}
@@ -960,14 +767,6 @@ export interface FieldOptions {
export enum FieldOptions_CType {
/** STRING - Default mode. */
STRING = 0,
- /**
- * CORD - The option [ctype=CORD] may be applied to a non-repeated field of type
- * "bytes". It indicates that in C++, the data should be stored in a Cord
- * instead of a string. For very large strings, this may reduce memory
- * fragmentation. It may also allow better performance when parsing from a
- * Cord, or when parsing with aliasing enabled, as the parsed Cord may then
- * alias the original buffer.
- */
CORD = 1,
STRING_PIECE = 2,
UNRECOGNIZED = -1,
@@ -1178,17 +977,7 @@ export function fieldOptions_OptionTargetTypeToJSON(object: FieldOptions_OptionT
}
}
-export interface FieldOptions_EditionDefault {
- edition: Edition;
- /** Textproto value. */
- value: string;
-}
-
export interface OneofOptions {
- /** Any features defined in the specific edition. */
- features:
- | FeatureSet
- | undefined;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
}
@@ -1211,16 +1000,12 @@ export interface EnumOptions {
* and strips underscored from the fields before comparison in proto3 only.
* The new behavior takes `json_name` into account and applies to proto2 as
* well.
- * TODO Remove this legacy behavior once downstream teams have
+ * TODO(b/261750190) Remove this legacy behavior once downstream teams have
* had time to migrate.
*
* @deprecated
*/
deprecatedLegacyJsonFieldConflicts: boolean;
- /** Any features defined in the specific edition. */
- features:
- | FeatureSet
- | undefined;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
}
@@ -1233,25 +1018,11 @@ export interface EnumValueOptions {
* this is a formalization for deprecating enum values.
*/
deprecated: boolean;
- /** Any features defined in the specific edition. */
- features:
- | FeatureSet
- | undefined;
- /**
- * Indicate that fields annotated with this enum value should not be printed
- * out when using debug formats, e.g. when the field contains sensitive
- * credentials.
- */
- debugRedact: boolean;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
}
export interface ServiceOptions {
- /** Any features defined in the specific edition. */
- features:
- | FeatureSet
- | undefined;
/**
* Is this service deprecated?
* Depending on the target platform, this can emit Deprecated annotations
@@ -1272,10 +1043,6 @@ export interface MethodOptions {
*/
deprecated: boolean;
idempotencyLevel: MethodOptions_IdempotencyLevel;
- /** Any features defined in the specific edition. */
- features:
- | FeatureSet
- | undefined;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
}
@@ -1360,294 +1127,6 @@ export interface UninterpretedOption_NamePart {
isExtension: boolean;
}
-/**
- * TODO Enums in C++ gencode (and potentially other languages) are
- * not well scoped. This means that each of the feature enums below can clash
- * with each other. The short names we've chosen maximize call-site
- * readability, but leave us very open to this scenario. A future feature will
- * be designed and implemented to handle this, hopefully before we ever hit a
- * conflict here.
- */
-export interface FeatureSet {
- fieldPresence: FeatureSet_FieldPresence;
- enumType: FeatureSet_EnumType;
- repeatedFieldEncoding: FeatureSet_RepeatedFieldEncoding;
- utf8Validation: FeatureSet_Utf8Validation;
- messageEncoding: FeatureSet_MessageEncoding;
- jsonFormat: FeatureSet_JsonFormat;
-}
-
-export enum FeatureSet_FieldPresence {
- FIELD_PRESENCE_UNKNOWN = 0,
- EXPLICIT = 1,
- IMPLICIT = 2,
- LEGACY_REQUIRED = 3,
- UNRECOGNIZED = -1,
-}
-
-export function featureSet_FieldPresenceFromJSON(object: any): FeatureSet_FieldPresence {
- switch (object) {
- case 0:
- case "FIELD_PRESENCE_UNKNOWN":
- return FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN;
- case 1:
- case "EXPLICIT":
- return FeatureSet_FieldPresence.EXPLICIT;
- case 2:
- case "IMPLICIT":
- return FeatureSet_FieldPresence.IMPLICIT;
- case 3:
- case "LEGACY_REQUIRED":
- return FeatureSet_FieldPresence.LEGACY_REQUIRED;
- case -1:
- case "UNRECOGNIZED":
- default:
- return FeatureSet_FieldPresence.UNRECOGNIZED;
- }
-}
-
-export function featureSet_FieldPresenceToJSON(object: FeatureSet_FieldPresence): string {
- switch (object) {
- case FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN:
- return "FIELD_PRESENCE_UNKNOWN";
- case FeatureSet_FieldPresence.EXPLICIT:
- return "EXPLICIT";
- case FeatureSet_FieldPresence.IMPLICIT:
- return "IMPLICIT";
- case FeatureSet_FieldPresence.LEGACY_REQUIRED:
- return "LEGACY_REQUIRED";
- case FeatureSet_FieldPresence.UNRECOGNIZED:
- default:
- return "UNRECOGNIZED";
- }
-}
-
-export enum FeatureSet_EnumType {
- ENUM_TYPE_UNKNOWN = 0,
- OPEN = 1,
- CLOSED = 2,
- UNRECOGNIZED = -1,
-}
-
-export function featureSet_EnumTypeFromJSON(object: any): FeatureSet_EnumType {
- switch (object) {
- case 0:
- case "ENUM_TYPE_UNKNOWN":
- return FeatureSet_EnumType.ENUM_TYPE_UNKNOWN;
- case 1:
- case "OPEN":
- return FeatureSet_EnumType.OPEN;
- case 2:
- case "CLOSED":
- return FeatureSet_EnumType.CLOSED;
- case -1:
- case "UNRECOGNIZED":
- default:
- return FeatureSet_EnumType.UNRECOGNIZED;
- }
-}
-
-export function featureSet_EnumTypeToJSON(object: FeatureSet_EnumType): string {
- switch (object) {
- case FeatureSet_EnumType.ENUM_TYPE_UNKNOWN:
- return "ENUM_TYPE_UNKNOWN";
- case FeatureSet_EnumType.OPEN:
- return "OPEN";
- case FeatureSet_EnumType.CLOSED:
- return "CLOSED";
- case FeatureSet_EnumType.UNRECOGNIZED:
- default:
- return "UNRECOGNIZED";
- }
-}
-
-export enum FeatureSet_RepeatedFieldEncoding {
- REPEATED_FIELD_ENCODING_UNKNOWN = 0,
- PACKED = 1,
- EXPANDED = 2,
- UNRECOGNIZED = -1,
-}
-
-export function featureSet_RepeatedFieldEncodingFromJSON(object: any): FeatureSet_RepeatedFieldEncoding {
- switch (object) {
- case 0:
- case "REPEATED_FIELD_ENCODING_UNKNOWN":
- return FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN;
- case 1:
- case "PACKED":
- return FeatureSet_RepeatedFieldEncoding.PACKED;
- case 2:
- case "EXPANDED":
- return FeatureSet_RepeatedFieldEncoding.EXPANDED;
- case -1:
- case "UNRECOGNIZED":
- default:
- return FeatureSet_RepeatedFieldEncoding.UNRECOGNIZED;
- }
-}
-
-export function featureSet_RepeatedFieldEncodingToJSON(object: FeatureSet_RepeatedFieldEncoding): string {
- switch (object) {
- case FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN:
- return "REPEATED_FIELD_ENCODING_UNKNOWN";
- case FeatureSet_RepeatedFieldEncoding.PACKED:
- return "PACKED";
- case FeatureSet_RepeatedFieldEncoding.EXPANDED:
- return "EXPANDED";
- case FeatureSet_RepeatedFieldEncoding.UNRECOGNIZED:
- default:
- return "UNRECOGNIZED";
- }
-}
-
-export enum FeatureSet_Utf8Validation {
- UTF8_VALIDATION_UNKNOWN = 0,
- NONE = 1,
- VERIFY = 2,
- UNRECOGNIZED = -1,
-}
-
-export function featureSet_Utf8ValidationFromJSON(object: any): FeatureSet_Utf8Validation {
- switch (object) {
- case 0:
- case "UTF8_VALIDATION_UNKNOWN":
- return FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN;
- case 1:
- case "NONE":
- return FeatureSet_Utf8Validation.NONE;
- case 2:
- case "VERIFY":
- return FeatureSet_Utf8Validation.VERIFY;
- case -1:
- case "UNRECOGNIZED":
- default:
- return FeatureSet_Utf8Validation.UNRECOGNIZED;
- }
-}
-
-export function featureSet_Utf8ValidationToJSON(object: FeatureSet_Utf8Validation): string {
- switch (object) {
- case FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN:
- return "UTF8_VALIDATION_UNKNOWN";
- case FeatureSet_Utf8Validation.NONE:
- return "NONE";
- case FeatureSet_Utf8Validation.VERIFY:
- return "VERIFY";
- case FeatureSet_Utf8Validation.UNRECOGNIZED:
- default:
- return "UNRECOGNIZED";
- }
-}
-
-export enum FeatureSet_MessageEncoding {
- MESSAGE_ENCODING_UNKNOWN = 0,
- LENGTH_PREFIXED = 1,
- DELIMITED = 2,
- UNRECOGNIZED = -1,
-}
-
-export function featureSet_MessageEncodingFromJSON(object: any): FeatureSet_MessageEncoding {
- switch (object) {
- case 0:
- case "MESSAGE_ENCODING_UNKNOWN":
- return FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN;
- case 1:
- case "LENGTH_PREFIXED":
- return FeatureSet_MessageEncoding.LENGTH_PREFIXED;
- case 2:
- case "DELIMITED":
- return FeatureSet_MessageEncoding.DELIMITED;
- case -1:
- case "UNRECOGNIZED":
- default:
- return FeatureSet_MessageEncoding.UNRECOGNIZED;
- }
-}
-
-export function featureSet_MessageEncodingToJSON(object: FeatureSet_MessageEncoding): string {
- switch (object) {
- case FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN:
- return "MESSAGE_ENCODING_UNKNOWN";
- case FeatureSet_MessageEncoding.LENGTH_PREFIXED:
- return "LENGTH_PREFIXED";
- case FeatureSet_MessageEncoding.DELIMITED:
- return "DELIMITED";
- case FeatureSet_MessageEncoding.UNRECOGNIZED:
- default:
- return "UNRECOGNIZED";
- }
-}
-
-export enum FeatureSet_JsonFormat {
- JSON_FORMAT_UNKNOWN = 0,
- ALLOW = 1,
- LEGACY_BEST_EFFORT = 2,
- UNRECOGNIZED = -1,
-}
-
-export function featureSet_JsonFormatFromJSON(object: any): FeatureSet_JsonFormat {
- switch (object) {
- case 0:
- case "JSON_FORMAT_UNKNOWN":
- return FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN;
- case 1:
- case "ALLOW":
- return FeatureSet_JsonFormat.ALLOW;
- case 2:
- case "LEGACY_BEST_EFFORT":
- return FeatureSet_JsonFormat.LEGACY_BEST_EFFORT;
- case -1:
- case "UNRECOGNIZED":
- default:
- return FeatureSet_JsonFormat.UNRECOGNIZED;
- }
-}
-
-export function featureSet_JsonFormatToJSON(object: FeatureSet_JsonFormat): string {
- switch (object) {
- case FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN:
- return "JSON_FORMAT_UNKNOWN";
- case FeatureSet_JsonFormat.ALLOW:
- return "ALLOW";
- case FeatureSet_JsonFormat.LEGACY_BEST_EFFORT:
- return "LEGACY_BEST_EFFORT";
- case FeatureSet_JsonFormat.UNRECOGNIZED:
- default:
- return "UNRECOGNIZED";
- }
-}
-
-/**
- * A compiled specification for the defaults of a set of features. These
- * messages are generated from FeatureSet extensions and can be used to seed
- * feature resolution. The resolution with this object becomes a simple search
- * for the closest matching edition, followed by proto merges.
- */
-export interface FeatureSetDefaults {
- defaults: FeatureSetDefaults_FeatureSetEditionDefault[];
- /**
- * The minimum supported edition (inclusive) when this was constructed.
- * Editions before this will not have defaults.
- */
- minimumEdition: Edition;
- /**
- * The maximum known edition (inclusive) when this was constructed. Editions
- * after this will not have reliable defaults.
- */
- maximumEdition: Edition;
-}
-
-/**
- * A map from every known edition with a unique set of defaults to its
- * defaults. Not all editions may be contained here. For a given edition,
- * the defaults at the closest matching edition ordered at or before it should
- * be used. This field must be in strict ascending order by edition.
- */
-export interface FeatureSetDefaults_FeatureSetEditionDefault {
- edition: Edition;
- features: FeatureSet | undefined;
-}
-
/**
* Encapsulates information about the original source file from which a
* FileDescriptorProto was generated.
@@ -1944,7 +1423,7 @@ function createBaseFileDescriptorProto(): FileDescriptorProto {
options: undefined,
sourceCodeInfo: undefined,
syntax: "",
- edition: 0,
+ edition: "",
};
}
@@ -1990,8 +1469,8 @@ export const FileDescriptorProto = {
if (message.syntax !== "") {
writer.uint32(98).string(message.syntax);
}
- if (message.edition !== 0) {
- writer.uint32(112).int32(message.edition);
+ if (message.edition !== "") {
+ writer.uint32(106).string(message.edition);
}
return writer;
},
@@ -2107,12 +1586,12 @@ export const FileDescriptorProto = {
message.syntax = reader.string();
continue;
- case 14:
- if (tag !== 112) {
+ case 13:
+ if (tag !== 106) {
break;
}
- message.edition = reader.int32() as any;
+ message.edition = reader.string();
continue;
}
if ((tag & 7) === 4 || tag === 0) {
@@ -2151,7 +1630,7 @@ export const FileDescriptorProto = {
options: isSet(object.options) ? FileOptions.fromJSON(object.options) : undefined,
sourceCodeInfo: isSet(object.sourceCodeInfo) ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) : undefined,
syntax: isSet(object.syntax) ? globalThis.String(object.syntax) : "",
- edition: isSet(object.edition) ? editionFromJSON(object.edition) : 0,
+ edition: isSet(object.edition) ? globalThis.String(object.edition) : "",
};
},
@@ -2193,8 +1672,8 @@ export const FileDescriptorProto = {
if (message.syntax !== "") {
obj.syntax = message.syntax;
}
- if (message.edition !== 0) {
- obj.edition = editionToJSON(message.edition);
+ if (message.edition !== "") {
+ obj.edition = message.edition;
}
return obj;
},
@@ -2220,7 +1699,7 @@ export const FileDescriptorProto = {
? SourceCodeInfo.fromPartial(object.sourceCodeInfo)
: undefined;
message.syntax = object.syntax ?? "";
- message.edition = object.edition ?? 0;
+ message.edition = object.edition ?? "";
return message;
},
};
@@ -2614,7 +2093,7 @@ export const DescriptorProto_ReservedRange = {
};
function createBaseExtensionRangeOptions(): ExtensionRangeOptions {
- return { uninterpretedOption: [], declaration: [], features: undefined, verification: 0 };
+ return { uninterpretedOption: [] };
}
export const ExtensionRangeOptions = {
@@ -2622,15 +2101,6 @@ export const ExtensionRangeOptions = {
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
- for (const v of message.declaration) {
- ExtensionRangeOptions_Declaration.encode(v!, writer.uint32(18).fork()).ldelim();
- }
- if (message.features !== undefined) {
- FeatureSet.encode(message.features, writer.uint32(402).fork()).ldelim();
- }
- if (message.verification !== 0) {
- writer.uint32(24).int32(message.verification);
- }
return writer;
},
@@ -2648,27 +2118,6 @@ export const ExtensionRangeOptions = {
message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
continue;
- case 2:
- if (tag !== 18) {
- break;
- }
-
- message.declaration.push(ExtensionRangeOptions_Declaration.decode(reader, reader.uint32()));
- continue;
- case 50:
- if (tag !== 402) {
- break;
- }
-
- message.features = FeatureSet.decode(reader, reader.uint32());
- continue;
- case 3:
- if (tag !== 24) {
- break;
- }
-
- message.verification = reader.int32() as any;
- continue;
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -2683,13 +2132,6 @@ export const ExtensionRangeOptions = {
uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
- declaration: globalThis.Array.isArray(object?.declaration)
- ? object.declaration.map((e: any) => ExtensionRangeOptions_Declaration.fromJSON(e))
- : [],
- features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
- verification: isSet(object.verification)
- ? extensionRangeOptions_VerificationStateFromJSON(object.verification)
- : 0,
};
},
@@ -2698,15 +2140,6 @@ export const ExtensionRangeOptions = {
if (message.uninterpretedOption?.length) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
- if (message.declaration?.length) {
- obj.declaration = message.declaration.map((e) => ExtensionRangeOptions_Declaration.toJSON(e));
- }
- if (message.features !== undefined) {
- obj.features = FeatureSet.toJSON(message.features);
- }
- if (message.verification !== 0) {
- obj.verification = extensionRangeOptions_VerificationStateToJSON(message.verification);
- }
return obj;
},
@@ -2716,130 +2149,6 @@ export const ExtensionRangeOptions = {
fromPartial(object: DeepPartial<ExtensionRangeOptions>): ExtensionRangeOptions {
const message = createBaseExtensionRangeOptions();
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
- message.declaration = object.declaration?.map((e) => ExtensionRangeOptions_Declaration.fromPartial(e)) || [];
- message.features = (object.features !== undefined && object.features !== null)
- ? FeatureSet.fromPartial(object.features)
- : undefined;
- message.verification = object.verification ?? 0;
- return message;
- },
-};
-
-function createBaseExtensionRangeOptions_Declaration(): ExtensionRangeOptions_Declaration {
- return { number: 0, fullName: "", type: "", reserved: false, repeated: false };
-}
-
-export const ExtensionRangeOptions_Declaration = {
- encode(message: ExtensionRangeOptions_Declaration, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- if (message.number !== 0) {
- writer.uint32(8).int32(message.number);
- }
- if (message.fullName !== "") {
- writer.uint32(18).string(message.fullName);
- }
- if (message.type !== "") {
- writer.uint32(26).string(message.type);
- }
- if (message.reserved === true) {
- writer.uint32(40).bool(message.reserved);
- }
- if (message.repeated === true) {
- writer.uint32(48).bool(message.repeated);
- }
- return writer;
- },
-
- decode(input: _m0.Reader | Uint8Array, length?: number): ExtensionRangeOptions_Declaration {
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseExtensionRangeOptions_Declaration();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- if (tag !== 8) {
- break;
- }
-
- message.number = reader.int32();
- continue;
- case 2:
- if (tag !== 18) {
- break;
- }
-
- message.fullName = reader.string();
- continue;
- case 3:
- if (tag !== 26) {
- break;
- }
-
- message.type = reader.string();
- continue;
- case 5:
- if (tag !== 40) {
- break;
- }
-
- message.reserved = reader.bool();
- continue;
- case 6:
- if (tag !== 48) {
- break;
- }
-
- message.repeated = reader.bool();
- continue;
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skipType(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): ExtensionRangeOptions_Declaration {
- return {
- number: isSet(object.number) ? globalThis.Number(object.number) : 0,
- fullName: isSet(object.fullName) ? globalThis.String(object.fullName) : "",
- type: isSet(object.type) ? globalThis.String(object.type) : "",
- reserved: isSet(object.reserved) ? globalThis.Boolean(object.reserved) : false,
- repeated: isSet(object.repeated) ? globalThis.Boolean(object.repeated) : false,
- };
- },
-
- toJSON(message: ExtensionRangeOptions_Declaration): unknown {
- const obj: any = {};
- if (message.number !== 0) {
- obj.number = Math.round(message.number);
- }
- if (message.fullName !== "") {
- obj.fullName = message.fullName;
- }
- if (message.type !== "") {
- obj.type = message.type;
- }
- if (message.reserved === true) {
- obj.reserved = message.reserved;
- }
- if (message.repeated === true) {
- obj.repeated = message.repeated;
- }
- return obj;
- },
-
- create(base?: DeepPartial<ExtensionRangeOptions_Declaration>): ExtensionRangeOptions_Declaration {
- return ExtensionRangeOptions_Declaration.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<ExtensionRangeOptions_Declaration>): ExtensionRangeOptions_Declaration {
- const message = createBaseExtensionRangeOptions_Declaration();
- message.number = object.number ?? 0;
- message.fullName = object.fullName ?? "";
- message.type = object.type ?? "";
- message.reserved = object.reserved ?? false;
- message.repeated = object.repeated ?? false;
return message;
},
};
@@ -3694,7 +3003,6 @@ function createBaseFileOptions(): FileOptions {
phpNamespace: "",
phpMetadataNamespace: "",
rubyPackage: "",
- features: undefined,
uninterpretedOption: [],
};
}
@@ -3761,9 +3069,6 @@ export const FileOptions = {
if (message.rubyPackage !== "") {
writer.uint32(362).string(message.rubyPackage);
}
- if (message.features !== undefined) {
- FeatureSet.encode(message.features, writer.uint32(402).fork()).ldelim();
- }
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
@@ -3917,13 +3222,6 @@ export const FileOptions = {
message.rubyPackage = reader.string();
continue;
- case 50:
- if (tag !== 402) {
- break;
- }
-
- message.features = FeatureSet.decode(reader, reader.uint32());
- continue;
case 999:
if (tag !== 7994) {
break;
@@ -3964,7 +3262,6 @@ export const FileOptions = {
phpNamespace: isSet(object.phpNamespace) ? globalThis.String(object.phpNamespace) : "",
phpMetadataNamespace: isSet(object.phpMetadataNamespace) ? globalThis.String(object.phpMetadataNamespace) : "",
rubyPackage: isSet(object.rubyPackage) ? globalThis.String(object.rubyPackage) : "",
- features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -4033,9 +3330,6 @@ export const FileOptions = {
if (message.rubyPackage !== "") {
obj.rubyPackage = message.rubyPackage;
}
- if (message.features !== undefined) {
- obj.features = FeatureSet.toJSON(message.features);
- }
if (message.uninterpretedOption?.length) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
@@ -4067,9 +3361,6 @@ export const FileOptions = {
message.phpNamespace = object.phpNamespace ?? "";
message.phpMetadataNamespace = object.phpMetadataNamespace ?? "";
message.rubyPackage = object.rubyPackage ?? "";
- message.features = (object.features !== undefined && object.features !== null)
- ? FeatureSet.fromPartial(object.features)
- : undefined;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
@@ -4082,7 +3373,6 @@ function createBaseMessageOptions(): MessageOptions {
deprecated: false,
mapEntry: false,
deprecatedLegacyJsonFieldConflicts: false,
- features: undefined,
uninterpretedOption: [],
};
}
@@ -4104,9 +3394,6 @@ export const MessageOptions = {
if (message.deprecatedLegacyJsonFieldConflicts === true) {
writer.uint32(88).bool(message.deprecatedLegacyJsonFieldConflicts);
}
- if (message.features !== undefined) {
- FeatureSet.encode(message.features, writer.uint32(98).fork()).ldelim();
- }
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
@@ -4155,13 +3442,6 @@ export const MessageOptions = {
message.deprecatedLegacyJsonFieldConflicts = reader.bool();
continue;
- case 12:
- if (tag !== 98) {
- break;
- }
-
- message.features = FeatureSet.decode(reader, reader.uint32());
- continue;
case 999:
if (tag !== 7994) {
break;
@@ -4191,7 +3471,6 @@ export const MessageOptions = {
deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)
? globalThis.Boolean(object.deprecatedLegacyJsonFieldConflicts)
: false,
- features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -4215,9 +3494,6 @@ export const MessageOptions = {
if (message.deprecatedLegacyJsonFieldConflicts === true) {
obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts;
}
- if (message.features !== undefined) {
- obj.features = FeatureSet.toJSON(message.features);
- }
if (message.uninterpretedOption?.length) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
@@ -4234,9 +3510,6 @@ export const MessageOptions = {
message.deprecated = object.deprecated ?? false;
message.mapEntry = object.mapEntry ?? false;
message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false;
- message.features = (object.features !== undefined && object.features !== null)
- ? FeatureSet.fromPartial(object.features)
- : undefined;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
@@ -4253,9 +3526,7 @@ function createBaseFieldOptions(): FieldOptions {
weak: false,
debugRedact: false,
retention: 0,
- targets: [],
- editionDefaults: [],
- features: undefined,
+ target: 0,
uninterpretedOption: [],
};
}
@@ -4289,16 +3560,8 @@ export const FieldOptions = {
if (message.retention !== 0) {
writer.uint32(136).int32(message.retention);
}
- writer.uint32(154).fork();
- for (const v of message.targets) {
- writer.int32(v);
- }
- writer.ldelim();
- for (const v of message.editionDefaults) {
- FieldOptions_EditionDefault.encode(v!, writer.uint32(162).fork()).ldelim();
- }
- if (message.features !== undefined) {
- FeatureSet.encode(message.features, writer.uint32(170).fork()).ldelim();
+ if (message.target !== 0) {
+ writer.uint32(144).int32(message.target);
}
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
@@ -4376,36 +3639,12 @@ export const FieldOptions = {
message.retention = reader.int32() as any;
continue;
- case 19:
- if (tag === 152) {
- message.targets.push(reader.int32() as any);
-
- continue;
- }
-
- if (tag === 154) {
- const end2 = reader.uint32() + reader.pos;
- while (reader.pos < end2) {
- message.targets.push(reader.int32() as any);
- }
-
- continue;
- }
-
- break;
- case 20:
- if (tag !== 162) {
- break;
- }
-
- message.editionDefaults.push(FieldOptions_EditionDefault.decode(reader, reader.uint32()));
- continue;
- case 21:
- if (tag !== 170) {
+ case 18:
+ if (tag !== 144) {
break;
}
- message.features = FeatureSet.decode(reader, reader.uint32());
+ message.target = reader.int32() as any;
continue;
case 999:
if (tag !== 7994) {
@@ -4434,13 +3673,7 @@ export const FieldOptions = {
weak: isSet(object.weak) ? globalThis.Boolean(object.weak) : false,
debugRedact: isSet(object.debugRedact) ? globalThis.Boolean(object.debugRedact) : false,
retention: isSet(object.retention) ? fieldOptions_OptionRetentionFromJSON(object.retention) : 0,
- targets: globalThis.Array.isArray(object?.targets)
- ? object.targets.map((e: any) => fieldOptions_OptionTargetTypeFromJSON(e))
- : [],
- editionDefaults: globalThis.Array.isArray(object?.editionDefaults)
- ? object.editionDefaults.map((e: any) => FieldOptions_EditionDefault.fromJSON(e))
- : [],
- features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
+ target: isSet(object.target) ? fieldOptions_OptionTargetTypeFromJSON(object.target) : 0,
uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -4476,14 +3709,8 @@ export const FieldOptions = {
if (message.retention !== 0) {
obj.retention = fieldOptions_OptionRetentionToJSON(message.retention);
}
- if (message.targets?.length) {
- obj.targets = message.targets.map((e) => fieldOptions_OptionTargetTypeToJSON(e));
- }
- if (message.editionDefaults?.length) {
- obj.editionDefaults = message.editionDefaults.map((e) => FieldOptions_EditionDefault.toJSON(e));
- }
- if (message.features !== undefined) {
- obj.features = FeatureSet.toJSON(message.features);
+ if (message.target !== 0) {
+ obj.target = fieldOptions_OptionTargetTypeToJSON(message.target);
}
if (message.uninterpretedOption?.length) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
@@ -4505,99 +3732,18 @@ export const FieldOptions = {
message.weak = object.weak ?? false;
message.debugRedact = object.debugRedact ?? false;
message.retention = object.retention ?? 0;
- message.targets = object.targets?.map((e) => e) || [];
- message.editionDefaults = object.editionDefaults?.map((e) => FieldOptions_EditionDefault.fromPartial(e)) || [];
- message.features = (object.features !== undefined && object.features !== null)
- ? FeatureSet.fromPartial(object.features)
- : undefined;
+ message.target = object.target ?? 0;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
};
-function createBaseFieldOptions_EditionDefault(): FieldOptions_EditionDefault {
- return { edition: 0, value: "" };
-}
-
-export const FieldOptions_EditionDefault = {
- encode(message: FieldOptions_EditionDefault, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- if (message.edition !== 0) {
- writer.uint32(24).int32(message.edition);
- }
- if (message.value !== "") {
- writer.uint32(18).string(message.value);
- }
- return writer;
- },
-
- decode(input: _m0.Reader | Uint8Array, length?: number): FieldOptions_EditionDefault {
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseFieldOptions_EditionDefault();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 3:
- if (tag !== 24) {
- break;
- }
-
- message.edition = reader.int32() as any;
- continue;
- case 2:
- if (tag !== 18) {
- break;
- }
-
- message.value = reader.string();
- continue;
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skipType(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): FieldOptions_EditionDefault {
- return {
- edition: isSet(object.edition) ? editionFromJSON(object.edition) : 0,
- value: isSet(object.value) ? globalThis.String(object.value) : "",
- };
- },
-
- toJSON(message: FieldOptions_EditionDefault): unknown {
- const obj: any = {};
- if (message.edition !== 0) {
- obj.edition = editionToJSON(message.edition);
- }
- if (message.value !== "") {
- obj.value = message.value;
- }
- return obj;
- },
-
- create(base?: DeepPartial<FieldOptions_EditionDefault>): FieldOptions_EditionDefault {
- return FieldOptions_EditionDefault.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<FieldOptions_EditionDefault>): FieldOptions_EditionDefault {
- const message = createBaseFieldOptions_EditionDefault();
- message.edition = object.edition ?? 0;
- message.value = object.value ?? "";
- return message;
- },
-};
-
function createBaseOneofOptions(): OneofOptions {
- return { features: undefined, uninterpretedOption: [] };
+ return { uninterpretedOption: [] };
}
export const OneofOptions = {
encode(message: OneofOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- if (message.features !== undefined) {
- FeatureSet.encode(message.features, writer.uint32(10).fork()).ldelim();
- }
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
@@ -4611,13 +3757,6 @@ export const OneofOptions = {
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
- case 1:
- if (tag !== 10) {
- break;
- }
-
- message.features = FeatureSet.decode(reader, reader.uint32());
- continue;
case 999:
if (tag !== 7994) {
break;
@@ -4636,7 +3775,6 @@ export const OneofOptions = {
fromJSON(object: any): OneofOptions {
return {
- features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -4645,9 +3783,6 @@ export const OneofOptions = {
toJSON(message: OneofOptions): unknown {
const obj: any = {};
- if (message.features !== undefined) {
- obj.features = FeatureSet.toJSON(message.features);
- }
if (message.uninterpretedOption?.length) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
@@ -4659,22 +3794,13 @@ export const OneofOptions = {
},
fromPartial(object: DeepPartial<OneofOptions>): OneofOptions {
const message = createBaseOneofOptions();
- message.features = (object.features !== undefined && object.features !== null)
- ? FeatureSet.fromPartial(object.features)
- : undefined;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
};
function createBaseEnumOptions(): EnumOptions {
- return {
- allowAlias: false,
- deprecated: false,
- deprecatedLegacyJsonFieldConflicts: false,
- features: undefined,
- uninterpretedOption: [],
- };
+ return { allowAlias: false, deprecated: false, deprecatedLegacyJsonFieldConflicts: false, uninterpretedOption: [] };
}
export const EnumOptions = {
@@ -4688,9 +3814,6 @@ export const EnumOptions = {
if (message.deprecatedLegacyJsonFieldConflicts === true) {
writer.uint32(48).bool(message.deprecatedLegacyJsonFieldConflicts);
}
- if (message.features !== undefined) {
- FeatureSet.encode(message.features, writer.uint32(58).fork()).ldelim();
- }
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
@@ -4725,13 +3848,6 @@ export const EnumOptions = {
message.deprecatedLegacyJsonFieldConflicts = reader.bool();
continue;
- case 7:
- if (tag !== 58) {
- break;
- }
-
- message.features = FeatureSet.decode(reader, reader.uint32());
- continue;
case 999:
if (tag !== 7994) {
break;
@@ -4755,7 +3871,6 @@ export const EnumOptions = {
deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)
? globalThis.Boolean(object.deprecatedLegacyJsonFieldConflicts)
: false,
- features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -4773,9 +3888,6 @@ export const EnumOptions = {
if (message.deprecatedLegacyJsonFieldConflicts === true) {
obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts;
}
- if (message.features !== undefined) {
- obj.features = FeatureSet.toJSON(message.features);
- }
if (message.uninterpretedOption?.length) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
@@ -4790,16 +3902,13 @@ export const EnumOptions = {
message.allowAlias = object.allowAlias ?? false;
message.deprecated = object.deprecated ?? false;
message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false;
- message.features = (object.features !== undefined && object.features !== null)
- ? FeatureSet.fromPartial(object.features)
- : undefined;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
};
function createBaseEnumValueOptions(): EnumValueOptions {
- return { deprecated: false, features: undefined, debugRedact: false, uninterpretedOption: [] };
+ return { deprecated: false, uninterpretedOption: [] };
}
export const EnumValueOptions = {
@@ -4807,12 +3916,6 @@ export const EnumValueOptions = {
if (message.deprecated === true) {
writer.uint32(8).bool(message.deprecated);
}
- if (message.features !== undefined) {
- FeatureSet.encode(message.features, writer.uint32(18).fork()).ldelim();
- }
- if (message.debugRedact === true) {
- writer.uint32(24).bool(message.debugRedact);
- }
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
@@ -4833,20 +3936,6 @@ export const EnumValueOptions = {
message.deprecated = reader.bool();
continue;
- case 2:
- if (tag !== 18) {
- break;
- }
-
- message.features = FeatureSet.decode(reader, reader.uint32());
- continue;
- case 3:
- if (tag !== 24) {
- break;
- }
-
- message.debugRedact = reader.bool();
- continue;
case 999:
if (tag !== 7994) {
break;
@@ -4866,8 +3955,6 @@ export const EnumValueOptions = {
fromJSON(object: any): EnumValueOptions {
return {
deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
- features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
- debugRedact: isSet(object.debugRedact) ? globalThis.Boolean(object.debugRedact) : false,
uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -4879,12 +3966,6 @@ export const EnumValueOptions = {
if (message.deprecated === true) {
obj.deprecated = message.deprecated;
}
- if (message.features !== undefined) {
- obj.features = FeatureSet.toJSON(message.features);
- }
- if (message.debugRedact === true) {
- obj.debugRedact = message.debugRedact;
- }
if (message.uninterpretedOption?.length) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
@@ -4897,24 +3978,17 @@ export const EnumValueOptions = {
fromPartial(object: DeepPartial<EnumValueOptions>): EnumValueOptions {
const message = createBaseEnumValueOptions();
message.deprecated = object.deprecated ?? false;
- message.features = (object.features !== undefined && object.features !== null)
- ? FeatureSet.fromPartial(object.features)
- : undefined;
- message.debugRedact = object.debugRedact ?? false;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
};
function createBaseServiceOptions(): ServiceOptions {
- return { features: undefined, deprecated: false, uninterpretedOption: [] };
+ return { deprecated: false, uninterpretedOption: [] };
}
export const ServiceOptions = {
encode(message: ServiceOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- if (message.features !== undefined) {
- FeatureSet.encode(message.features, writer.uint32(274).fork()).ldelim();
- }
if (message.deprecated === true) {
writer.uint32(264).bool(message.deprecated);
}
@@ -4931,13 +4005,6 @@ export const ServiceOptions = {
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
- case 34:
- if (tag !== 274) {
- break;
- }
-
- message.features = FeatureSet.decode(reader, reader.uint32());
- continue;
case 33:
if (tag !== 264) {
break;
@@ -4963,7 +4030,6 @@ export const ServiceOptions = {
fromJSON(object: any): ServiceOptions {
return {
- features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
@@ -4973,9 +4039,6 @@ export const ServiceOptions = {
toJSON(message: ServiceOptions): unknown {
const obj: any = {};
- if (message.features !== undefined) {
- obj.features = FeatureSet.toJSON(message.features);
- }
if (message.deprecated === true) {
obj.deprecated = message.deprecated;
}
@@ -4990,9 +4053,6 @@ export const ServiceOptions = {
},
fromPartial(object: DeepPartial<ServiceOptions>): ServiceOptions {
const message = createBaseServiceOptions();
- message.features = (object.features !== undefined && object.features !== null)
- ? FeatureSet.fromPartial(object.features)
- : undefined;
message.deprecated = object.deprecated ?? false;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
@@ -5000,7 +4060,7 @@ export const ServiceOptions = {
};
function createBaseMethodOptions(): MethodOptions {
- return { deprecated: false, idempotencyLevel: 0, features: undefined, uninterpretedOption: [] };
+ return { deprecated: false, idempotencyLevel: 0, uninterpretedOption: [] };
}
export const MethodOptions = {
@@ -5011,9 +4071,6 @@ export const MethodOptions = {
if (message.idempotencyLevel !== 0) {
writer.uint32(272).int32(message.idempotencyLevel);
}
- if (message.features !== undefined) {
- FeatureSet.encode(message.features, writer.uint32(282).fork()).ldelim();
- }
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
@@ -5041,13 +4098,6 @@ export const MethodOptions = {
message.idempotencyLevel = reader.int32() as any;
continue;
- case 35:
- if (tag !== 282) {
- break;
- }
-
- message.features = FeatureSet.decode(reader, reader.uint32());
- continue;
case 999:
if (tag !== 7994) {
break;
@@ -5070,7 +4120,6 @@ export const MethodOptions = {
idempotencyLevel: isSet(object.idempotencyLevel)
? methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel)
: 0,
- features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -5085,9 +4134,6 @@ export const MethodOptions = {
if (message.idempotencyLevel !== 0) {
obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel);
}
- if (message.features !== undefined) {
- obj.features = FeatureSet.toJSON(message.features);
- }
if (message.uninterpretedOption?.length) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
@@ -5101,9 +4147,6 @@ export const MethodOptions = {
const message = createBaseMethodOptions();
message.deprecated = object.deprecated ?? false;
message.idempotencyLevel = object.idempotencyLevel ?? 0;
- message.features = (object.features !== undefined && object.features !== null)
- ? FeatureSet.fromPartial(object.features)
- : undefined;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
@@ -5346,318 +4389,6 @@ export const UninterpretedOption_NamePart = {
},
};
-function createBaseFeatureSet(): FeatureSet {
- return {
- fieldPresence: 0,
- enumType: 0,
- repeatedFieldEncoding: 0,
- utf8Validation: 0,
- messageEncoding: 0,
- jsonFormat: 0,
- };
-}
-
-export const FeatureSet = {
- encode(message: FeatureSet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- if (message.fieldPresence !== 0) {
- writer.uint32(8).int32(message.fieldPresence);
- }
- if (message.enumType !== 0) {
- writer.uint32(16).int32(message.enumType);
- }
- if (message.repeatedFieldEncoding !== 0) {
- writer.uint32(24).int32(message.repeatedFieldEncoding);
- }
- if (message.utf8Validation !== 0) {
- writer.uint32(32).int32(message.utf8Validation);
- }
- if (message.messageEncoding !== 0) {
- writer.uint32(40).int32(message.messageEncoding);
- }
- if (message.jsonFormat !== 0) {
- writer.uint32(48).int32(message.jsonFormat);
- }
- return writer;
- },
-
- decode(input: _m0.Reader | Uint8Array, length?: number): FeatureSet {
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseFeatureSet();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- if (tag !== 8) {
- break;
- }
-
- message.fieldPresence = reader.int32() as any;
- continue;
- case 2:
- if (tag !== 16) {
- break;
- }
-
- message.enumType = reader.int32() as any;
- continue;
- case 3:
- if (tag !== 24) {
- break;
- }
-
- message.repeatedFieldEncoding = reader.int32() as any;
- continue;
- case 4:
- if (tag !== 32) {
- break;
- }
-
- message.utf8Validation = reader.int32() as any;
- continue;
- case 5:
- if (tag !== 40) {
- break;
- }
-
- message.messageEncoding = reader.int32() as any;
- continue;
- case 6:
- if (tag !== 48) {
- break;
- }
-
- message.jsonFormat = reader.int32() as any;
- continue;
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skipType(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): FeatureSet {
- return {
- fieldPresence: isSet(object.fieldPresence) ? featureSet_FieldPresenceFromJSON(object.fieldPresence) : 0,
- enumType: isSet(object.enumType) ? featureSet_EnumTypeFromJSON(object.enumType) : 0,
- repeatedFieldEncoding: isSet(object.repeatedFieldEncoding)
- ? featureSet_RepeatedFieldEncodingFromJSON(object.repeatedFieldEncoding)
- : 0,
- utf8Validation: isSet(object.utf8Validation) ? featureSet_Utf8ValidationFromJSON(object.utf8Validation) : 0,
- messageEncoding: isSet(object.messageEncoding) ? featureSet_MessageEncodingFromJSON(object.messageEncoding) : 0,
- jsonFormat: isSet(object.jsonFormat) ? featureSet_JsonFormatFromJSON(object.jsonFormat) : 0,
- };
- },
-
- toJSON(message: FeatureSet): unknown {
- const obj: any = {};
- if (message.fieldPresence !== 0) {
- obj.fieldPresence = featureSet_FieldPresenceToJSON(message.fieldPresence);
- }
- if (message.enumType !== 0) {
- obj.enumType = featureSet_EnumTypeToJSON(message.enumType);
- }
- if (message.repeatedFieldEncoding !== 0) {
- obj.repeatedFieldEncoding = featureSet_RepeatedFieldEncodingToJSON(message.repeatedFieldEncoding);
- }
- if (message.utf8Validation !== 0) {
- obj.utf8Validation = featureSet_Utf8ValidationToJSON(message.utf8Validation);
- }
- if (message.messageEncoding !== 0) {
- obj.messageEncoding = featureSet_MessageEncodingToJSON(message.messageEncoding);
- }
- if (message.jsonFormat !== 0) {
- obj.jsonFormat = featureSet_JsonFormatToJSON(message.jsonFormat);
- }
- return obj;
- },
-
- create(base?: DeepPartial<FeatureSet>): FeatureSet {
- return FeatureSet.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<FeatureSet>): FeatureSet {
- const message = createBaseFeatureSet();
- message.fieldPresence = object.fieldPresence ?? 0;
- message.enumType = object.enumType ?? 0;
- message.repeatedFieldEncoding = object.repeatedFieldEncoding ?? 0;
- message.utf8Validation = object.utf8Validation ?? 0;
- message.messageEncoding = object.messageEncoding ?? 0;
- message.jsonFormat = object.jsonFormat ?? 0;
- return message;
- },
-};
-
-function createBaseFeatureSetDefaults(): FeatureSetDefaults {
- return { defaults: [], minimumEdition: 0, maximumEdition: 0 };
-}
-
-export const FeatureSetDefaults = {
- encode(message: FeatureSetDefaults, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- for (const v of message.defaults) {
- FeatureSetDefaults_FeatureSetEditionDefault.encode(v!, writer.uint32(10).fork()).ldelim();
- }
- if (message.minimumEdition !== 0) {
- writer.uint32(32).int32(message.minimumEdition);
- }
- if (message.maximumEdition !== 0) {
- writer.uint32(40).int32(message.maximumEdition);
- }
- return writer;
- },
-
- decode(input: _m0.Reader | Uint8Array, length?: number): FeatureSetDefaults {
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseFeatureSetDefaults();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- if (tag !== 10) {
- break;
- }
-
- message.defaults.push(FeatureSetDefaults_FeatureSetEditionDefault.decode(reader, reader.uint32()));
- continue;
- case 4:
- if (tag !== 32) {
- break;
- }
-
- message.minimumEdition = reader.int32() as any;
- continue;
- case 5:
- if (tag !== 40) {
- break;
- }
-
- message.maximumEdition = reader.int32() as any;
- continue;
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skipType(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): FeatureSetDefaults {
- return {
- defaults: globalThis.Array.isArray(object?.defaults)
- ? object.defaults.map((e: any) => FeatureSetDefaults_FeatureSetEditionDefault.fromJSON(e))
- : [],
- minimumEdition: isSet(object.minimumEdition) ? editionFromJSON(object.minimumEdition) : 0,
- maximumEdition: isSet(object.maximumEdition) ? editionFromJSON(object.maximumEdition) : 0,
- };
- },
-
- toJSON(message: FeatureSetDefaults): unknown {
- const obj: any = {};
- if (message.defaults?.length) {
- obj.defaults = message.defaults.map((e) => FeatureSetDefaults_FeatureSetEditionDefault.toJSON(e));
- }
- if (message.minimumEdition !== 0) {
- obj.minimumEdition = editionToJSON(message.minimumEdition);
- }
- if (message.maximumEdition !== 0) {
- obj.maximumEdition = editionToJSON(message.maximumEdition);
- }
- return obj;
- },
-
- create(base?: DeepPartial<FeatureSetDefaults>): FeatureSetDefaults {
- return FeatureSetDefaults.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<FeatureSetDefaults>): FeatureSetDefaults {
- const message = createBaseFeatureSetDefaults();
- message.defaults = object.defaults?.map((e) => FeatureSetDefaults_FeatureSetEditionDefault.fromPartial(e)) || [];
- message.minimumEdition = object.minimumEdition ?? 0;
- message.maximumEdition = object.maximumEdition ?? 0;
- return message;
- },
-};
-
-function createBaseFeatureSetDefaults_FeatureSetEditionDefault(): FeatureSetDefaults_FeatureSetEditionDefault {
- return { edition: 0, features: undefined };
-}
-
-export const FeatureSetDefaults_FeatureSetEditionDefault = {
- encode(message: FeatureSetDefaults_FeatureSetEditionDefault, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- if (message.edition !== 0) {
- writer.uint32(24).int32(message.edition);
- }
- if (message.features !== undefined) {
- FeatureSet.encode(message.features, writer.uint32(18).fork()).ldelim();
- }
- return writer;
- },
-
- decode(input: _m0.Reader | Uint8Array, length?: number): FeatureSetDefaults_FeatureSetEditionDefault {
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseFeatureSetDefaults_FeatureSetEditionDefault();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 3:
- if (tag !== 24) {
- break;
- }
-
- message.edition = reader.int32() as any;
- continue;
- case 2:
- if (tag !== 18) {
- break;
- }
-
- message.features = FeatureSet.decode(reader, reader.uint32());
- continue;
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skipType(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): FeatureSetDefaults_FeatureSetEditionDefault {
- return {
- edition: isSet(object.edition) ? editionFromJSON(object.edition) : 0,
- features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
- };
- },
-
- toJSON(message: FeatureSetDefaults_FeatureSetEditionDefault): unknown {
- const obj: any = {};
- if (message.edition !== 0) {
- obj.edition = editionToJSON(message.edition);
- }
- if (message.features !== undefined) {
- obj.features = FeatureSet.toJSON(message.features);
- }
- return obj;
- },
-
- create(base?: DeepPartial<FeatureSetDefaults_FeatureSetEditionDefault>): FeatureSetDefaults_FeatureSetEditionDefault {
- return FeatureSetDefaults_FeatureSetEditionDefault.fromPartial(base ?? {});
- },
- fromPartial(
- object: DeepPartial<FeatureSetDefaults_FeatureSetEditionDefault>,
- ): FeatureSetDefaults_FeatureSetEditionDefault {
- const message = createBaseFeatureSetDefaults_FeatureSetEditionDefault();
- message.edition = object.edition ?? 0;
- message.features = (object.features !== undefined && object.features !== null)
- ? FeatureSet.fromPartial(object.features)
- : undefined;
- return message;
- },
-};
-
function createBaseSourceCodeInfo(): SourceCodeInfo {
return { location: [] };
}
diff --git a/frontend/src/types/proto/google/protobuf/struct.ts b/frontend/src/types/proto/google/protobuf/struct.ts
index b87dbf5bac..dbdf7a289a 100644
--- a/frontend/src/types/proto/google/protobuf/struct.ts
+++ b/frontend/src/types/proto/google/protobuf/struct.ts
@@ -8,7 +8,7 @@ export const protobufPackage = "google.protobuf";
* `NullValue` is a singleton enumeration to represent the null value for the
* `Value` type union.
*
- * The JSON representation for `NullValue` is JSON `null`.
+ * The JSON representation for `NullValue` is JSON `null`.
*/
export enum NullValue {
/** NULL_VALUE - Null value. */
diff --git a/frontend/src/types/proto/google/protobuf/timestamp.ts b/frontend/src/types/proto/google/protobuf/timestamp.ts
index 5781891bc0..51695e08d0 100644
--- a/frontend/src/types/proto/google/protobuf/timestamp.ts
+++ b/frontend/src/types/proto/google/protobuf/timestamp.ts
@@ -92,7 +92,7 @@ export const protobufPackage = "google.protobuf";
* [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
* the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
* the Joda Time's [`ISODateTimeFormat.dateTime()`](
- * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
+ * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
* ) to obtain a formatter capable of generating timestamps in this format.
*/
export interface Timestamp {
diff --git a/frontend/src/types/proto/store/plan_check_run.ts b/frontend/src/types/proto/store/plan_check_run.ts
index 5fc7187962..226ed20ff8 100644
--- a/frontend/src/types/proto/store/plan_check_run.ts
+++ b/frontend/src/types/proto/store/plan_check_run.ts
@@ -20,6 +20,7 @@ export enum PlanCheckRunConfig_ChangeDatabaseType {
DDL = 1,
DML = 2,
SDL = 3,
+ DDL_GHOST = 4,
UNRECOGNIZED = -1,
}
@@ -37,6 +38,9 @@ export function planCheckRunConfig_ChangeDatabaseTypeFromJSON(object: any): Plan
case 3:
case "SDL":
return PlanCheckRunConfig_ChangeDatabaseType.SDL;
+ case 4:
+ case "DDL_GHOST":
+ return PlanCheckRunConfig_ChangeDatabaseType.DDL_GHOST;
case -1:
case "UNRECOGNIZED":
default:
@@ -54,6 +58,8 @@ export function planCheckRunConfig_ChangeDatabaseTypeToJSON(object: PlanCheckRun
return "DML";
case PlanCheckRunConfig_ChangeDatabaseType.SDL:
return "SDL";
+ case PlanCheckRunConfig_ChangeDatabaseType.DDL_GHOST:
+ return "DDL_GHOST";
case PlanCheckRunConfig_ChangeDatabaseType.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
diff --git a/frontend/src/types/proto/v1/sql_service.ts b/frontend/src/types/proto/v1/sql_service.ts
index f65987762e..ff7bf8a93c 100644
--- a/frontend/src/types/proto/v1/sql_service.ts
+++ b/frontend/src/types/proto/v1/sql_service.ts
@@ -251,6 +251,52 @@ export interface CheckRequest {
* If not provided, the database metadata will be fetched from the database.
*/
metadata: DatabaseMetadata | undefined;
+ changeType: CheckRequest_ChangeType;
+}
+
+export enum CheckRequest_ChangeType {
+ CHANGE_TYPE_UNSPECIFIED = 0,
+ DDL = 1,
+ DDL_GHOST = 2,
+ DML = 3,
+ UNRECOGNIZED = -1,
+}
+
+export function checkRequest_ChangeTypeFromJSON(object: any): CheckRequest_ChangeType {
+ switch (object) {
+ case 0:
+ case "CHANGE_TYPE_UNSPECIFIED":
+ return CheckRequest_ChangeType.CHANGE_TYPE_UNSPECIFIED;
+ case 1:
+ case "DDL":
+ return CheckRequest_ChangeType.DDL;
+ case 2:
+ case "DDL_GHOST":
+ return CheckRequest_ChangeType.DDL_GHOST;
+ case 3:
+ case "DML":
+ return CheckRequest_ChangeType.DML;
+ case -1:
+ case "UNRECOGNIZED":
+ default:
+ return CheckRequest_ChangeType.UNRECOGNIZED;
+ }
+}
+
+export function checkRequest_ChangeTypeToJSON(object: CheckRequest_ChangeType): string {
+ switch (object) {
+ case CheckRequest_ChangeType.CHANGE_TYPE_UNSPECIFIED:
+ return "CHANGE_TYPE_UNSPECIFIED";
+ case CheckRequest_ChangeType.DDL:
+ return "DDL";
+ case CheckRequest_ChangeType.DDL_GHOST:
+ return "DDL_GHOST";
+ case CheckRequest_ChangeType.DML:
+ return "DML";
+ case CheckRequest_ChangeType.UNRECOGNIZED:
+ default:
+ return "UNRECOGNIZED";
+ }
}
export interface CheckResponse {
@@ -1838,7 +1884,7 @@ export const PrettyResponse = {
};
function createBaseCheckRequest(): CheckRequest {
- return { statement: "", database: "", metadata: undefined };
+ return { statement: "", database: "", metadata: undefined, changeType: 0 };
}
export const CheckRequest = {
@@ -1852,6 +1898,9 @@ export const CheckRequest = {
if (message.metadata !== undefined) {
DatabaseMetadata.encode(message.metadata, writer.uint32(26).fork()).ldelim();
}
+ if (message.changeType !== 0) {
+ writer.uint32(32).int32(message.changeType);
+ }
return writer;
},
@@ -1883,6 +1932,13 @@ export const CheckRequest = {
message.metadata = DatabaseMetadata.decode(reader, reader.uint32());
continue;
+ case 4:
+ if (tag !== 32) {
+ break;
+ }
+
+ message.changeType = reader.int32() as any;
+ continue;
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -1897,6 +1953,7 @@ export const CheckRequest = {
statement: isSet(object.statement) ? globalThis.String(object.statement) : "",
database: isSet(object.database) ? globalThis.String(object.database) : "",
metadata: isSet(object.metadata) ? DatabaseMetadata.fromJSON(object.metadata) : undefined,
+ changeType: isSet(object.changeType) ? checkRequest_ChangeTypeFromJSON(object.changeType) : 0,
};
},
@@ -1911,6 +1968,9 @@ export const CheckRequest = {
if (message.metadata !== undefined) {
obj.metadata = DatabaseMetadata.toJSON(message.metadata);
}
+ if (message.changeType !== 0) {
+ obj.changeType = checkRequest_ChangeTypeToJSON(message.changeType);
+ }
return obj;
},
@@ -1924,6 +1984,7 @@ export const CheckRequest = {
message.metadata = (object.metadata !== undefined && object.metadata !== null)
? DatabaseMetadata.fromPartial(object.metadata)
: undefined;
+ message.changeType = object.changeType ?? 0;
return message;
},
};
diff --git a/frontend/src/types/sql-review-schema.yaml b/frontend/src/types/sql-review-schema.yaml
index 22aafa2800..cbc698db35 100644
--- a/frontend/src/types/sql-review-schema.yaml
+++ b/frontend/src/types/sql-review-schema.yaml
@@ -8,6 +8,7 @@ categoryList:
- COLUMN
- SYSTEM
- DATABASE
+ - ADVICE
ruleList:
- type: engine.mysql.use-innodb
category: ENGINE
@@ -769,3 +770,12 @@ ruleList:
engineList:
- MYSQL
componentList: []
+ - type: advice.online-migration
+ category: ADVICE
+ engineList:
+ - MYSQL
+ componentList:
+ - key: number
+ payload:
+ type: NUMBER
+ default: 100000000
diff --git a/frontend/src/types/sqlReview.ts b/frontend/src/types/sqlReview.ts
index 802f50c6e7..260627f269 100644
--- a/frontend/src/types/sqlReview.ts
+++ b/frontend/src/types/sqlReview.ts
@@ -23,7 +23,8 @@ export type CategoryType =
| "SCHEMA"
| "DATABASE"
| "INDEX"
- | "SYSTEM";
+ | "SYSTEM"
+ | "ADVICE";
export const LEVEL_LIST = [
SQLReviewRuleLevel.ERROR,
@@ -166,7 +167,8 @@ export type RuleType =
| "index.total-number-limit"
| "index.primary-key-type-allowlist"
| "index.create-concurrently"
- | "index.pk-type-limit";
+ | "index.pk-type-limit"
+ | "advice.online-migration";
// The naming format rule payload.
// Used by the backend.
@@ -653,6 +655,7 @@ export const convertPolicyRuleToRuleTemplate = (
case "index.key-number-limit":
case "index.total-number-limit":
case "system.comment.length":
+ case "advice.online-migration":
if (!numberComponent) {
throw new Error(`Invalid rule ${ruleTemplate.type}`);
}
@@ -789,6 +792,7 @@ const mergeIndividualConfigAsRule = (
case "index.key-number-limit":
case "index.total-number-limit":
case "system.comment.length":
+ case "advice.online-migration":
if (!numberPayload) {
throw new Error(`Invalid rule ${template.type}`);
}
diff --git a/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue b/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue
index 71caef9fb3..7f7777569c 100644
--- a/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue
+++ b/frontend/src/views/SettingWorkspaceSQLReviewDetail.vue
@@ -90,7 +90,7 @@
/>
<div
v-if="state.rulesUpdated"
- class="w-full mt-4 py-4 border-t border-block-border flex justify-between bg-white sticky bottom-0 z-10"
+ class="w-full mt-4 py-4 border-t border-block-border flex justify-between bg-white sticky -bottom-4 z-10"
>
<NButton @click.prevent="onCancelChanges">
<span> {{ $t("common.cancel") }}</span>
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index 20b318884c..85484e756a 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -2123,6 +2123,7 @@ Type is the database change type.
| DDL | 1 | |
| DML | 2 | |
| SDL | 3 | |
+| DDL_GHOST | 4 | |
diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.html
index 12a1d6a4e4..cc12e2a756 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -5538,6 +5538,12 @@ Use a generated title if empty. </p></td>
<td><p></p></td>
</tr>
+ <tr>
+ <td>DDL_GHOST</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
</tbody>
</table>
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 27e42c347f..b50f35d8f1 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -614,6 +614,7 @@
- [StringifyMetadataResponse](#bytebase-v1-StringifyMetadataResponse)
- [Advice.Status](#bytebase-v1-Advice-Status)
+ - [CheckRequest.ChangeType](#bytebase-v1-CheckRequest-ChangeType)
- [SQLService](#bytebase-v1-SQLService)
@@ -9622,6 +9623,7 @@ Type of the SheetPayload.
| statement | [string](#string) | | |
| database | [string](#string) | | The database name to check against. Format: instances/{instance}/databases/{databaseName} |
| metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | The database metadata to check against. It can be used to check against an uncommitted metadata. If not provided, the database metadata will be fetched from the database. |
+| change_type | [CheckRequest.ChangeType](#bytebase-v1-CheckRequest-ChangeType) | | |
@@ -9919,6 +9921,20 @@ Type of the SheetPayload.
| ERROR | 3 | |
+
+<a name="bytebase-v1-CheckRequest-ChangeType"></a>
+
+### CheckRequest.ChangeType
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| CHANGE_TYPE_UNSPECIFIED | 0 | |
+| DDL | 1 | |
+| DDL_GHOST | 2 | |
+| DML | 3 | |
+
+
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index c6e3d8e39f..4369d9beec 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -2530,6 +2530,10 @@
<a href="#bytebase.v1.Advice.Status"><span class="badge">E</span>Advice.Status</a>
</li>
+ <li>
+ <a href="#bytebase.v1.CheckRequest.ChangeType"><span class="badge">E</span>CheckRequest.ChangeType</a>
+ </li>
+
<li>
@@ -26487,6 +26491,13 @@ Format: instances/{instance}/databases/{databaseName} </p></td>
If not provided, the database metadata will be fetched from the database. </p></td>
</tr>
+ <tr>
+ <td>change_type</td>
+ <td><a href="#bytebase.v1.CheckRequest.ChangeType">CheckRequest.ChangeType</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
</tbody>
</table>
@@ -27178,6 +27189,41 @@ The types come from the Golang SQL driver. </p></td>
</tbody>
</table>
+ <h3 id="bytebase.v1.CheckRequest.ChangeType">CheckRequest.ChangeType</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>CHANGE_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DDL</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DDL_GHOST</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DML</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
diff --git a/proto/generated-go/store/plan_check_run.pb.go b/proto/generated-go/store/plan_check_run.pb.go
index 305ba32843..1f73609613 100644
--- a/proto/generated-go/store/plan_check_run.pb.go
+++ b/proto/generated-go/store/plan_check_run.pb.go
@@ -27,6 +27,7 @@ const (
PlanCheckRunConfig_DDL PlanCheckRunConfig_ChangeDatabaseType = 1
PlanCheckRunConfig_DML PlanCheckRunConfig_ChangeDatabaseType = 2
PlanCheckRunConfig_SDL PlanCheckRunConfig_ChangeDatabaseType = 3
+ PlanCheckRunConfig_DDL_GHOST PlanCheckRunConfig_ChangeDatabaseType = 4
)
// Enum value maps for PlanCheckRunConfig_ChangeDatabaseType.
@@ -36,12 +37,14 @@ var (
1: "DDL",
2: "DML",
3: "SDL",
+ 4: "DDL_GHOST",
}
PlanCheckRunConfig_ChangeDatabaseType_value = map[string]int32{
"CHANGE_DATABASE_TYPE_UNSPECIFIED": 0,
"DDL": 1,
"DML": 2,
"SDL": 3,
+ "DDL_GHOST": 4,
}
)
@@ -532,7 +535,7 @@ var file_store_plan_check_run_proto_rawDesc = []byte{
0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x1a, 0x23, 0x73, 0x74,
0x6f, 0x72, 0x65, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61,
0x6e, 0x67, 0x65, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x22, 0x97, 0x04, 0x0a, 0x12, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52,
+ 0x6f, 0x22, 0xa6, 0x04, 0x0a, 0x12, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52,
0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x68, 0x65, 0x65,
0x74, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x68, 0x65,
0x65, 0x74, 0x55, 0x69, 0x64, 0x12, 0x67, 0x0a, 0x14, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f,
@@ -558,70 +561,71 @@ var file_store_plan_check_run_proto_rawDesc = []byte{
0x0a, 0x0f, 0x47, 0x68, 0x6f, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x55, 0x0a,
+ 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x64, 0x0a,
0x12, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54,
0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x20, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x44, 0x41,
0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50,
0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x44, 0x4c,
0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x4d, 0x4c, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x53,
- 0x44, 0x4c, 0x10, 0x03, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,
- 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x75, 0x69, 0x64, 0x22, 0xdf, 0x06, 0x0a, 0x12,
- 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x75,
- 0x6c, 0x74, 0x12, 0x43, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20,
- 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73,
- 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75,
- 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07,
- 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0xed, 0x05,
- 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x48, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74,
- 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68,
- 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x52, 0x65, 0x73,
- 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74,
- 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74,
- 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
- 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,
- 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x6a, 0x0a, 0x12, 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x75,
- 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,
- 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e,
- 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x71,
- 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x00,
- 0x52, 0x10, 0x73, 0x71, 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6f,
- 0x72, 0x74, 0x12, 0x67, 0x0a, 0x11, 0x73, 0x71, 0x6c, 0x5f, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77,
- 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50,
+ 0x44, 0x4c, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x44, 0x4c, 0x5f, 0x47, 0x48, 0x4f, 0x53,
+ 0x54, 0x10, 0x04, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
+ 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x75, 0x69, 0x64, 0x22, 0xdf, 0x06, 0x0a, 0x12, 0x50,
0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c,
- 0x74, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x71, 0x6c, 0x52, 0x65, 0x76, 0x69,
- 0x65, 0x77, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x71, 0x6c, 0x52,
- 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0xc3, 0x01, 0x0a, 0x10,
- 0x53, 0x71, 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74,
- 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,
- 0x63, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e,
- 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x73,
- 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x23, 0x0a,
- 0x0d, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f,
- 0x77, 0x73, 0x12, 0x4d, 0x0a, 0x11, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x5f, 0x72, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x43,
- 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52,
- 0x10, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x73, 0x1a, 0x69, 0x0a, 0x0f, 0x53, 0x71, 0x6c, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65,
- 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x05, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75,
- 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e,
- 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
- 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x45, 0x0a, 0x06,
- 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53,
- 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09,
- 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x52,
- 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53,
- 0x53, 0x10, 0x03, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x14, 0x5a,
- 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x74,
- 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x74, 0x12, 0x43, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,
+ 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e,
+ 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72,
+ 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0xed, 0x05, 0x0a,
+ 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x48, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
+ 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65,
+ 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x75,
+ 0x6c, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
+ 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
+ 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
+ 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
+ 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x6a, 0x0a, 0x12, 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x75, 0x6d,
+ 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x3a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f,
+ 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x52,
+ 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x71, 0x6c,
+ 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x00, 0x52,
+ 0x10, 0x73, 0x71, 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72,
+ 0x74, 0x12, 0x67, 0x0a, 0x11, 0x73, 0x71, 0x6c, 0x5f, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x5f,
+ 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c,
+ 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
+ 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x71, 0x6c, 0x52, 0x65, 0x76, 0x69, 0x65,
+ 0x77, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x71, 0x6c, 0x52, 0x65,
+ 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0xc3, 0x01, 0x0a, 0x10, 0x53,
+ 0x71, 0x6c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12,
+ 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63,
+ 0x6f, 0x64, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74,
+ 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x74,
+ 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d,
+ 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x05, 0x52, 0x0c, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77,
+ 0x73, 0x12, 0x4d, 0x0a, 0x11, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x68,
+ 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x10,
+ 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
+ 0x1a, 0x69, 0x0a, 0x0f, 0x53, 0x71, 0x6c, 0x52, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x70,
+ 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x05, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d,
+ 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12,
+ 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x45, 0x0a, 0x06, 0x53,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f,
+ 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a,
+ 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x52, 0x4e,
+ 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53,
+ 0x10, 0x03, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x14, 0x5a, 0x12,
+ 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f,
+ 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
diff --git a/proto/generated-go/v1/sql_service.pb.go b/proto/generated-go/v1/sql_service.pb.go
index c4d21131ac..999e71b094 100644
--- a/proto/generated-go/v1/sql_service.pb.go
+++ b/proto/generated-go/v1/sql_service.pb.go
@@ -76,6 +76,58 @@ func (Advice_Status) EnumDescriptor() ([]byte, []int) {
return file_v1_sql_service_proto_rawDescGZIP(), []int{11, 0}
}
+type CheckRequest_ChangeType int32
+
+const (
+ CheckRequest_CHANGE_TYPE_UNSPECIFIED CheckRequest_ChangeType = 0
+ CheckRequest_DDL CheckRequest_ChangeType = 1
+ CheckRequest_DDL_GHOST CheckRequest_ChangeType = 2
+ CheckRequest_DML CheckRequest_ChangeType = 3
+)
+
+// Enum value maps for CheckRequest_ChangeType.
+var (
+ CheckRequest_ChangeType_name = map[int32]string{
+ 0: "CHANGE_TYPE_UNSPECIFIED",
+ 1: "DDL",
+ 2: "DDL_GHOST",
+ 3: "DML",
+ }
+ CheckRequest_ChangeType_value = map[string]int32{
+ "CHANGE_TYPE_UNSPECIFIED": 0,
+ "DDL": 1,
+ "DDL_GHOST": 2,
+ "DML": 3,
+ }
+)
+
+func (x CheckRequest_ChangeType) Enum() *CheckRequest_ChangeType {
+ p := new(CheckRequest_ChangeType)
+ *p = x
+ return p
+}
+
+func (x CheckRequest_ChangeType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (CheckRequest_ChangeType) Descriptor() protoreflect.EnumDescriptor {
+ return file_v1_sql_service_proto_enumTypes[1].Descriptor()
+}
+
+func (CheckRequest_ChangeType) Type() protoreflect.EnumType {
+ return &file_v1_sql_service_proto_enumTypes[1]
+}
+
+func (x CheckRequest_ChangeType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use CheckRequest_ChangeType.Descriptor instead.
+func (CheckRequest_ChangeType) EnumDescriptor() ([]byte, []int) {
+ return file_v1_sql_service_proto_rawDescGZIP(), []int{14, 0}
+}
+
type DifferPreviewRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1243,7 +1295,8 @@ type CheckRequest struct {
Database string `protobuf:"bytes,2,opt,name=database,proto3" json:"database,omitempty"`
// The database metadata to check against. It can be used to check against an uncommitted metadata.
// If not provided, the database metadata will be fetched from the database.
- Metadata *DatabaseMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
+ Metadata *DatabaseMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
+ ChangeType CheckRequest_ChangeType `protobuf:"varint,4,opt,name=change_type,json=changeType,proto3,enum=bytebase.v1.CheckRequest_ChangeType" json:"change_type,omitempty"`
}
func (x *CheckRequest) Reset() {
@@ -1299,6 +1352,13 @@ func (x *CheckRequest) GetMetadata() *DatabaseMetadata {
return nil
}
+func (x *CheckRequest) GetChangeType() CheckRequest_ChangeType {
+ if x != nil {
+ return x.ChangeType
+ }
+ return CheckRequest_CHANGE_TYPE_UNSPECIFIED
+}
+
type CheckResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1715,7 +1775,7 @@ var file_v1_sql_service_proto_rawDesc = []byte{
0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x63, 0x68, 0x65,
0x6d, 0x61, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x73,
0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x65, 0x78, 0x70,
- 0x65, 0x63, 0x74, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x8d, 0x01, 0x0a, 0x0c,
+ 0x65, 0x63, 0x74, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0xa0, 0x02, 0x0a, 0x0c,
0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09,
0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x64, 0x61,
@@ -1724,91 +1784,100 @@ var file_v1_sql_service_proto_rawDesc = []byte{
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 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, 0x03, 0xe0, 0x41,
- 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3e, 0x0a, 0x0d, 0x43,
- 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x07,
- 0x61, 0x64, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x76, 0x69,
- 0x63, 0x65, 0x52, 0x07, 0x61, 0x64, 0x76, 0x69, 0x63, 0x65, 0x73, 0x22, 0x35, 0x0a, 0x19, 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, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74,
- 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
- 0x6e, 0x74, 0x22, 0x3c, 0x0a, 0x1a, 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,
- 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01,
- 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73,
- 0x22, 0x87, 0x01, 0x0a, 0x18, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d, 0x65,
- 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a,
- 0x08, 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, 0x03,
- 0xe0, 0x41, 0x02, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x0a,
- 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x02, 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, 0x22, 0x38, 0x0a, 0x19, 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, 0x12, 0x1b, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d,
- 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x06, 0x73, 0x63,
- 0x68, 0x65, 0x6d, 0x61, 0x32, 0xaa, 0x07, 0x0a, 0x0a, 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72, 0x76,
- 0x69, 0x63, 0x65, 0x12, 0x67, 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, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 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, 0x12, 0x6b, 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,
- 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 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, 0x12, 0x71, 0x0a, 0x0c, 0x41, 0x64, 0x6d,
- 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x65,
- 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x45,
- 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18,
- 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x3a, 0x61, 0x64, 0x6d, 0x69,
- 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x78, 0x0a, 0x0d,
- 0x44, 0x69, 0x66, 0x66, 0x65, 0x72, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x21, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66,
- 0x65, 0x72, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44,
- 0x69, 0x66, 0x66, 0x65, 0x72, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x3a, 0x01, 0x2a, 0x22,
- 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x71, 0x6c, 0x2f, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x50,
- 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x58, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12,
- 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68,
- 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x62, 0x79, 0x74,
- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x01,
- 0x2a, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x71, 0x6c, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b,
- 0x12, 0x8c, 0x01, 0x0a, 0x12, 0x50, 0x61, 0x72, 0x73, 0x65, 0x4d, 0x79, 0x42, 0x61, 0x74, 0x69,
- 0x73, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x26, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x4d, 0x79, 0x42, 0x61, 0x74,
- 0x69, 0x73, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
- 0x27, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61,
- 0x72, 0x73, 0x65, 0x4d, 0x79, 0x42, 0x61, 0x74, 0x69, 0x73, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f,
- 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x71, 0x6c, 0x2f, 0x70, 0x61, 0x72,
- 0x73, 0x65, 0x4d, 0x79, 0x42, 0x61, 0x74, 0x69, 0x73, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12,
- 0x5c, 0x0a, 0x06, 0x50, 0x72, 0x65, 0x74, 0x74, 0x79, 0x12, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x74, 0x74, 0x79, 0x52, 0x65,
+ 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x45, 0x0a, 0x0b, 0x63,
+ 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x24, 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, 0x2e, 0x43, 0x68, 0x61, 0x6e,
+ 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79,
+ 0x70, 0x65, 0x22, 0x4a, 0x0a, 0x0a, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65,
+ 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f,
+ 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a,
+ 0x03, 0x44, 0x44, 0x4c, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x44, 0x4c, 0x5f, 0x47, 0x48,
+ 0x4f, 0x53, 0x54, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x4d, 0x4c, 0x10, 0x03, 0x22, 0x3e,
+ 0x0a, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x2d, 0x0a, 0x07, 0x61, 0x64, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41,
+ 0x64, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x61, 0x64, 0x76, 0x69, 0x63, 0x65, 0x73, 0x22, 0x35,
+ 0x0a, 0x19, 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, 0x12, 0x18, 0x0a, 0x07, 0x63,
+ 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f,
+ 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x3c, 0x0a, 0x1a, 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, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74,
+ 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65,
+ 0x6e, 0x74, 0x73, 0x22, 0x87, 0x01, 0x0a, 0x18, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66,
+ 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x3e, 0x0a, 0x08, 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, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x12, 0x2b, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x02, 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, 0x22, 0x38, 0x0a,
+ 0x19, 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, 0x12, 0x1b, 0x0a, 0x06, 0x73, 0x63,
+ 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52,
+ 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x32, 0xaa, 0x07, 0x0a, 0x0a, 0x53, 0x51, 0x4c, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 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, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 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, 0x12,
+ 0x6b, 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, 0x50, 0x72, 0x65, 0x74, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f,
- 0x76, 0x31, 0x2f, 0x73, 0x71, 0x6c, 0x2f, 0x70, 0x72, 0x65, 0x74, 0x74, 0x79, 0x12, 0x91, 0x01,
- 0x0a, 0x11, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64,
- 0x61, 0x74, 0x61, 0x12, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
- 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64,
- 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x62, 0x79, 0x74,
- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69,
- 0x66, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
- 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x3a, 0x01, 0x2a, 0x22, 0x22, 0x2f,
- 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x3a,
- 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
- 0x61, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67,
- 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 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, 0x12, 0x71, 0x0a, 0x0c,
+ 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x20, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e,
+ 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x6d,
+ 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x3a, 0x61,
+ 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12,
+ 0x78, 0x0a, 0x0d, 0x44, 0x69, 0x66, 0x66, 0x65, 0x72, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77,
+ 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44,
+ 0x69, 0x66, 0x66, 0x65, 0x72, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x65, 0x72, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x3a,
+ 0x01, 0x2a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x71, 0x6c, 0x2f, 0x64, 0x69, 0x66, 0x66,
+ 0x65, 0x72, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x58, 0x0a, 0x05, 0x43, 0x68, 0x65,
+ 0x63, 0x6b, 0x12, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63,
+ 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+ 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x71, 0x6c, 0x2f, 0x63, 0x68,
+ 0x65, 0x63, 0x6b, 0x12, 0x8c, 0x01, 0x0a, 0x12, 0x50, 0x61, 0x72, 0x73, 0x65, 0x4d, 0x79, 0x42,
+ 0x61, 0x74, 0x69, 0x73, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x26, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x4d, 0x79,
+ 0x42, 0x61, 0x74, 0x69, 0x73, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x4d, 0x79, 0x42, 0x61, 0x74, 0x69, 0x73, 0x4d, 0x61, 0x70,
+ 0x70, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4,
+ 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x71, 0x6c, 0x2f,
+ 0x70, 0x61, 0x72, 0x73, 0x65, 0x4d, 0x79, 0x42, 0x61, 0x74, 0x69, 0x73, 0x4d, 0x61, 0x70, 0x70,
+ 0x65, 0x72, 0x12, 0x5c, 0x0a, 0x06, 0x50, 0x72, 0x65, 0x74, 0x74, 0x79, 0x12, 0x1a, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x74, 0x74,
+ 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x74, 0x74, 0x79, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a,
+ 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x71, 0x6c, 0x2f, 0x70, 0x72, 0x65, 0x74, 0x74, 0x79,
+ 0x12, 0x91, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69,
+ 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x3a, 0x01, 0x2a,
+ 0x22, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69,
+ 0x67, 0x6e, 0x3a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
+ 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -1823,78 +1892,80 @@ func file_v1_sql_service_proto_rawDescGZIP() []byte {
return file_v1_sql_service_proto_rawDescData
}
-var file_v1_sql_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_v1_sql_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_v1_sql_service_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
var file_v1_sql_service_proto_goTypes = []interface{}{
(Advice_Status)(0), // 0: bytebase.v1.Advice.Status
- (*DifferPreviewRequest)(nil), // 1: bytebase.v1.DifferPreviewRequest
- (*DifferPreviewResponse)(nil), // 2: bytebase.v1.DifferPreviewResponse
- (*AdminExecuteRequest)(nil), // 3: bytebase.v1.AdminExecuteRequest
- (*AdminExecuteResponse)(nil), // 4: bytebase.v1.AdminExecuteResponse
- (*ExportRequest)(nil), // 5: bytebase.v1.ExportRequest
- (*ExportResponse)(nil), // 6: bytebase.v1.ExportResponse
- (*QueryRequest)(nil), // 7: bytebase.v1.QueryRequest
- (*QueryResponse)(nil), // 8: bytebase.v1.QueryResponse
- (*QueryResult)(nil), // 9: bytebase.v1.QueryResult
- (*QueryRow)(nil), // 10: bytebase.v1.QueryRow
- (*RowValue)(nil), // 11: bytebase.v1.RowValue
- (*Advice)(nil), // 12: bytebase.v1.Advice
- (*PrettyRequest)(nil), // 13: bytebase.v1.PrettyRequest
- (*PrettyResponse)(nil), // 14: bytebase.v1.PrettyResponse
- (*CheckRequest)(nil), // 15: bytebase.v1.CheckRequest
- (*CheckResponse)(nil), // 16: bytebase.v1.CheckResponse
- (*ParseMyBatisMapperRequest)(nil), // 17: bytebase.v1.ParseMyBatisMapperRequest
- (*ParseMyBatisMapperResponse)(nil), // 18: bytebase.v1.ParseMyBatisMapperResponse
- (*StringifyMetadataRequest)(nil), // 19: bytebase.v1.StringifyMetadataRequest
- (*StringifyMetadataResponse)(nil), // 20: bytebase.v1.StringifyMetadataResponse
- (Engine)(0), // 21: bytebase.v1.Engine
- (*DatabaseMetadata)(nil), // 22: bytebase.v1.DatabaseMetadata
- (*durationpb.Duration)(nil), // 23: google.protobuf.Duration
- (ExportFormat)(0), // 24: bytebase.v1.ExportFormat
- (structpb.NullValue)(0), // 25: google.protobuf.NullValue
- (*structpb.Value)(nil), // 26: google.protobuf.Value
+ (CheckRequest_ChangeType)(0), // 1: bytebase.v1.CheckRequest.ChangeType
+ (*DifferPreviewRequest)(nil), // 2: bytebase.v1.DifferPreviewRequest
+ (*DifferPreviewResponse)(nil), // 3: bytebase.v1.DifferPreviewResponse
+ (*AdminExecuteRequest)(nil), // 4: bytebase.v1.AdminExecuteRequest
+ (*AdminExecuteResponse)(nil), // 5: bytebase.v1.AdminExecuteResponse
+ (*ExportRequest)(nil), // 6: bytebase.v1.ExportRequest
+ (*ExportResponse)(nil), // 7: bytebase.v1.ExportResponse
+ (*QueryRequest)(nil), // 8: bytebase.v1.QueryRequest
+ (*QueryResponse)(nil), // 9: bytebase.v1.QueryResponse
+ (*QueryResult)(nil), // 10: bytebase.v1.QueryResult
+ (*QueryRow)(nil), // 11: bytebase.v1.QueryRow
+ (*RowValue)(nil), // 12: bytebase.v1.RowValue
+ (*Advice)(nil), // 13: bytebase.v1.Advice
+ (*PrettyRequest)(nil), // 14: bytebase.v1.PrettyRequest
+ (*PrettyResponse)(nil), // 15: bytebase.v1.PrettyResponse
+ (*CheckRequest)(nil), // 16: bytebase.v1.CheckRequest
+ (*CheckResponse)(nil), // 17: bytebase.v1.CheckResponse
+ (*ParseMyBatisMapperRequest)(nil), // 18: bytebase.v1.ParseMyBatisMapperRequest
+ (*ParseMyBatisMapperResponse)(nil), // 19: bytebase.v1.ParseMyBatisMapperResponse
+ (*StringifyMetadataRequest)(nil), // 20: bytebase.v1.StringifyMetadataRequest
+ (*StringifyMetadataResponse)(nil), // 21: bytebase.v1.StringifyMetadataResponse
+ (Engine)(0), // 22: bytebase.v1.Engine
+ (*DatabaseMetadata)(nil), // 23: bytebase.v1.DatabaseMetadata
+ (*durationpb.Duration)(nil), // 24: google.protobuf.Duration
+ (ExportFormat)(0), // 25: bytebase.v1.ExportFormat
+ (structpb.NullValue)(0), // 26: google.protobuf.NullValue
+ (*structpb.Value)(nil), // 27: google.protobuf.Value
}
var file_v1_sql_service_proto_depIdxs = []int32{
- 21, // 0: bytebase.v1.DifferPreviewRequest.engine:type_name -> bytebase.v1.Engine
- 22, // 1: bytebase.v1.DifferPreviewRequest.new_metadata:type_name -> bytebase.v1.DatabaseMetadata
- 23, // 2: bytebase.v1.AdminExecuteRequest.timeout:type_name -> google.protobuf.Duration
- 9, // 3: bytebase.v1.AdminExecuteResponse.results:type_name -> bytebase.v1.QueryResult
- 24, // 4: bytebase.v1.ExportRequest.format:type_name -> bytebase.v1.ExportFormat
- 23, // 5: bytebase.v1.QueryRequest.timeout:type_name -> google.protobuf.Duration
- 9, // 6: bytebase.v1.QueryResponse.results:type_name -> bytebase.v1.QueryResult
- 12, // 7: bytebase.v1.QueryResponse.advices:type_name -> bytebase.v1.Advice
- 10, // 8: bytebase.v1.QueryResult.rows:type_name -> bytebase.v1.QueryRow
- 23, // 9: bytebase.v1.QueryResult.latency:type_name -> google.protobuf.Duration
- 11, // 10: bytebase.v1.QueryRow.values:type_name -> bytebase.v1.RowValue
- 25, // 11: bytebase.v1.RowValue.null_value:type_name -> google.protobuf.NullValue
- 26, // 12: bytebase.v1.RowValue.value_value:type_name -> google.protobuf.Value
+ 22, // 0: bytebase.v1.DifferPreviewRequest.engine:type_name -> bytebase.v1.Engine
+ 23, // 1: bytebase.v1.DifferPreviewRequest.new_metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 24, // 2: bytebase.v1.AdminExecuteRequest.timeout:type_name -> google.protobuf.Duration
+ 10, // 3: bytebase.v1.AdminExecuteResponse.results:type_name -> bytebase.v1.QueryResult
+ 25, // 4: bytebase.v1.ExportRequest.format:type_name -> bytebase.v1.ExportFormat
+ 24, // 5: bytebase.v1.QueryRequest.timeout:type_name -> google.protobuf.Duration
+ 10, // 6: bytebase.v1.QueryResponse.results:type_name -> bytebase.v1.QueryResult
+ 13, // 7: bytebase.v1.QueryResponse.advices:type_name -> bytebase.v1.Advice
+ 11, // 8: bytebase.v1.QueryResult.rows:type_name -> bytebase.v1.QueryRow
+ 24, // 9: bytebase.v1.QueryResult.latency:type_name -> google.protobuf.Duration
+ 12, // 10: bytebase.v1.QueryRow.values:type_name -> bytebase.v1.RowValue
+ 26, // 11: bytebase.v1.RowValue.null_value:type_name -> google.protobuf.NullValue
+ 27, // 12: bytebase.v1.RowValue.value_value:type_name -> google.protobuf.Value
0, // 13: bytebase.v1.Advice.status:type_name -> bytebase.v1.Advice.Status
- 21, // 14: bytebase.v1.PrettyRequest.engine:type_name -> bytebase.v1.Engine
- 22, // 15: bytebase.v1.CheckRequest.metadata:type_name -> bytebase.v1.DatabaseMetadata
- 12, // 16: bytebase.v1.CheckResponse.advices:type_name -> bytebase.v1.Advice
- 22, // 17: bytebase.v1.StringifyMetadataRequest.metadata:type_name -> bytebase.v1.DatabaseMetadata
- 21, // 18: bytebase.v1.StringifyMetadataRequest.engine:type_name -> bytebase.v1.Engine
- 7, // 19: bytebase.v1.SQLService.Query:input_type -> bytebase.v1.QueryRequest
- 5, // 20: bytebase.v1.SQLService.Export:input_type -> bytebase.v1.ExportRequest
- 3, // 21: bytebase.v1.SQLService.AdminExecute:input_type -> bytebase.v1.AdminExecuteRequest
- 1, // 22: bytebase.v1.SQLService.DifferPreview:input_type -> bytebase.v1.DifferPreviewRequest
- 15, // 23: bytebase.v1.SQLService.Check:input_type -> bytebase.v1.CheckRequest
- 17, // 24: bytebase.v1.SQLService.ParseMyBatisMapper:input_type -> bytebase.v1.ParseMyBatisMapperRequest
- 13, // 25: bytebase.v1.SQLService.Pretty:input_type -> bytebase.v1.PrettyRequest
- 19, // 26: bytebase.v1.SQLService.StringifyMetadata:input_type -> bytebase.v1.StringifyMetadataRequest
- 8, // 27: bytebase.v1.SQLService.Query:output_type -> bytebase.v1.QueryResponse
- 6, // 28: bytebase.v1.SQLService.Export:output_type -> bytebase.v1.ExportResponse
- 4, // 29: bytebase.v1.SQLService.AdminExecute:output_type -> bytebase.v1.AdminExecuteResponse
- 2, // 30: bytebase.v1.SQLService.DifferPreview:output_type -> bytebase.v1.DifferPreviewResponse
- 16, // 31: bytebase.v1.SQLService.Check:output_type -> bytebase.v1.CheckResponse
- 18, // 32: bytebase.v1.SQLService.ParseMyBatisMapper:output_type -> bytebase.v1.ParseMyBatisMapperResponse
- 14, // 33: bytebase.v1.SQLService.Pretty:output_type -> bytebase.v1.PrettyResponse
- 20, // 34: bytebase.v1.SQLService.StringifyMetadata:output_type -> bytebase.v1.StringifyMetadataResponse
- 27, // [27:35] is the sub-list for method output_type
- 19, // [19:27] is the sub-list for method input_type
- 19, // [19:19] is the sub-list for extension type_name
- 19, // [19:19] is the sub-list for extension extendee
- 0, // [0:19] is the sub-list for field type_name
+ 22, // 14: bytebase.v1.PrettyRequest.engine:type_name -> bytebase.v1.Engine
+ 23, // 15: bytebase.v1.CheckRequest.metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 1, // 16: bytebase.v1.CheckRequest.change_type:type_name -> bytebase.v1.CheckRequest.ChangeType
+ 13, // 17: bytebase.v1.CheckResponse.advices:type_name -> bytebase.v1.Advice
+ 23, // 18: bytebase.v1.StringifyMetadataRequest.metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 22, // 19: bytebase.v1.StringifyMetadataRequest.engine:type_name -> bytebase.v1.Engine
+ 8, // 20: bytebase.v1.SQLService.Query:input_type -> bytebase.v1.QueryRequest
+ 6, // 21: bytebase.v1.SQLService.Export:input_type -> bytebase.v1.ExportRequest
+ 4, // 22: bytebase.v1.SQLService.AdminExecute:input_type -> bytebase.v1.AdminExecuteRequest
+ 2, // 23: bytebase.v1.SQLService.DifferPreview:input_type -> bytebase.v1.DifferPreviewRequest
+ 16, // 24: bytebase.v1.SQLService.Check:input_type -> bytebase.v1.CheckRequest
+ 18, // 25: bytebase.v1.SQLService.ParseMyBatisMapper:input_type -> bytebase.v1.ParseMyBatisMapperRequest
+ 14, // 26: bytebase.v1.SQLService.Pretty:input_type -> bytebase.v1.PrettyRequest
+ 20, // 27: bytebase.v1.SQLService.StringifyMetadata:input_type -> bytebase.v1.StringifyMetadataRequest
+ 9, // 28: bytebase.v1.SQLService.Query:output_type -> bytebase.v1.QueryResponse
+ 7, // 29: bytebase.v1.SQLService.Export:output_type -> bytebase.v1.ExportResponse
+ 5, // 30: bytebase.v1.SQLService.AdminExecute:output_type -> bytebase.v1.AdminExecuteResponse
+ 3, // 31: bytebase.v1.SQLService.DifferPreview:output_type -> bytebase.v1.DifferPreviewResponse
+ 17, // 32: bytebase.v1.SQLService.Check:output_type -> bytebase.v1.CheckResponse
+ 19, // 33: bytebase.v1.SQLService.ParseMyBatisMapper:output_type -> bytebase.v1.ParseMyBatisMapperResponse
+ 15, // 34: bytebase.v1.SQLService.Pretty:output_type -> bytebase.v1.PrettyResponse
+ 21, // 35: bytebase.v1.SQLService.StringifyMetadata:output_type -> bytebase.v1.StringifyMetadataResponse
+ 28, // [28:36] is the sub-list for method output_type
+ 20, // [20:28] is the sub-list for method input_type
+ 20, // [20:20] is the sub-list for extension type_name
+ 20, // [20:20] is the sub-list for extension extendee
+ 0, // [0:20] is the sub-list for field type_name
}
func init() { file_v1_sql_service_proto_init() }
@@ -2165,7 +2236,7 @@ func file_v1_sql_service_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_v1_sql_service_proto_rawDesc,
- NumEnums: 1,
+ NumEnums: 2,
NumMessages: 20,
NumExtensions: 0,
NumServices: 1,
diff --git a/proto/store/plan_check_run.proto b/proto/store/plan_check_run.proto
index 6ee65cb9b6..f7f22b94ed 100644
--- a/proto/store/plan_check_run.proto
+++ b/proto/store/plan_check_run.proto
@@ -21,6 +21,7 @@ message PlanCheckRunConfig {
DDL = 1;
DML = 2;
SDL = 3;
+ DDL_GHOST = 4;
}
}
diff --git a/proto/v1/sql_service.proto b/proto/v1/sql_service.proto
index 85f86a7455..042a2d1244 100644
--- a/proto/v1/sql_service.proto
+++ b/proto/v1/sql_service.proto
@@ -274,6 +274,14 @@ message CheckRequest {
// The database metadata to check against. It can be used to check against an uncommitted metadata.
// If not provided, the database metadata will be fetched from the database.
DatabaseMetadata metadata = 3 [(google.api.field_behavior) = OPTIONAL];
+
+ enum ChangeType {
+ CHANGE_TYPE_UNSPECIFIED = 0;
+ DDL = 1;
+ DDL_GHOST = 2;
+ DML = 3;
+ }
+ ChangeType change_type = 4;
}
message CheckResponse {