Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat: plan check run schema (#7161)
p0ny323527db8e51
diff --git a/backend/migrator/migration/dev/LATEST.sql b/backend/migrator/migration/dev/LATEST.sqlindex dae8874bb3..fa761960b7 100644--- a/backend/migrator/migration/dev/LATEST.sql+++ b/backend/migrator/migration/dev/LATEST.sql@@ -711,6 +711,32 @@ BEFOREUPDATEON plan FOR EACH ROWEXECUTE FUNCTION trigger_update_updated_ts();++CREATE TABLE plan_check_run (+ id SERIAL PRIMARY KEY,+ creator_id INTEGER NOT NULL REFERENCES principal (id),+ created_ts BIGINT NOT NULL DEFAULT extract(epoch from now()),+ updater_id INTEGER NOT NULL REFERENCES principal (id),+ updated_ts BIGINT NOT NULL DEFAULT extract(epoch from now()),+ plan_id INTEGER NOT NULL REFERENCES plan (id),+ status TEXT NOT NULL CHECK (status IN ('RUNNING', 'DONE', 'FAILED', 'CANCELED')),+ type TEXT NOT NULL CHECK (type LIKE 'bb.plan-check.%'),+ code INTEGER NOT NULL DEFAULT 0,+ config JSONB NOT NULL DEFAULT '{}',+ result JSONB NOT NULL DEFAULT '{}',+ payload JSONB NOT NULL DEFAULT '{}'+);++CREATE INDEX idx_plan_check_run_plan_id ON plan_check_run (plan_id);++ALTER SEQUENCE plan_check_run_id_seq RESTART WITH 101;++CREATE TRIGGER update_plan_check_run_updated_ts+BEFORE+UPDATE+ ON plan_check_run FOR EACH ROW+EXECUTE FUNCTION trigger_update_updated_ts();+-- Plan related END------------------------- issuediff --git a/backend/migrator/migration/prod/2.5/0002##plan_check_run.sql b/backend/migrator/migration/prod/2.5/0002##plan_check_run.sqlnew file mode 100644index 0000000000..50a15b9074--- /dev/null+++ b/backend/migrator/migration/prod/2.5/0002##plan_check_run.sql@@ -0,0 +1,24 @@+CREATE TABLE plan_check_run (+ id SERIAL PRIMARY KEY,+ creator_id INTEGER NOT NULL REFERENCES principal (id),+ created_ts BIGINT NOT NULL DEFAULT extract(epoch from now()),+ updater_id INTEGER NOT NULL REFERENCES principal (id),+ updated_ts BIGINT NOT NULL DEFAULT extract(epoch from now()),+ plan_id INTEGER NOT NULL REFERENCES plan (id),+ status TEXT NOT NULL CHECK (status IN ('RUNNING', 'DONE', 'FAILED', 'CANCELED')),+ type TEXT NOT NULL CHECK (type LIKE 'bb.plan-check.%'),+ code INTEGER NOT NULL DEFAULT 0,+ config JSONB NOT NULL DEFAULT '{}',+ result JSONB NOT NULL DEFAULT '{}',+ payload JSONB NOT NULL DEFAULT '{}'+);++CREATE INDEX idx_plan_check_run_plan_id ON plan_check_run (plan_id);++ALTER SEQUENCE plan_check_run_id_seq RESTART WITH 101;++CREATE TRIGGER update_plan_check_run_updated_ts+BEFORE+UPDATE+ ON plan_check_run FOR EACH ROW+EXECUTE FUNCTION trigger_update_updated_ts();diff --git a/backend/migrator/migration/prod/LATEST.sql b/backend/migrator/migration/prod/LATEST.sqlindex b012b66766..5ce6b3f12b 100644--- a/backend/migrator/migration/prod/LATEST.sql+++ b/backend/migrator/migration/prod/LATEST.sql@@ -710,6 +710,32 @@ BEFOREUPDATEON plan FOR EACH ROWEXECUTE FUNCTION trigger_update_updated_ts();++CREATE TABLE plan_check_run (+ id SERIAL PRIMARY KEY,+ creator_id INTEGER NOT NULL REFERENCES principal (id),+ created_ts BIGINT NOT NULL DEFAULT extract(epoch from now()),+ updater_id INTEGER NOT NULL REFERENCES principal (id),+ updated_ts BIGINT NOT NULL DEFAULT extract(epoch from now()),+ plan_id INTEGER NOT NULL REFERENCES plan (id),+ status TEXT NOT NULL CHECK (status IN ('RUNNING', 'DONE', 'FAILED', 'CANCELED')),+ type TEXT NOT NULL CHECK (type LIKE 'bb.plan-check.%'),+ code INTEGER NOT NULL DEFAULT 0,+ config JSONB NOT NULL DEFAULT '{}',+ result JSONB NOT NULL DEFAULT '{}',+ payload JSONB NOT NULL DEFAULT '{}'+);++CREATE INDEX idx_plan_check_run_plan_id ON plan_check_run (plan_id);++ALTER SEQUENCE plan_check_run_id_seq RESTART WITH 101;++CREATE TRIGGER update_plan_check_run_updated_ts+BEFORE+UPDATE+ ON plan_check_run FOR EACH ROW+EXECUTE FUNCTION trigger_update_updated_ts();+-- Plan related END------------------------- issuediff --git a/frontend/src/types/proto/store/plan_check_run.ts b/frontend/src/types/proto/store/plan_check_run.tsnew file mode 100644index 0000000000..334504dcfc--- /dev/null+++ b/frontend/src/types/proto/store/plan_check_run.ts@@ -0,0 +1,902 @@+/* eslint-disable */+import * as Long from "long";+import * as _m0 from "protobufjs/minimal";++export const protobufPackage = "bytebase.store";++export interface PlanCheckRunConfig {+ sheetId: number;+ databaseId: number;+}++export interface PlanCheckRunResult {+ results: PlanCheckRunResult_Result[];+}++export interface PlanCheckRunResult_Result {+ success?:+ | PlanCheckRunResultSuccess+ | undefined;+ /** Failure if the PlanCheckRun itself failed to run. */+ failure?: PlanCheckRunResultFailure | undefined;+}++export interface PlanCheckRunResultSuccess {+ status: PlanCheckRunResultSuccess_Status;+ title: string;+ content: string;+ code?: PlanCheckRunResultSuccess_Code | undefined;+ statementTypeReport?: PlanCheckRunResultSuccess_StatementTypeReport | undefined;+ affectedRowsReport?: PlanCheckRunResultSuccess_AffectedRowsReport | undefined;+ sqlReviewReport?: PlanCheckRunResultSuccess_SqlReviewReport | undefined;+}++export enum PlanCheckRunResultSuccess_Status {+ STATUS_UNSPECIFIED = 0,+ ERROR = 1,+ WARNING = 2,+ SUCCESS = 3,+ UNRECOGNIZED = -1,+}++export function planCheckRunResultSuccess_StatusFromJSON(object: any): PlanCheckRunResultSuccess_Status {+ switch (object) {+ case 0:+ case "STATUS_UNSPECIFIED":+ return PlanCheckRunResultSuccess_Status.STATUS_UNSPECIFIED;+ case 1:+ case "ERROR":+ return PlanCheckRunResultSuccess_Status.ERROR;+ case 2:+ case "WARNING":+ return PlanCheckRunResultSuccess_Status.WARNING;+ case 3:+ case "SUCCESS":+ return PlanCheckRunResultSuccess_Status.SUCCESS;+ case -1:+ case "UNRECOGNIZED":+ default:+ return PlanCheckRunResultSuccess_Status.UNRECOGNIZED;+ }+}++export function planCheckRunResultSuccess_StatusToJSON(object: PlanCheckRunResultSuccess_Status): string {+ switch (object) {+ case PlanCheckRunResultSuccess_Status.STATUS_UNSPECIFIED:+ return "STATUS_UNSPECIFIED";+ case PlanCheckRunResultSuccess_Status.ERROR:+ return "ERROR";+ case PlanCheckRunResultSuccess_Status.WARNING:+ return "WARNING";+ case PlanCheckRunResultSuccess_Status.SUCCESS:+ return "SUCCESS";+ case PlanCheckRunResultSuccess_Status.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export interface PlanCheckRunResultSuccess_Code {+ code: number;+ namespace: PlanCheckRunResultSuccess_Code_Namespace;+}++export enum PlanCheckRunResultSuccess_Code_Namespace {+ NAMESPACE_UNSPECIFIED = 0,+ BYTEBASE = 1,+ ADVISOR = 2,+ UNRECOGNIZED = -1,+}++export function planCheckRunResultSuccess_Code_NamespaceFromJSON(+ object: any,+): PlanCheckRunResultSuccess_Code_Namespace {+ switch (object) {+ case 0:+ case "NAMESPACE_UNSPECIFIED":+ return PlanCheckRunResultSuccess_Code_Namespace.NAMESPACE_UNSPECIFIED;+ case 1:+ case "BYTEBASE":+ return PlanCheckRunResultSuccess_Code_Namespace.BYTEBASE;+ case 2:+ case "ADVISOR":+ return PlanCheckRunResultSuccess_Code_Namespace.ADVISOR;+ case -1:+ case "UNRECOGNIZED":+ default:+ return PlanCheckRunResultSuccess_Code_Namespace.UNRECOGNIZED;+ }+}++export function planCheckRunResultSuccess_Code_NamespaceToJSON(+ object: PlanCheckRunResultSuccess_Code_Namespace,+): string {+ switch (object) {+ case PlanCheckRunResultSuccess_Code_Namespace.NAMESPACE_UNSPECIFIED:+ return "NAMESPACE_UNSPECIFIED";+ case PlanCheckRunResultSuccess_Code_Namespace.BYTEBASE:+ return "BYTEBASE";+ case PlanCheckRunResultSuccess_Code_Namespace.ADVISOR:+ return "ADVISOR";+ case PlanCheckRunResultSuccess_Code_Namespace.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export interface PlanCheckRunResultSuccess_StatementTypeReport {+ statementType: string;+}++export interface PlanCheckRunResultSuccess_AffectedRowsReport {+ affectedRows: number;+}++export interface PlanCheckRunResultSuccess_SqlReviewReport {+ line: number;+ detail: string;+}++export interface PlanCheckRunResultFailure {+ title: string;+ content: string;+}++function createBasePlanCheckRunConfig(): PlanCheckRunConfig {+ return { sheetId: 0, databaseId: 0 };+}++export const PlanCheckRunConfig = {+ encode(message: PlanCheckRunConfig, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.sheetId !== 0) {+ writer.uint32(8).int32(message.sheetId);+ }+ if (message.databaseId !== 0) {+ writer.uint32(16).int32(message.databaseId);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): PlanCheckRunConfig {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBasePlanCheckRunConfig();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 8) {+ break;+ }++ message.sheetId = reader.int32();+ continue;+ case 2:+ if (tag !== 16) {+ break;+ }++ message.databaseId = reader.int32();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): PlanCheckRunConfig {+ return {+ sheetId: isSet(object.sheetId) ? Number(object.sheetId) : 0,+ databaseId: isSet(object.databaseId) ? Number(object.databaseId) : 0,+ };+ },++ toJSON(message: PlanCheckRunConfig): unknown {+ const obj: any = {};+ message.sheetId !== undefined && (obj.sheetId = Math.round(message.sheetId));+ message.databaseId !== undefined && (obj.databaseId = Math.round(message.databaseId));+ return obj;+ },++ create(base?: DeepPartial<PlanCheckRunConfig>): PlanCheckRunConfig {+ return PlanCheckRunConfig.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<PlanCheckRunConfig>): PlanCheckRunConfig {+ const message = createBasePlanCheckRunConfig();+ message.sheetId = object.sheetId ?? 0;+ message.databaseId = object.databaseId ?? 0;+ return message;+ },+};++function createBasePlanCheckRunResult(): PlanCheckRunResult {+ return { results: [] };+}++export const PlanCheckRunResult = {+ encode(message: PlanCheckRunResult, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ for (const v of message.results) {+ PlanCheckRunResult_Result.encode(v!, writer.uint32(10).fork()).ldelim();+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): PlanCheckRunResult {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBasePlanCheckRunResult();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.results.push(PlanCheckRunResult_Result.decode(reader, reader.uint32()));+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): PlanCheckRunResult {+ return {+ results: Array.isArray(object?.results)+ ? object.results.map((e: any) => PlanCheckRunResult_Result.fromJSON(e))+ : [],+ };+ },++ toJSON(message: PlanCheckRunResult): unknown {+ const obj: any = {};+ if (message.results) {+ obj.results = message.results.map((e) => e ? PlanCheckRunResult_Result.toJSON(e) : undefined);+ } else {+ obj.results = [];+ }+ return obj;+ },++ create(base?: DeepPartial<PlanCheckRunResult>): PlanCheckRunResult {+ return PlanCheckRunResult.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<PlanCheckRunResult>): PlanCheckRunResult {+ const message = createBasePlanCheckRunResult();+ message.results = object.results?.map((e) => PlanCheckRunResult_Result.fromPartial(e)) || [];+ return message;+ },+};++function createBasePlanCheckRunResult_Result(): PlanCheckRunResult_Result {+ return { success: undefined, failure: undefined };+}++export const PlanCheckRunResult_Result = {+ encode(message: PlanCheckRunResult_Result, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.success !== undefined) {+ PlanCheckRunResultSuccess.encode(message.success, writer.uint32(10).fork()).ldelim();+ }+ if (message.failure !== undefined) {+ PlanCheckRunResultFailure.encode(message.failure, writer.uint32(18).fork()).ldelim();+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): PlanCheckRunResult_Result {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBasePlanCheckRunResult_Result();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.success = PlanCheckRunResultSuccess.decode(reader, reader.uint32());+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.failure = PlanCheckRunResultFailure.decode(reader, reader.uint32());+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): PlanCheckRunResult_Result {+ return {+ success: isSet(object.success) ? PlanCheckRunResultSuccess.fromJSON(object.success) : undefined,+ failure: isSet(object.failure) ? PlanCheckRunResultFailure.fromJSON(object.failure) : undefined,+ };+ },++ toJSON(message: PlanCheckRunResult_Result): unknown {+ const obj: any = {};+ message.success !== undefined &&+ (obj.success = message.success ? PlanCheckRunResultSuccess.toJSON(message.success) : undefined);+ message.failure !== undefined &&+ (obj.failure = message.failure ? PlanCheckRunResultFailure.toJSON(message.failure) : undefined);+ return obj;+ },++ create(base?: DeepPartial<PlanCheckRunResult_Result>): PlanCheckRunResult_Result {+ return PlanCheckRunResult_Result.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<PlanCheckRunResult_Result>): PlanCheckRunResult_Result {+ const message = createBasePlanCheckRunResult_Result();+ message.success = (object.success !== undefined && object.success !== null)+ ? PlanCheckRunResultSuccess.fromPartial(object.success)+ : undefined;+ message.failure = (object.failure !== undefined && object.failure !== null)+ ? PlanCheckRunResultFailure.fromPartial(object.failure)+ : undefined;+ return message;+ },+};++function createBasePlanCheckRunResultSuccess(): PlanCheckRunResultSuccess {+ return {+ status: 0,+ title: "",+ content: "",+ code: undefined,+ statementTypeReport: undefined,+ affectedRowsReport: undefined,+ sqlReviewReport: undefined,+ };+}++export const PlanCheckRunResultSuccess = {+ encode(message: PlanCheckRunResultSuccess, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.status !== 0) {+ writer.uint32(8).int32(message.status);+ }+ if (message.title !== "") {+ writer.uint32(18).string(message.title);+ }+ if (message.content !== "") {+ writer.uint32(26).string(message.content);+ }+ if (message.code !== undefined) {+ PlanCheckRunResultSuccess_Code.encode(message.code, writer.uint32(34).fork()).ldelim();+ }+ if (message.statementTypeReport !== undefined) {+ PlanCheckRunResultSuccess_StatementTypeReport.encode(message.statementTypeReport, writer.uint32(42).fork())+ .ldelim();+ }+ if (message.affectedRowsReport !== undefined) {+ PlanCheckRunResultSuccess_AffectedRowsReport.encode(message.affectedRowsReport, writer.uint32(50).fork())+ .ldelim();+ }+ if (message.sqlReviewReport !== undefined) {+ PlanCheckRunResultSuccess_SqlReviewReport.encode(message.sqlReviewReport, writer.uint32(58).fork()).ldelim();+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): PlanCheckRunResultSuccess {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBasePlanCheckRunResultSuccess();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 8) {+ break;+ }++ message.status = reader.int32() as any;+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.title = reader.string();+ continue;+ case 3:+ if (tag !== 26) {+ break;+ }++ message.content = reader.string();+ continue;+ case 4:+ if (tag !== 34) {+ break;+ }++ message.code = PlanCheckRunResultSuccess_Code.decode(reader, reader.uint32());+ continue;+ case 5:+ if (tag !== 42) {+ break;+ }++ message.statementTypeReport = PlanCheckRunResultSuccess_StatementTypeReport.decode(reader, reader.uint32());+ continue;+ case 6:+ if (tag !== 50) {+ break;+ }++ message.affectedRowsReport = PlanCheckRunResultSuccess_AffectedRowsReport.decode(reader, reader.uint32());+ continue;+ case 7:+ if (tag !== 58) {+ break;+ }++ message.sqlReviewReport = PlanCheckRunResultSuccess_SqlReviewReport.decode(reader, reader.uint32());+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): PlanCheckRunResultSuccess {+ return {+ status: isSet(object.status) ? planCheckRunResultSuccess_StatusFromJSON(object.status) : 0,+ title: isSet(object.title) ? String(object.title) : "",+ content: isSet(object.content) ? String(object.content) : "",+ code: isSet(object.code) ? PlanCheckRunResultSuccess_Code.fromJSON(object.code) : undefined,+ statementTypeReport: isSet(object.statementTypeReport)+ ? PlanCheckRunResultSuccess_StatementTypeReport.fromJSON(object.statementTypeReport)+ : undefined,+ affectedRowsReport: isSet(object.affectedRowsReport)+ ? PlanCheckRunResultSuccess_AffectedRowsReport.fromJSON(object.affectedRowsReport)+ : undefined,+ sqlReviewReport: isSet(object.sqlReviewReport)+ ? PlanCheckRunResultSuccess_SqlReviewReport.fromJSON(object.sqlReviewReport)+ : undefined,+ };+ },++ toJSON(message: PlanCheckRunResultSuccess): unknown {+ const obj: any = {};+ message.status !== undefined && (obj.status = planCheckRunResultSuccess_StatusToJSON(message.status));+ message.title !== undefined && (obj.title = message.title);+ message.content !== undefined && (obj.content = message.content);+ message.code !== undefined &&+ (obj.code = message.code ? PlanCheckRunResultSuccess_Code.toJSON(message.code) : undefined);+ message.statementTypeReport !== undefined && (obj.statementTypeReport = message.statementTypeReport+ ? PlanCheckRunResultSuccess_StatementTypeReport.toJSON(message.statementTypeReport)+ : undefined);+ message.affectedRowsReport !== undefined && (obj.affectedRowsReport = message.affectedRowsReport+ ? PlanCheckRunResultSuccess_AffectedRowsReport.toJSON(message.affectedRowsReport)+ : undefined);+ message.sqlReviewReport !== undefined && (obj.sqlReviewReport = message.sqlReviewReport+ ? PlanCheckRunResultSuccess_SqlReviewReport.toJSON(message.sqlReviewReport)+ : undefined);+ return obj;+ },++ create(base?: DeepPartial<PlanCheckRunResultSuccess>): PlanCheckRunResultSuccess {+ return PlanCheckRunResultSuccess.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<PlanCheckRunResultSuccess>): PlanCheckRunResultSuccess {+ const message = createBasePlanCheckRunResultSuccess();+ message.status = object.status ?? 0;+ message.title = object.title ?? "";+ message.content = object.content ?? "";+ message.code = (object.code !== undefined && object.code !== null)+ ? PlanCheckRunResultSuccess_Code.fromPartial(object.code)+ : undefined;+ message.statementTypeReport = (object.statementTypeReport !== undefined && object.statementTypeReport !== null)+ ? PlanCheckRunResultSuccess_StatementTypeReport.fromPartial(object.statementTypeReport)+ : undefined;+ message.affectedRowsReport = (object.affectedRowsReport !== undefined && object.affectedRowsReport !== null)+ ? PlanCheckRunResultSuccess_AffectedRowsReport.fromPartial(object.affectedRowsReport)+ : undefined;+ message.sqlReviewReport = (object.sqlReviewReport !== undefined && object.sqlReviewReport !== null)+ ? PlanCheckRunResultSuccess_SqlReviewReport.fromPartial(object.sqlReviewReport)+ : undefined;+ return message;+ },+};++function createBasePlanCheckRunResultSuccess_Code(): PlanCheckRunResultSuccess_Code {+ return { code: 0, namespace: 0 };+}++export const PlanCheckRunResultSuccess_Code = {+ encode(message: PlanCheckRunResultSuccess_Code, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.code !== 0) {+ writer.uint32(8).int64(message.code);+ }+ if (message.namespace !== 0) {+ writer.uint32(16).int32(message.namespace);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): PlanCheckRunResultSuccess_Code {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBasePlanCheckRunResultSuccess_Code();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 8) {+ break;+ }++ message.code = longToNumber(reader.int64() as Long);+ continue;+ case 2:+ if (tag !== 16) {+ break;+ }++ message.namespace = reader.int32() as any;+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): PlanCheckRunResultSuccess_Code {+ return {+ code: isSet(object.code) ? Number(object.code) : 0,+ namespace: isSet(object.namespace) ? planCheckRunResultSuccess_Code_NamespaceFromJSON(object.namespace) : 0,+ };+ },++ toJSON(message: PlanCheckRunResultSuccess_Code): unknown {+ const obj: any = {};+ message.code !== undefined && (obj.code = Math.round(message.code));+ message.namespace !== undefined &&+ (obj.namespace = planCheckRunResultSuccess_Code_NamespaceToJSON(message.namespace));+ return obj;+ },++ create(base?: DeepPartial<PlanCheckRunResultSuccess_Code>): PlanCheckRunResultSuccess_Code {+ return PlanCheckRunResultSuccess_Code.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<PlanCheckRunResultSuccess_Code>): PlanCheckRunResultSuccess_Code {+ const message = createBasePlanCheckRunResultSuccess_Code();+ message.code = object.code ?? 0;+ message.namespace = object.namespace ?? 0;+ return message;+ },+};++function createBasePlanCheckRunResultSuccess_StatementTypeReport(): PlanCheckRunResultSuccess_StatementTypeReport {+ return { statementType: "" };+}++export const PlanCheckRunResultSuccess_StatementTypeReport = {+ encode(message: PlanCheckRunResultSuccess_StatementTypeReport, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.statementType !== "") {+ writer.uint32(10).string(message.statementType);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): PlanCheckRunResultSuccess_StatementTypeReport {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBasePlanCheckRunResultSuccess_StatementTypeReport();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.statementType = reader.string();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): PlanCheckRunResultSuccess_StatementTypeReport {+ return { statementType: isSet(object.statementType) ? String(object.statementType) : "" };+ },++ toJSON(message: PlanCheckRunResultSuccess_StatementTypeReport): unknown {+ const obj: any = {};+ message.statementType !== undefined && (obj.statementType = message.statementType);+ return obj;+ },++ create(+ base?: DeepPartial<PlanCheckRunResultSuccess_StatementTypeReport>,+ ): PlanCheckRunResultSuccess_StatementTypeReport {+ return PlanCheckRunResultSuccess_StatementTypeReport.fromPartial(base ?? {});+ },++ fromPartial(+ object: DeepPartial<PlanCheckRunResultSuccess_StatementTypeReport>,+ ): PlanCheckRunResultSuccess_StatementTypeReport {+ const message = createBasePlanCheckRunResultSuccess_StatementTypeReport();+ message.statementType = object.statementType ?? "";+ return message;+ },+};++function createBasePlanCheckRunResultSuccess_AffectedRowsReport(): PlanCheckRunResultSuccess_AffectedRowsReport {+ return { affectedRows: 0 };+}++export const PlanCheckRunResultSuccess_AffectedRowsReport = {+ encode(message: PlanCheckRunResultSuccess_AffectedRowsReport, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.affectedRows !== 0) {+ writer.uint32(8).int64(message.affectedRows);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): PlanCheckRunResultSuccess_AffectedRowsReport {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBasePlanCheckRunResultSuccess_AffectedRowsReport();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 8) {+ break;+ }++ message.affectedRows = longToNumber(reader.int64() as Long);+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): PlanCheckRunResultSuccess_AffectedRowsReport {+ return { affectedRows: isSet(object.affectedRows) ? Number(object.affectedRows) : 0 };+ },++ toJSON(message: PlanCheckRunResultSuccess_AffectedRowsReport): unknown {+ const obj: any = {};+ message.affectedRows !== undefined && (obj.affectedRows = Math.round(message.affectedRows));+ return obj;+ },++ create(+ base?: DeepPartial<PlanCheckRunResultSuccess_AffectedRowsReport>,+ ): PlanCheckRunResultSuccess_AffectedRowsReport {+ return PlanCheckRunResultSuccess_AffectedRowsReport.fromPartial(base ?? {});+ },++ fromPartial(+ object: DeepPartial<PlanCheckRunResultSuccess_AffectedRowsReport>,+ ): PlanCheckRunResultSuccess_AffectedRowsReport {+ const message = createBasePlanCheckRunResultSuccess_AffectedRowsReport();+ message.affectedRows = object.affectedRows ?? 0;+ return message;+ },+};++function createBasePlanCheckRunResultSuccess_SqlReviewReport(): PlanCheckRunResultSuccess_SqlReviewReport {+ return { line: 0, detail: "" };+}++export const PlanCheckRunResultSuccess_SqlReviewReport = {+ encode(message: PlanCheckRunResultSuccess_SqlReviewReport, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.line !== 0) {+ writer.uint32(8).int64(message.line);+ }+ if (message.detail !== "") {+ writer.uint32(18).string(message.detail);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): PlanCheckRunResultSuccess_SqlReviewReport {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBasePlanCheckRunResultSuccess_SqlReviewReport();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 8) {+ break;+ }++ message.line = longToNumber(reader.int64() as Long);+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.detail = reader.string();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): PlanCheckRunResultSuccess_SqlReviewReport {+ return {+ line: isSet(object.line) ? Number(object.line) : 0,+ detail: isSet(object.detail) ? String(object.detail) : "",+ };+ },++ toJSON(message: PlanCheckRunResultSuccess_SqlReviewReport): unknown {+ const obj: any = {};+ message.line !== undefined && (obj.line = Math.round(message.line));+ message.detail !== undefined && (obj.detail = message.detail);+ return obj;+ },++ create(base?: DeepPartial<PlanCheckRunResultSuccess_SqlReviewReport>): PlanCheckRunResultSuccess_SqlReviewReport {+ return PlanCheckRunResultSuccess_SqlReviewReport.fromPartial(base ?? {});+ },++ fromPartial(+ object: DeepPartial<PlanCheckRunResultSuccess_SqlReviewReport>,+ ): PlanCheckRunResultSuccess_SqlReviewReport {+ const message = createBasePlanCheckRunResultSuccess_SqlReviewReport();+ message.line = object.line ?? 0;+ message.detail = object.detail ?? "";+ return message;+ },+};++function createBasePlanCheckRunResultFailure(): PlanCheckRunResultFailure {+ return { title: "", content: "" };+}++export const PlanCheckRunResultFailure = {+ encode(message: PlanCheckRunResultFailure, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.title !== "") {+ writer.uint32(10).string(message.title);+ }+ if (message.content !== "") {+ writer.uint32(18).string(message.content);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): PlanCheckRunResultFailure {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBasePlanCheckRunResultFailure();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.title = reader.string();+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.content = reader.string();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): PlanCheckRunResultFailure {+ return {+ title: isSet(object.title) ? String(object.title) : "",+ content: isSet(object.content) ? String(object.content) : "",+ };+ },++ toJSON(message: PlanCheckRunResultFailure): unknown {+ const obj: any = {};+ message.title !== undefined && (obj.title = message.title);+ message.content !== undefined && (obj.content = message.content);+ return obj;+ },++ create(base?: DeepPartial<PlanCheckRunResultFailure>): PlanCheckRunResultFailure {+ return PlanCheckRunResultFailure.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<PlanCheckRunResultFailure>): PlanCheckRunResultFailure {+ const message = createBasePlanCheckRunResultFailure();+ message.title = object.title ?? "";+ message.content = object.content ?? "";+ return message;+ },+};++declare const self: any | undefined;+declare const window: any | undefined;+declare const global: any | undefined;+const tsProtoGlobalThis: any = (() => {+ if (typeof globalThis !== "undefined") {+ return globalThis;+ }+ if (typeof self !== "undefined") {+ return self;+ }+ if (typeof window !== "undefined") {+ return window;+ }+ if (typeof global !== "undefined") {+ return global;+ }+ throw "Unable to locate global object";+})();++type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;++export type DeepPartial<T> = T extends Builtin ? T+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }+ : Partial<T>;++function longToNumber(long: Long): number {+ if (long.gt(Number.MAX_SAFE_INTEGER)) {+ throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");+ }+ return long.toNumber();+}++// If you get a compile-error about 'Constructor<Long> and ... have no overlap',+// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.+if (_m0.util.Long !== Long) {+ _m0.util.Long = Long as any;+ _m0.configure();+}++function isSet(value: any): boolean {+ return value !== null && value !== undefined;+}diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex 32af129100..39a940e4ad 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -96,6 +96,20 @@- [PlanConfig.ChangeDatabaseConfig.Type](#bytebase-store-PlanConfig-ChangeDatabaseConfig-Type)+- [store/plan_check_run.proto](#store_plan_check_run-proto)+ - [PlanCheckRunConfig](#bytebase-store-PlanCheckRunConfig)+ - [PlanCheckRunResult](#bytebase-store-PlanCheckRunResult)+ - [PlanCheckRunResult.Result](#bytebase-store-PlanCheckRunResult-Result)+ - [PlanCheckRunResultFailure](#bytebase-store-PlanCheckRunResultFailure)+ - [PlanCheckRunResultSuccess](#bytebase-store-PlanCheckRunResultSuccess)+ - [PlanCheckRunResultSuccess.AffectedRowsReport](#bytebase-store-PlanCheckRunResultSuccess-AffectedRowsReport)+ - [PlanCheckRunResultSuccess.Code](#bytebase-store-PlanCheckRunResultSuccess-Code)+ - [PlanCheckRunResultSuccess.SqlReviewReport](#bytebase-store-PlanCheckRunResultSuccess-SqlReviewReport)+ - [PlanCheckRunResultSuccess.StatementTypeReport](#bytebase-store-PlanCheckRunResultSuccess-StatementTypeReport)++ - [PlanCheckRunResultSuccess.Code.Namespace](#bytebase-store-PlanCheckRunResultSuccess-Code-Namespace)+ - [PlanCheckRunResultSuccess.Status](#bytebase-store-PlanCheckRunResultSuccess-Status)+- [store/policy.proto](#store_policy-proto)- [Binding](#bytebase-store-Binding)- [IamPolicy](#bytebase-store-IamPolicy)@@ -1457,6 +1471,195 @@ Type is the database change type.+<a name="store_plan_check_run-proto"></a>+<p align="right"><a href="#top">Top</a></p>++## store/plan_check_run.proto++++<a name="bytebase-store-PlanCheckRunConfig"></a>++### PlanCheckRunConfig++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| sheet_id | [int32](#int32) | | |+| database_id | [int32](#int32) | | |+++++++<a name="bytebase-store-PlanCheckRunResult"></a>++### PlanCheckRunResult++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| results | [PlanCheckRunResult.Result](#bytebase-store-PlanCheckRunResult-Result) | repeated | |+++++++<a name="bytebase-store-PlanCheckRunResult-Result"></a>++### PlanCheckRunResult.Result++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| success | [PlanCheckRunResultSuccess](#bytebase-store-PlanCheckRunResultSuccess) | | |+| failure | [PlanCheckRunResultFailure](#bytebase-store-PlanCheckRunResultFailure) | | Failure if the PlanCheckRun itself failed to run. |+++++++<a name="bytebase-store-PlanCheckRunResultFailure"></a>++### PlanCheckRunResultFailure++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| title | [string](#string) | | |+| content | [string](#string) | | |+++++++<a name="bytebase-store-PlanCheckRunResultSuccess"></a>++### PlanCheckRunResultSuccess++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| status | [PlanCheckRunResultSuccess.Status](#bytebase-store-PlanCheckRunResultSuccess-Status) | | |+| title | [string](#string) | | |+| content | [string](#string) | | |+| code | [PlanCheckRunResultSuccess.Code](#bytebase-store-PlanCheckRunResultSuccess-Code) | | |+| statement_type_report | [PlanCheckRunResultSuccess.StatementTypeReport](#bytebase-store-PlanCheckRunResultSuccess-StatementTypeReport) | | |+| affected_rows_report | [PlanCheckRunResultSuccess.AffectedRowsReport](#bytebase-store-PlanCheckRunResultSuccess-AffectedRowsReport) | | |+| sql_review_report | [PlanCheckRunResultSuccess.SqlReviewReport](#bytebase-store-PlanCheckRunResultSuccess-SqlReviewReport) | | |+++++++<a name="bytebase-store-PlanCheckRunResultSuccess-AffectedRowsReport"></a>++### PlanCheckRunResultSuccess.AffectedRowsReport++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| affected_rows | [int64](#int64) | | |+++++++<a name="bytebase-store-PlanCheckRunResultSuccess-Code"></a>++### PlanCheckRunResultSuccess.Code++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| code | [int64](#int64) | | |+| namespace | [PlanCheckRunResultSuccess.Code.Namespace](#bytebase-store-PlanCheckRunResultSuccess-Code-Namespace) | | |+++++++<a name="bytebase-store-PlanCheckRunResultSuccess-SqlReviewReport"></a>++### PlanCheckRunResultSuccess.SqlReviewReport++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| line | [int64](#int64) | | |+| detail | [string](#string) | | |+++++++<a name="bytebase-store-PlanCheckRunResultSuccess-StatementTypeReport"></a>++### PlanCheckRunResultSuccess.StatementTypeReport++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| statement_type | [string](#string) | | |+++++++++<a name="bytebase-store-PlanCheckRunResultSuccess-Code-Namespace"></a>++### PlanCheckRunResultSuccess.Code.Namespace+++| Name | Number | Description |+| ---- | ------ | ----------- |+| NAMESPACE_UNSPECIFIED | 0 | |+| BYTEBASE | 1 | |+| ADVISOR | 2 | |++++<a name="bytebase-store-PlanCheckRunResultSuccess-Status"></a>++### PlanCheckRunResultSuccess.Status+++| Name | Number | Description |+| ---- | ------ | ----------- |+| STATUS_UNSPECIFIED | 0 | |+| ERROR | 1 | |+| WARNING | 2 | |+| SUCCESS | 3 | |++++++++++<a name="store_policy-proto"></a><p align="right"><a href="#top">Top</a></p>diff --git a/proto/generated-go/store/plan_check_run.pb.go b/proto/generated-go/store/plan_check_run.pb.gonew file mode 100644index 0000000000..55bb53dec9--- /dev/null+++ b/proto/generated-go/store/plan_check_run.pb.go@@ -0,0 +1,980 @@+// Code generated by protoc-gen-go. DO NOT EDIT.+// versions:+// protoc-gen-go v1.31.0+// protoc (unknown)+// source: store/plan_check_run.proto++package store++import (+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"+ reflect "reflect"+ sync "sync"+)++const (+ // Verify that this generated code is sufficiently up-to-date.+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)+ // Verify that runtime/protoimpl is sufficiently up-to-date.+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)+)++type PlanCheckRunResultSuccess_Status int32++const (+ PlanCheckRunResultSuccess_STATUS_UNSPECIFIED PlanCheckRunResultSuccess_Status = 0+ PlanCheckRunResultSuccess_ERROR PlanCheckRunResultSuccess_Status = 1+ PlanCheckRunResultSuccess_WARNING PlanCheckRunResultSuccess_Status = 2+ PlanCheckRunResultSuccess_SUCCESS PlanCheckRunResultSuccess_Status = 3+)++// Enum value maps for PlanCheckRunResultSuccess_Status.+var (+ PlanCheckRunResultSuccess_Status_name = map[int32]string{+ 0: "STATUS_UNSPECIFIED",+ 1: "ERROR",+ 2: "WARNING",+ 3: "SUCCESS",+ }+ PlanCheckRunResultSuccess_Status_value = map[string]int32{+ "STATUS_UNSPECIFIED": 0,+ "ERROR": 1,+ "WARNING": 2,+ "SUCCESS": 3,+ }+)++func (x PlanCheckRunResultSuccess_Status) Enum() *PlanCheckRunResultSuccess_Status {+ p := new(PlanCheckRunResultSuccess_Status)+ *p = x+ return p+}++func (x PlanCheckRunResultSuccess_Status) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (PlanCheckRunResultSuccess_Status) Descriptor() protoreflect.EnumDescriptor {+ return file_store_plan_check_run_proto_enumTypes[0].Descriptor()+}++func (PlanCheckRunResultSuccess_Status) Type() protoreflect.EnumType {+ return &file_store_plan_check_run_proto_enumTypes[0]+}++func (x PlanCheckRunResultSuccess_Status) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use PlanCheckRunResultSuccess_Status.Descriptor instead.+func (PlanCheckRunResultSuccess_Status) EnumDescriptor() ([]byte, []int) {+ return file_store_plan_check_run_proto_rawDescGZIP(), []int{2, 0}+}++type PlanCheckRunResultSuccess_Code_Namespace int32++const (+ PlanCheckRunResultSuccess_Code_NAMESPACE_UNSPECIFIED PlanCheckRunResultSuccess_Code_Namespace = 0+ PlanCheckRunResultSuccess_Code_BYTEBASE PlanCheckRunResultSuccess_Code_Namespace = 1+ PlanCheckRunResultSuccess_Code_ADVISOR PlanCheckRunResultSuccess_Code_Namespace = 2+)++// Enum value maps for PlanCheckRunResultSuccess_Code_Namespace.+var (+ PlanCheckRunResultSuccess_Code_Namespace_name = map[int32]string{+ 0: "NAMESPACE_UNSPECIFIED",+ 1: "BYTEBASE",+ 2: "ADVISOR",+ }+ PlanCheckRunResultSuccess_Code_Namespace_value = map[string]int32{+ "NAMESPACE_UNSPECIFIED": 0,+ "BYTEBASE": 1,+ "ADVISOR": 2,+ }+)++func (x PlanCheckRunResultSuccess_Code_Namespace) Enum() *PlanCheckRunResultSuccess_Code_Namespace {+ p := new(PlanCheckRunResultSuccess_Code_Namespace)+ *p = x+ return p+}++func (x PlanCheckRunResultSuccess_Code_Namespace) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (PlanCheckRunResultSuccess_Code_Namespace) Descriptor() protoreflect.EnumDescriptor {+ return file_store_plan_check_run_proto_enumTypes[1].Descriptor()+}++func (PlanCheckRunResultSuccess_Code_Namespace) Type() protoreflect.EnumType {+ return &file_store_plan_check_run_proto_enumTypes[1]+}++func (x PlanCheckRunResultSuccess_Code_Namespace) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use PlanCheckRunResultSuccess_Code_Namespace.Descriptor instead.+func (PlanCheckRunResultSuccess_Code_Namespace) EnumDescriptor() ([]byte, []int) {+ return file_store_plan_check_run_proto_rawDescGZIP(), []int{2, 0, 0}+}++type PlanCheckRunConfig struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ SheetId int32 `protobuf:"varint,1,opt,name=sheet_id,json=sheetId,proto3" json:"sheet_id,omitempty"`+ DatabaseId int32 `protobuf:"varint,2,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"`+}++func (x *PlanCheckRunConfig) Reset() {+ *x = PlanCheckRunConfig{}+ if protoimpl.UnsafeEnabled {+ mi := &file_store_plan_check_run_proto_msgTypes[0]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *PlanCheckRunConfig) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*PlanCheckRunConfig) ProtoMessage() {}++func (x *PlanCheckRunConfig) ProtoReflect() protoreflect.Message {+ mi := &file_store_plan_check_run_proto_msgTypes[0]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use PlanCheckRunConfig.ProtoReflect.Descriptor instead.+func (*PlanCheckRunConfig) Descriptor() ([]byte, []int) {+ return file_store_plan_check_run_proto_rawDescGZIP(), []int{0}+}++func (x *PlanCheckRunConfig) GetSheetId() int32 {+ if x != nil {+ return x.SheetId+ }+ return 0+}++func (x *PlanCheckRunConfig) GetDatabaseId() int32 {+ if x != nil {+ return x.DatabaseId+ }+ return 0+}++type PlanCheckRunResult struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ Results []*PlanCheckRunResult_Result `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`+}++func (x *PlanCheckRunResult) Reset() {+ *x = PlanCheckRunResult{}+ if protoimpl.UnsafeEnabled {+ mi := &file_store_plan_check_run_proto_msgTypes[1]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *PlanCheckRunResult) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*PlanCheckRunResult) ProtoMessage() {}++func (x *PlanCheckRunResult) ProtoReflect() protoreflect.Message {+ mi := &file_store_plan_check_run_proto_msgTypes[1]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use PlanCheckRunResult.ProtoReflect.Descriptor instead.+func (*PlanCheckRunResult) Descriptor() ([]byte, []int) {+ return file_store_plan_check_run_proto_rawDescGZIP(), []int{1}+}++func (x *PlanCheckRunResult) GetResults() []*PlanCheckRunResult_Result {+ if x != nil {+ return x.Results+ }+ return nil+}++type PlanCheckRunResultSuccess struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ Status PlanCheckRunResultSuccess_Status `protobuf:"varint,1,opt,name=status,proto3,enum=bytebase.store.PlanCheckRunResultSuccess_Status" json:"status,omitempty"`+ Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`+ Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`+ Code *PlanCheckRunResultSuccess_Code `protobuf:"bytes,4,opt,name=code,proto3" json:"code,omitempty"`+ // Types that are assignable to Report:+ //+ // *PlanCheckRunResultSuccess_StatementTypeReport_+ // *PlanCheckRunResultSuccess_AffectedRowsReport_+ // *PlanCheckRunResultSuccess_SqlReviewReport_+ Report isPlanCheckRunResultSuccess_Report `protobuf_oneof:"report"`+}++func (x *PlanCheckRunResultSuccess) Reset() {+ *x = PlanCheckRunResultSuccess{}+ if protoimpl.UnsafeEnabled {+ mi := &file_store_plan_check_run_proto_msgTypes[2]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *PlanCheckRunResultSuccess) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*PlanCheckRunResultSuccess) ProtoMessage() {}++func (x *PlanCheckRunResultSuccess) ProtoReflect() protoreflect.Message {+ mi := &file_store_plan_check_run_proto_msgTypes[2]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use PlanCheckRunResultSuccess.ProtoReflect.Descriptor instead.+func (*PlanCheckRunResultSuccess) Descriptor() ([]byte, []int) {+ return file_store_plan_check_run_proto_rawDescGZIP(), []int{2}+}++func (x *PlanCheckRunResultSuccess) GetStatus() PlanCheckRunResultSuccess_Status {+ if x != nil {+ return x.Status+ }+ return PlanCheckRunResultSuccess_STATUS_UNSPECIFIED+}++func (x *PlanCheckRunResultSuccess) GetTitle() string {+ if x != nil {+ return x.Title+ }+ return ""+}++func (x *PlanCheckRunResultSuccess) GetContent() string {+ if x != nil {+ return x.Content+ }+ return ""+}++func (x *PlanCheckRunResultSuccess) GetCode() *PlanCheckRunResultSuccess_Code {+ if x != nil {+ return x.Code+ }+ return nil+}++func (m *PlanCheckRunResultSuccess) GetReport() isPlanCheckRunResultSuccess_Report {+ if m != nil {+ return m.Report+ }+ return nil+}++func (x *PlanCheckRunResultSuccess) GetStatementTypeReport() *PlanCheckRunResultSuccess_StatementTypeReport {+ if x, ok := x.GetReport().(*PlanCheckRunResultSuccess_StatementTypeReport_); ok {+ return x.StatementTypeReport+ }+ return nil+}++func (x *PlanCheckRunResultSuccess) GetAffectedRowsReport() *PlanCheckRunResultSuccess_AffectedRowsReport {+ if x, ok := x.GetReport().(*PlanCheckRunResultSuccess_AffectedRowsReport_); ok {+ return x.AffectedRowsReport+ }+ return nil+}++func (x *PlanCheckRunResultSuccess) GetSqlReviewReport() *PlanCheckRunResultSuccess_SqlReviewReport {+ if x, ok := x.GetReport().(*PlanCheckRunResultSuccess_SqlReviewReport_); ok {+ return x.SqlReviewReport+ }+ return nil+}++type isPlanCheckRunResultSuccess_Report interface {+ isPlanCheckRunResultSuccess_Report()+}++type PlanCheckRunResultSuccess_StatementTypeReport_ struct {+ StatementTypeReport *PlanCheckRunResultSuccess_StatementTypeReport `protobuf:"bytes,5,opt,name=statement_type_report,json=statementTypeReport,proto3,oneof"`+}++type PlanCheckRunResultSuccess_AffectedRowsReport_ struct {+ AffectedRowsReport *PlanCheckRunResultSuccess_AffectedRowsReport `protobuf:"bytes,6,opt,name=affected_rows_report,json=affectedRowsReport,proto3,oneof"`+}++type PlanCheckRunResultSuccess_SqlReviewReport_ struct {+ SqlReviewReport *PlanCheckRunResultSuccess_SqlReviewReport `protobuf:"bytes,7,opt,name=sql_review_report,json=sqlReviewReport,proto3,oneof"`+}++func (*PlanCheckRunResultSuccess_StatementTypeReport_) isPlanCheckRunResultSuccess_Report() {}++func (*PlanCheckRunResultSuccess_AffectedRowsReport_) isPlanCheckRunResultSuccess_Report() {}++func (*PlanCheckRunResultSuccess_SqlReviewReport_) isPlanCheckRunResultSuccess_Report() {}++type PlanCheckRunResultFailure struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`+ Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`+}++func (x *PlanCheckRunResultFailure) Reset() {+ *x = PlanCheckRunResultFailure{}+ if protoimpl.UnsafeEnabled {+ mi := &file_store_plan_check_run_proto_msgTypes[3]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *PlanCheckRunResultFailure) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*PlanCheckRunResultFailure) ProtoMessage() {}++func (x *PlanCheckRunResultFailure) ProtoReflect() protoreflect.Message {+ mi := &file_store_plan_check_run_proto_msgTypes[3]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use PlanCheckRunResultFailure.ProtoReflect.Descriptor instead.+func (*PlanCheckRunResultFailure) Descriptor() ([]byte, []int) {+ return file_store_plan_check_run_proto_rawDescGZIP(), []int{3}+}++func (x *PlanCheckRunResultFailure) GetTitle() string {+ if x != nil {+ return x.Title+ }+ return ""+}++func (x *PlanCheckRunResultFailure) GetContent() string {+ if x != nil {+ return x.Content+ }+ return ""+}++type PlanCheckRunResult_Result struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // Types that are assignable to Result:+ //+ // *PlanCheckRunResult_Result_Success+ // *PlanCheckRunResult_Result_Failure+ Result isPlanCheckRunResult_Result_Result `protobuf_oneof:"result"`+}++func (x *PlanCheckRunResult_Result) Reset() {+ *x = PlanCheckRunResult_Result{}+ if protoimpl.UnsafeEnabled {+ mi := &file_store_plan_check_run_proto_msgTypes[4]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *PlanCheckRunResult_Result) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*PlanCheckRunResult_Result) ProtoMessage() {}++func (x *PlanCheckRunResult_Result) ProtoReflect() protoreflect.Message {+ mi := &file_store_plan_check_run_proto_msgTypes[4]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use PlanCheckRunResult_Result.ProtoReflect.Descriptor instead.+func (*PlanCheckRunResult_Result) Descriptor() ([]byte, []int) {+ return file_store_plan_check_run_proto_rawDescGZIP(), []int{1, 0}+}++func (m *PlanCheckRunResult_Result) GetResult() isPlanCheckRunResult_Result_Result {+ if m != nil {+ return m.Result+ }+ return nil+}++func (x *PlanCheckRunResult_Result) GetSuccess() *PlanCheckRunResultSuccess {+ if x, ok := x.GetResult().(*PlanCheckRunResult_Result_Success); ok {+ return x.Success+ }+ return nil+}++func (x *PlanCheckRunResult_Result) GetFailure() *PlanCheckRunResultFailure {+ if x, ok := x.GetResult().(*PlanCheckRunResult_Result_Failure); ok {+ return x.Failure+ }+ return nil+}++type isPlanCheckRunResult_Result_Result interface {+ isPlanCheckRunResult_Result_Result()+}++type PlanCheckRunResult_Result_Success struct {+ Success *PlanCheckRunResultSuccess `protobuf:"bytes,1,opt,name=success,proto3,oneof"`+}++type PlanCheckRunResult_Result_Failure struct {+ // Failure if the PlanCheckRun itself failed to run.+ Failure *PlanCheckRunResultFailure `protobuf:"bytes,2,opt,name=failure,proto3,oneof"`+}++func (*PlanCheckRunResult_Result_Success) isPlanCheckRunResult_Result_Result() {}++func (*PlanCheckRunResult_Result_Failure) isPlanCheckRunResult_Result_Result() {}++type PlanCheckRunResultSuccess_Code struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`+ Namespace PlanCheckRunResultSuccess_Code_Namespace `protobuf:"varint,2,opt,name=namespace,proto3,enum=bytebase.store.PlanCheckRunResultSuccess_Code_Namespace" json:"namespace,omitempty"`+}++func (x *PlanCheckRunResultSuccess_Code) Reset() {+ *x = PlanCheckRunResultSuccess_Code{}+ if protoimpl.UnsafeEnabled {+ mi := &file_store_plan_check_run_proto_msgTypes[5]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *PlanCheckRunResultSuccess_Code) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*PlanCheckRunResultSuccess_Code) ProtoMessage() {}++func (x *PlanCheckRunResultSuccess_Code) ProtoReflect() protoreflect.Message {+ mi := &file_store_plan_check_run_proto_msgTypes[5]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use PlanCheckRunResultSuccess_Code.ProtoReflect.Descriptor instead.+func (*PlanCheckRunResultSuccess_Code) Descriptor() ([]byte, []int) {+ return file_store_plan_check_run_proto_rawDescGZIP(), []int{2, 0}+}++func (x *PlanCheckRunResultSuccess_Code) GetCode() int64 {+ if x != nil {+ return x.Code+ }+ return 0+}++func (x *PlanCheckRunResultSuccess_Code) GetNamespace() PlanCheckRunResultSuccess_Code_Namespace {+ if x != nil {+ return x.Namespace+ }+ return PlanCheckRunResultSuccess_Code_NAMESPACE_UNSPECIFIED+}++type PlanCheckRunResultSuccess_StatementTypeReport struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ StatementType string `protobuf:"bytes,1,opt,name=statement_type,json=statementType,proto3" json:"statement_type,omitempty"`+}++func (x *PlanCheckRunResultSuccess_StatementTypeReport) Reset() {+ *x = PlanCheckRunResultSuccess_StatementTypeReport{}+ if protoimpl.UnsafeEnabled {+ mi := &file_store_plan_check_run_proto_msgTypes[6]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *PlanCheckRunResultSuccess_StatementTypeReport) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*PlanCheckRunResultSuccess_StatementTypeReport) ProtoMessage() {}++func (x *PlanCheckRunResultSuccess_StatementTypeReport) ProtoReflect() protoreflect.Message {+ mi := &file_store_plan_check_run_proto_msgTypes[6]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use PlanCheckRunResultSuccess_StatementTypeReport.ProtoReflect.Descriptor instead.+func (*PlanCheckRunResultSuccess_StatementTypeReport) Descriptor() ([]byte, []int) {+ return file_store_plan_check_run_proto_rawDescGZIP(), []int{2, 1}+}++func (x *PlanCheckRunResultSuccess_StatementTypeReport) GetStatementType() string {+ if x != nil {+ return x.StatementType+ }+ return ""+}++type PlanCheckRunResultSuccess_AffectedRowsReport struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ AffectedRows int64 `protobuf:"varint,1,opt,name=affected_rows,json=affectedRows,proto3" json:"affected_rows,omitempty"`+}++func (x *PlanCheckRunResultSuccess_AffectedRowsReport) Reset() {+ *x = PlanCheckRunResultSuccess_AffectedRowsReport{}+ if protoimpl.UnsafeEnabled {+ mi := &file_store_plan_check_run_proto_msgTypes[7]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *PlanCheckRunResultSuccess_AffectedRowsReport) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*PlanCheckRunResultSuccess_AffectedRowsReport) ProtoMessage() {}++func (x *PlanCheckRunResultSuccess_AffectedRowsReport) ProtoReflect() protoreflect.Message {+ mi := &file_store_plan_check_run_proto_msgTypes[7]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use PlanCheckRunResultSuccess_AffectedRowsReport.ProtoReflect.Descriptor instead.+func (*PlanCheckRunResultSuccess_AffectedRowsReport) Descriptor() ([]byte, []int) {+ return file_store_plan_check_run_proto_rawDescGZIP(), []int{2, 2}+}++func (x *PlanCheckRunResultSuccess_AffectedRowsReport) GetAffectedRows() int64 {+ if x != nil {+ return x.AffectedRows+ }+ return 0+}++type PlanCheckRunResultSuccess_SqlReviewReport struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ Line int64 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"`+ Detail string `protobuf:"bytes,2,opt,name=detail,proto3" json:"detail,omitempty"`+}++func (x *PlanCheckRunResultSuccess_SqlReviewReport) Reset() {+ *x = PlanCheckRunResultSuccess_SqlReviewReport{}+ if protoimpl.UnsafeEnabled {+ mi := &file_store_plan_check_run_proto_msgTypes[8]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *PlanCheckRunResultSuccess_SqlReviewReport) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*PlanCheckRunResultSuccess_SqlReviewReport) ProtoMessage() {}++func (x *PlanCheckRunResultSuccess_SqlReviewReport) ProtoReflect() protoreflect.Message {+ mi := &file_store_plan_check_run_proto_msgTypes[8]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use PlanCheckRunResultSuccess_SqlReviewReport.ProtoReflect.Descriptor instead.+func (*PlanCheckRunResultSuccess_SqlReviewReport) Descriptor() ([]byte, []int) {+ return file_store_plan_check_run_proto_rawDescGZIP(), []int{2, 3}+}++func (x *PlanCheckRunResultSuccess_SqlReviewReport) GetLine() int64 {+ if x != nil {+ return x.Line+ }+ return 0+}++func (x *PlanCheckRunResultSuccess_SqlReviewReport) GetDetail() string {+ if x != nil {+ return x.Detail+ }+ return ""+}++var File_store_plan_check_run_proto protoreflect.FileDescriptor++var file_store_plan_check_run_proto_rawDesc = []byte{+ 0x0a, 0x1a, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x63, 0x68, 0x65,+ 0x63, 0x6b, 0x5f, 0x72, 0x75, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x50, 0x0a, 0x12,+ 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x43, 0x6f, 0x6e, 0x66,+ 0x69, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x68, 0x65, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01,+ 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x68, 0x65, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a,+ 0x0b, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,+ 0x28, 0x05, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x64, 0x22, 0xfc,+ 0x01, 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, 0x1a, 0xa0, 0x01, 0x0a, 0x06, 0x52,+ 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x45, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73,+ 0x18, 0x01, 0x20, 0x01, 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, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73,+ 0x73, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x45, 0x0a, 0x07,+ 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 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, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x07, 0x66, 0x61, 0x69, 0x6c,+ 0x75, 0x72, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xea, 0x07,+ 0x0a, 0x19, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65,+ 0x73, 0x75, 0x6c, 0x74, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 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, 0x53,+ 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 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, 0x42, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20,+ 0x01, 0x28, 0x0b, 0x32, 0x2e, 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, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x2e, 0x43,+ 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x73, 0x0a, 0x15, 0x73, 0x74, 0x61,+ 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f,+ 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 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, 0x53, 0x75, 0x63, 0x63,+ 0x65, 0x73, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70,+ 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x00, 0x52, 0x13, 0x73, 0x74, 0x61, 0x74, 0x65,+ 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x70,+ 0x0a, 0x14, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f,+ 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 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,+ 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x2e, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64,+ 0x52, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x00, 0x52, 0x12, 0x61, 0x66,+ 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x73, 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, 0x07, 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, 0x53,+ 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 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, 0xb5, 0x01, 0x0a, 0x04, 0x43, 0x6f,+ 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,+ 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x56, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70,+ 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 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, 0x53, 0x75, 0x63,+ 0x63, 0x65, 0x73, 0x73, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70,+ 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x41,+ 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x4e,+ 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,+ 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x59, 0x54, 0x45, 0x42, 0x41,+ 0x53, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x44, 0x56, 0x49, 0x53, 0x4f, 0x52, 0x10,+ 0x02, 0x1a, 0x3c, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79,+ 0x70, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74,+ 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,+ 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x1a,+ 0x39, 0x0a, 0x12, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x73, 0x52,+ 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65,+ 0x64, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x61, 0x66,+ 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x73, 0x1a, 0x3d, 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, 0x03, 0x52, 0x04, 0x6c, 0x69, 0x6e,+ 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28,+ 0x09, 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 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, 0x22, 0x4b, 0x0a, 0x19, 0x50, 0x6c,+ 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,+ 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65,+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a,+ 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,+ 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 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 (+ file_store_plan_check_run_proto_rawDescOnce sync.Once+ file_store_plan_check_run_proto_rawDescData = file_store_plan_check_run_proto_rawDesc+)++func file_store_plan_check_run_proto_rawDescGZIP() []byte {+ file_store_plan_check_run_proto_rawDescOnce.Do(func() {+ file_store_plan_check_run_proto_rawDescData = protoimpl.X.CompressGZIP(file_store_plan_check_run_proto_rawDescData)+ })+ return file_store_plan_check_run_proto_rawDescData+}++var file_store_plan_check_run_proto_enumTypes = make([]protoimpl.EnumInfo, 2)+var file_store_plan_check_run_proto_msgTypes = make([]protoimpl.MessageInfo, 9)+var file_store_plan_check_run_proto_goTypes = []interface{}{+ (PlanCheckRunResultSuccess_Status)(0), // 0: bytebase.store.PlanCheckRunResultSuccess.Status+ (PlanCheckRunResultSuccess_Code_Namespace)(0), // 1: bytebase.store.PlanCheckRunResultSuccess.Code.Namespace+ (*PlanCheckRunConfig)(nil), // 2: bytebase.store.PlanCheckRunConfig+ (*PlanCheckRunResult)(nil), // 3: bytebase.store.PlanCheckRunResult+ (*PlanCheckRunResultSuccess)(nil), // 4: bytebase.store.PlanCheckRunResultSuccess+ (*PlanCheckRunResultFailure)(nil), // 5: bytebase.store.PlanCheckRunResultFailure+ (*PlanCheckRunResult_Result)(nil), // 6: bytebase.store.PlanCheckRunResult.Result+ (*PlanCheckRunResultSuccess_Code)(nil), // 7: bytebase.store.PlanCheckRunResultSuccess.Code+ (*PlanCheckRunResultSuccess_StatementTypeReport)(nil), // 8: bytebase.store.PlanCheckRunResultSuccess.StatementTypeReport+ (*PlanCheckRunResultSuccess_AffectedRowsReport)(nil), // 9: bytebase.store.PlanCheckRunResultSuccess.AffectedRowsReport+ (*PlanCheckRunResultSuccess_SqlReviewReport)(nil), // 10: bytebase.store.PlanCheckRunResultSuccess.SqlReviewReport+}+var file_store_plan_check_run_proto_depIdxs = []int32{+ 6, // 0: bytebase.store.PlanCheckRunResult.results:type_name -> bytebase.store.PlanCheckRunResult.Result+ 0, // 1: bytebase.store.PlanCheckRunResultSuccess.status:type_name -> bytebase.store.PlanCheckRunResultSuccess.Status+ 7, // 2: bytebase.store.PlanCheckRunResultSuccess.code:type_name -> bytebase.store.PlanCheckRunResultSuccess.Code+ 8, // 3: bytebase.store.PlanCheckRunResultSuccess.statement_type_report:type_name -> bytebase.store.PlanCheckRunResultSuccess.StatementTypeReport+ 9, // 4: bytebase.store.PlanCheckRunResultSuccess.affected_rows_report:type_name -> bytebase.store.PlanCheckRunResultSuccess.AffectedRowsReport+ 10, // 5: bytebase.store.PlanCheckRunResultSuccess.sql_review_report:type_name -> bytebase.store.PlanCheckRunResultSuccess.SqlReviewReport+ 4, // 6: bytebase.store.PlanCheckRunResult.Result.success:type_name -> bytebase.store.PlanCheckRunResultSuccess+ 5, // 7: bytebase.store.PlanCheckRunResult.Result.failure:type_name -> bytebase.store.PlanCheckRunResultFailure+ 1, // 8: bytebase.store.PlanCheckRunResultSuccess.Code.namespace:type_name -> bytebase.store.PlanCheckRunResultSuccess.Code.Namespace+ 9, // [9:9] is the sub-list for method output_type+ 9, // [9:9] is the sub-list for method input_type+ 9, // [9:9] is the sub-list for extension type_name+ 9, // [9:9] is the sub-list for extension extendee+ 0, // [0:9] is the sub-list for field type_name+}++func init() { file_store_plan_check_run_proto_init() }+func file_store_plan_check_run_proto_init() {+ if File_store_plan_check_run_proto != nil {+ return+ }+ if !protoimpl.UnsafeEnabled {+ file_store_plan_check_run_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*PlanCheckRunConfig); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_store_plan_check_run_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*PlanCheckRunResult); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_store_plan_check_run_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*PlanCheckRunResultSuccess); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_store_plan_check_run_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*PlanCheckRunResultFailure); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_store_plan_check_run_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*PlanCheckRunResult_Result); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_store_plan_check_run_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*PlanCheckRunResultSuccess_Code); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_store_plan_check_run_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*PlanCheckRunResultSuccess_StatementTypeReport); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_store_plan_check_run_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*PlanCheckRunResultSuccess_AffectedRowsReport); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_store_plan_check_run_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*PlanCheckRunResultSuccess_SqlReviewReport); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ }+ file_store_plan_check_run_proto_msgTypes[2].OneofWrappers = []interface{}{+ (*PlanCheckRunResultSuccess_StatementTypeReport_)(nil),+ (*PlanCheckRunResultSuccess_AffectedRowsReport_)(nil),+ (*PlanCheckRunResultSuccess_SqlReviewReport_)(nil),+ }+ file_store_plan_check_run_proto_msgTypes[4].OneofWrappers = []interface{}{+ (*PlanCheckRunResult_Result_Success)(nil),+ (*PlanCheckRunResult_Result_Failure)(nil),+ }+ type x struct{}+ out := protoimpl.TypeBuilder{+ File: protoimpl.DescBuilder{+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),+ RawDescriptor: file_store_plan_check_run_proto_rawDesc,+ NumEnums: 2,+ NumMessages: 9,+ NumExtensions: 0,+ NumServices: 0,+ },+ GoTypes: file_store_plan_check_run_proto_goTypes,+ DependencyIndexes: file_store_plan_check_run_proto_depIdxs,+ EnumInfos: file_store_plan_check_run_proto_enumTypes,+ MessageInfos: file_store_plan_check_run_proto_msgTypes,+ }.Build()+ File_store_plan_check_run_proto = out.File+ file_store_plan_check_run_proto_rawDesc = nil+ file_store_plan_check_run_proto_goTypes = nil+ file_store_plan_check_run_proto_depIdxs = nil+}diff --git a/proto/store/plan_check_run.proto b/proto/store/plan_check_run.protonew file mode 100644index 0000000000..3e66d3f364--- /dev/null+++ b/proto/store/plan_check_run.proto@@ -0,0 +1,65 @@+syntax = "proto3";++package bytebase.store;++option go_package = "generated-go/store";++message PlanCheckRunConfig {+ int32 sheet_id = 1;+ int32 database_id = 2;+}++message PlanCheckRunResult {+ repeated Result results = 1;++ message Result {+ oneof result {+ PlanCheckRunResultSuccess success = 1;+ // Failure if the PlanCheckRun itself failed to run.+ PlanCheckRunResultFailure failure = 2;+ }+ }+}++message PlanCheckRunResultSuccess {+ enum Status {+ STATUS_UNSPECIFIED = 0;+ ERROR = 1;+ WARNING = 2;+ SUCCESS = 3;+ }+ Status status = 1;+ string title = 2;+ string content = 3;+ message Code {+ int64 code = 1;+ enum Namespace {+ NAMESPACE_UNSPECIFIED = 0;+ BYTEBASE = 1;+ ADVISOR = 2;+ }+ Namespace namespace = 2;+ }+ Code code = 4;++ oneof report {+ StatementTypeReport statement_type_report = 5;+ AffectedRowsReport affected_rows_report = 6;+ SqlReviewReport sql_review_report = 7;+ }+ message StatementTypeReport {+ string statement_type = 1;+ }+ message AffectedRowsReport {+ int64 affected_rows = 1;+ }+ message SqlReviewReport {+ int64 line = 1;+ string detail = 2;+ }+}++message PlanCheckRunResultFailure {+ string title = 1;+ string content = 2;+}