Skip to content

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

feat: sql position in plan check (#12776)

p0ny91a5d65653a5
diff --git a/backend/api/v1/rollout_service_converter.go b/backend/api/v1/rollout_service_converter.go
index a646d34702..d7879ecad3 100644
--- a/backend/api/v1/rollout_service_converter.go
+++ b/backend/api/v1/rollout_service_converter.go
@@ -395,10 +395,12 @@ func convertToPlanCheckRunResult(result *storepb.PlanCheckRunResult_Result) *v1p
case *storepb.PlanCheckRunResult_Result_SqlReviewReport_:
resultV1.Report = &v1pb.PlanCheckRun_Result_SqlReviewReport_{
SqlReviewReport: &v1pb.PlanCheckRun_Result_SqlReviewReport{
- Line: report.SqlReviewReport.Line,
- Column: report.SqlReviewReport.Column,
- Detail: report.SqlReviewReport.Detail,
- Code: report.SqlReviewReport.Code,
+ Line: report.SqlReviewReport.Line,
+ Column: report.SqlReviewReport.Column,
+ Detail: report.SqlReviewReport.Detail,
+ Code: report.SqlReviewReport.Code,
+ StartPosition: convertAdvicePosition(report.SqlReviewReport.StartPosition),
+ EndPosition: convertAdvicePosition(report.SqlReviewReport.EndPosition),
},
}
}
diff --git a/backend/runner/plancheck/statement_advise_executor.go b/backend/runner/plancheck/statement_advise_executor.go
index 690f6e1935..83cceba503 100644
--- a/backend/runner/plancheck/statement_advise_executor.go
+++ b/backend/runner/plancheck/statement_advise_executor.go
@@ -190,10 +190,12 @@ func (e *StatementAdviseExecutor) runForDatabaseTarget(ctx context.Context, conf
Code: 0,
Report: &storepb.PlanCheckRunResult_Result_SqlReviewReport_{
SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
- Line: advice.GetStartPosition().GetLine(),
- Column: advice.GetStartPosition().GetColumn(),
- Code: advice.Code,
- Detail: advice.Detail,
+ Line: advice.GetStartPosition().GetLine(),
+ Column: advice.GetStartPosition().GetColumn(),
+ Code: advice.Code,
+ Detail: advice.Detail,
+ StartPosition: advice.StartPosition,
+ EndPosition: advice.EndPosition,
},
},
})
@@ -370,10 +372,12 @@ func (e *StatementAdviseExecutor) runForDatabaseGroupTarget(ctx context.Context,
Code: 0,
Report: &storepb.PlanCheckRunResult_Result_SqlReviewReport_{
SqlReviewReport: &storepb.PlanCheckRunResult_Result_SqlReviewReport{
- Line: advice.GetStartPosition().GetLine(),
- Column: advice.GetStartPosition().GetColumn(),
- Code: advice.Code,
- Detail: advice.Detail,
+ Line: advice.GetStartPosition().GetLine(),
+ Column: advice.GetStartPosition().GetColumn(),
+ Code: advice.Code,
+ Detail: advice.Detail,
+ StartPosition: advice.StartPosition,
+ EndPosition: advice.EndPosition,
},
},
})
diff --git a/backend/tests/test-data/sql_review_mysql.yaml b/backend/tests/test-data/sql_review_mysql.yaml
index ba294824da..92c03b2659 100644
--- a/backend/tests/test-data/sql_review_mysql.yaml
+++ b/backend/tests/test-data/sql_review_mysql.yaml
@@ -2,21 +2,25 @@
result:
- |-
{
- "status": "SUCCESS",
- "title": "OK"
+ "status": "SUCCESS",
+ "title": "OK"
}
run: false
- statement: CREATE TABLE user(id);
result:
- |-
{
- "status": "ERROR",
- "title": "Syntax error",
- "content": "Syntax error at line 1:20 \nrelated text: CREATE TABLE user(id)",
- "sqlReviewReport": {
- "line": 1,
- "column": 20,
- "code": 201
+ "status": "ERROR",
+ "title": "Syntax error",
+ "content": "Syntax error at line 1:20 \nrelated text: CREATE TABLE user(id)",
+ "sqlReviewReport": {
+ "line": 1,
+ "column": 20,
+ "code": 201,
+ "startPosition": {
+ "line": 1,
+ "column": 20
+ }
}
}
run: false
@@ -24,252 +28,327 @@
result:
- |-
{
- "status": "ERROR",
- "title": "engine.mysql.use-innodb",
- "content": "\"CREATE TABLE userTable(id INT NOT NULL,name VARCHAR(255) CHARSET ascii,roomId INT,time_created TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',time_updated TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',content BLOB NOT NULL COMMENT 'comment',json_content JSON NOT NULL COMMENT 'comment',INDEX idx1(name),UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;\" doesn't use InnoDB engine",
- "sqlReviewReport": {
- "line": 1,
- "code": 501
+ "status": "ERROR",
+ "title": "engine.mysql.use-innodb",
+ "content": "\"CREATE TABLE userTable(id INT NOT NULL,name VARCHAR(255) CHARSET ascii,roomId INT,time_created TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',time_updated TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',content BLOB NOT NULL COMMENT 'comment',json_content JSON NOT NULL COMMENT 'comment',INDEX idx1(name),UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;\" doesn't use InnoDB engine",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 501,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "ERROR",
- "title": "table.require-pk",
- "content": "Table `userTable` requires PRIMARY KEY",
- "sqlReviewReport": {
- "line": 1,
- "code": 601
+ "status": "ERROR",
+ "title": "table.require-pk",
+ "content": "Table `userTable` requires PRIMARY KEY",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 601,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "ERROR",
- "title": "table.no-foreign-key",
- "content": "Foreign key is not allowed in the table `userTable`",
- "sqlReviewReport": {
- "line": 1,
- "code": 602
+ "status": "ERROR",
+ "title": "table.no-foreign-key",
+ "content": "Foreign key is not allowed in the table `userTable`",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 602,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "ERROR",
- "title": "column.type-disallow-list",
- "content": "Disallow column type JSON but column `userTable`.`json_content` is",
- "sqlReviewReport": {
- "line": 1,
- "code": 411
+ "status": "ERROR",
+ "title": "column.type-disallow-list",
+ "content": "Disallow column type JSON but column `userTable`.`json_content` is",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 411,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "naming.table",
- "content": "`userTable` mismatches table naming convention, naming format should be \"^[a-z]+(_[a-z]+)*$\"",
- "sqlReviewReport": {
- "line": 1,
- "code": 301
+ "status": "WARNING",
+ "title": "naming.table",
+ "content": "`userTable` mismatches table naming convention, naming format should be \"^[a-z]+(_[a-z]+)*$\"",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 301,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "naming.column",
- "content": "`userTable`.`roomId` mismatches column naming convention, naming format should be \"^[a-z]+(_[a-z]+)*$\"",
- "sqlReviewReport": {
- "line": 1,
- "code": 302
+ "status": "WARNING",
+ "title": "naming.column",
+ "content": "`userTable`.`roomId` mismatches column naming convention, naming format should be \"^[a-z]+(_[a-z]+)*$\"",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 302,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "naming.index.idx",
- "content": "Index in table `userTable` mismatches the naming convention, expect \"^$|^idx_userTable_name$\" but found `idx1`",
- "sqlReviewReport": {
- "line": 1,
- "code": 303
+ "status": "WARNING",
+ "title": "naming.index.idx",
+ "content": "Index in table `userTable` mismatches the naming convention, expect \"^$|^idx_userTable_name$\" but found `idx1`",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 303,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "naming.index.uk",
- "content": "Unique key in table `userTable` mismatches the naming convention, expect \"^$|^uk_userTable_id_name$\" but found `uk1`",
- "sqlReviewReport": {
- "line": 1,
- "code": 304
+ "status": "WARNING",
+ "title": "naming.index.uk",
+ "content": "Unique key in table `userTable` mismatches the naming convention, expect \"^$|^uk_userTable_id_name$\" but found `uk1`",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 304,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "naming.index.fk",
- "content": "Foreign key in table `userTable` mismatches the naming convention, expect \"^$|^fk_userTable_roomId_room_id$\" but found `fk1`",
- "sqlReviewReport": {
- "line": 1,
- "code": 305
+ "status": "WARNING",
+ "title": "naming.index.fk",
+ "content": "Foreign key in table `userTable` mismatches the naming convention, expect \"^$|^fk_userTable_roomId_room_id$\" but found `fk1`",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 305,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "table.comment",
- "content": "Table `userTable` requires comments",
- "sqlReviewReport": {
- "line": 1,
- "code": 605
+ "status": "WARNING",
+ "title": "table.comment",
+ "content": "Table `userTable` requires comments",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 605,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.required",
- "content": "Table `userTable` requires columns: created_ts, creator_id, updated_ts, updater_id",
- "sqlReviewReport": {
- "line": 1,
- "code": 401
+ "status": "WARNING",
+ "title": "column.required",
+ "content": "Table `userTable` requires columns: created_ts, creator_id, updated_ts, updater_id",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 401,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.no-null",
- "content": "`userTable`.`name` cannot have NULL value",
- "sqlReviewReport": {
- "line": 1,
- "code": 402
+ "status": "WARNING",
+ "title": "column.no-null",
+ "content": "`userTable`.`name` cannot have NULL value",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 402,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.no-null",
- "content": "`userTable`.`roomId` cannot have NULL value",
- "sqlReviewReport": {
- "line": 1,
- "code": 402
+ "status": "WARNING",
+ "title": "column.no-null",
+ "content": "`userTable`.`roomId` cannot have NULL value",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 402,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.set-default-for-not-null",
- "content": "Column `userTable`.`id` is NOT NULL but doesn't have DEFAULT",
- "sqlReviewReport": {
- "line": 1,
- "code": 404
+ "status": "WARNING",
+ "title": "column.set-default-for-not-null",
+ "content": "Column `userTable`.`id` is NOT NULL but doesn't have DEFAULT",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 404,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.comment",
- "content": "Column `userTable`.`id` requires comments",
- "sqlReviewReport": {
- "line": 1,
- "code": 408
+ "status": "WARNING",
+ "title": "column.comment",
+ "content": "Column `userTable`.`id` requires comments",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 408,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.comment",
- "content": "Column `userTable`.`name` requires comments",
- "sqlReviewReport": {
- "line": 1,
- "code": 408
+ "status": "WARNING",
+ "title": "column.comment",
+ "content": "Column `userTable`.`name` requires comments",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 408,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.comment",
- "content": "Column `userTable`.`roomId` requires comments",
- "sqlReviewReport": {
- "line": 1,
- "code": 408
+ "status": "WARNING",
+ "title": "column.comment",
+ "content": "Column `userTable`.`roomId` requires comments",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 408,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.disallow-set-charset",
- "content": "Disallow set column charset but \"CREATE TABLE userTable(id INT NOT NULL,name VARCHAR(255) CHARSET ascii,roomId INT,time_created TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',time_updated TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',content BLOB NOT NULL COMMENT 'comment',json_content JSON NOT NULL COMMENT 'comment',INDEX idx1(name),UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;\" does",
- "sqlReviewReport": {
- "line": 1,
- "code": 414
+ "status": "WARNING",
+ "title": "column.disallow-set-charset",
+ "content": "Disallow set column charset but \"CREATE TABLE userTable(id INT NOT NULL,name VARCHAR(255) CHARSET ascii,roomId INT,time_created TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',time_updated TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',content BLOB NOT NULL COMMENT 'comment',json_content JSON NOT NULL COMMENT 'comment',INDEX idx1(name),UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;\" does",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 414,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.current-time-count-limit",
- "content": "Table `userTable` has 2 ON UPDATE CURRENT_TIMESTAMP() columns. The count greater than 1.",
- "sqlReviewReport": {
- "line": 1,
- "code": 419
+ "status": "WARNING",
+ "title": "column.current-time-count-limit",
+ "content": "Table `userTable` has 2 ON UPDATE CURRENT_TIMESTAMP() columns. The count greater than 1.",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 419,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.require-default",
- "content": "Column `userTable`.`id` doesn't have DEFAULT.",
- "sqlReviewReport": {
- "line": 1,
- "code": 420
+ "status": "WARNING",
+ "title": "column.require-default",
+ "content": "Column `userTable`.`id` doesn't have DEFAULT.",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 420,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.require-default",
- "content": "Column `userTable`.`name` doesn't have DEFAULT.",
- "sqlReviewReport": {
- "line": 1,
- "code": 420
+ "status": "WARNING",
+ "title": "column.require-default",
+ "content": "Column `userTable`.`name` doesn't have DEFAULT.",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 420,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.require-default",
- "content": "Column `userTable`.`roomId` doesn't have DEFAULT.",
- "sqlReviewReport": {
- "line": 1,
- "code": 420
+ "status": "WARNING",
+ "title": "column.require-default",
+ "content": "Column `userTable`.`roomId` doesn't have DEFAULT.",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 420,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "index.type-no-blob",
- "content": "Columns in index must not be BLOB but `userTable`.`content` is blob",
- "sqlReviewReport": {
- "line": 1,
- "code": 804
+ "status": "WARNING",
+ "title": "index.type-no-blob",
+ "content": "Columns in index must not be BLOB but `userTable`.`content` is blob",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 804,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "system.charset.allowlist",
- "content": "\"CREATE TABLE userTable(id INT NOT NULL,name VARCHAR(255) CHARSET ascii,roomId INT,time_created TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',time_updated TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',content BLOB NOT NULL COMMENT 'comment',json_content JSON NOT NULL COMMENT 'comment',INDEX idx1(name),UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;\" used disabled charset 'ascii'",
- "sqlReviewReport": {
- "line": 1,
- "code": 1001
+ "status": "WARNING",
+ "title": "system.charset.allowlist",
+ "content": "\"CREATE TABLE userTable(id INT NOT NULL,name VARCHAR(255) CHARSET ascii,roomId INT,time_created TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',time_updated TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',content BLOB NOT NULL COMMENT 'comment',json_content JSON NOT NULL COMMENT 'comment',INDEX idx1(name),UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;\" used disabled charset 'ascii'",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 1001,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "system.collation.allowlist",
- "content": "\"CREATE TABLE userTable(id INT NOT NULL,name VARCHAR(255) CHARSET ascii,roomId INT,time_created TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',time_updated TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',content BLOB NOT NULL COMMENT 'comment',json_content JSON NOT NULL COMMENT 'comment',INDEX idx1(name),UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;\" used disabled collation 'latin1_bin'",
- "sqlReviewReport": {
- "line": 1,
- "code": 1201
+ "status": "WARNING",
+ "title": "system.collation.allowlist",
+ "content": "\"CREATE TABLE userTable(id INT NOT NULL,name VARCHAR(255) CHARSET ascii,roomId INT,time_created TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',time_updated TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE NOW() COMMENT 'comment',content BLOB NOT NULL COMMENT 'comment',json_content JSON NOT NULL COMMENT 'comment',INDEX idx1(name),UNIQUE KEY uk1(id, name),FOREIGN KEY fk1(roomId) REFERENCES room(id),INDEX idx_userTable_content(content)) ENGINE = CSV COLLATE latin1_bin;\" used disabled collation 'latin1_bin'",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 1201,
+ "startPosition": {
+ "line": 1
+ }
}
}
run: false
@@ -277,95 +356,122 @@
result:
- |-
{
- "status": "ERROR",
- "title": "column.auto-increment-must-integer",
- "content": "Auto-increment column `t_auto`.`auto_id` requires integer type",
- "sqlReviewReport": {
- "line": 1,
- "code": 410
+ "status": "ERROR",
+ "title": "column.auto-increment-must-integer",
+ "content": "Auto-increment column `t_auto`.`auto_id` requires integer type",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 410,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "naming.column.auto-increment",
- "content": "`t_auto`.`auto_id` mismatches auto_increment column naming convention, naming format should be \"^id$\"",
- "sqlReviewReport": {
- "line": 1,
- "code": 307
+ "status": "WARNING",
+ "title": "naming.column.auto-increment",
+ "content": "`t_auto`.`auto_id` mismatches auto_increment column naming convention, naming format should be \"^id$\"",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 307,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.required",
- "content": "Table `t_auto` requires columns: created_ts, creator_id, id, updated_ts, updater_id",
- "sqlReviewReport": {
- "line": 1,
- "code": 401
+ "status": "WARNING",
+ "title": "column.required",
+ "content": "Table `t_auto` requires columns: created_ts, creator_id, id, updated_ts, updater_id",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 401,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.auto-increment-initial-value",
- "content": "The initial auto-increment value in table `t_auto` is 2, which doesn't equal 20",
- "sqlReviewReport": {
- "line": 1,
- "code": 416
+ "status": "WARNING",
+ "title": "column.auto-increment-initial-value",
+ "content": "The initial auto-increment value in table `t_auto` is 2, which doesn't equal 20",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 416,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.auto-increment-must-unsigned",
- "content": "Auto-increment column `t_auto`.`auto_id` is not UNSIGNED type",
- "sqlReviewReport": {
- "line": 1,
- "code": 417
+ "status": "WARNING",
+ "title": "column.auto-increment-must-unsigned",
+ "content": "Auto-increment column `t_auto`.`auto_id` is not UNSIGNED type",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 417,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "index.pk-type-limit",
- "content": "Columns in primary key must be INT/BIGINT but `t_auto`.`auto_id` is varchar(20)",
- "sqlReviewReport": {
- "line": 1,
- "code": 803
+ "status": "WARNING",
+ "title": "index.pk-type-limit",
+ "content": "Columns in primary key must be INT/BIGINT but `t_auto`.`auto_id` is varchar(20)",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 803,
+ "startPosition": {
+ "line": 1
+ }
}
}
run: false
-- statement: " DELETE FROM tech_book"
+- statement: ' DELETE FROM tech_book'
result:
- |-
{
- "status": "ERROR",
- "title": "statement.where.require",
- "content": "\"DELETE FROM tech_book;\" requires WHERE clause",
- "sqlReviewReport": {
- "line": 1,
- "code": 202
+ "status": "ERROR",
+ "title": "statement.where.require",
+ "content": "\"DELETE FROM tech_book;\" requires WHERE clause",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 202,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "ERROR",
- "title": "statement.dml-dry-run",
- "content": "\"DELETE FROM tech_book\" dry runs failed: Error 1146 (42S02): Table 'testsqlreview.tech_book' doesn't exist",
- "sqlReviewReport": {
- "line": 1,
- "code": 208
+ "status": "ERROR",
+ "title": "statement.dml-dry-run",
+ "content": "\"DELETE FROM tech_book\" dry runs failed: Error 1146 (42S02): Table 'testsqlreview.tech_book' doesn't exist",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 208,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "statement.affected-row-limit",
- "content": "\"DELETE FROM tech_book;\" dry runs failed: Error 1146 (42S02): Table 'testsqlreview.tech_book' doesn't exist",
- "sqlReviewReport": {
- "line": 1,
- "code": 209
+ "status": "WARNING",
+ "title": "statement.affected-row-limit",
+ "content": "\"DELETE FROM tech_book;\" dry runs failed: Error 1146 (42S02): Table 'testsqlreview.tech_book' doesn't exist",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 209,
+ "startPosition": {
+ "line": 1
+ }
}
}
run: false
@@ -373,108 +479,138 @@
result:
- |-
{
- "status": "ERROR",
- "title": "statement.where.no-leading-wildcard-like",
- "content": "\"DELETE FROM tech_book WHERE name like \"%abc\";\" uses leading wildcard LIKE",
- "sqlReviewReport": {
- "line": 1,
- "code": 204
+ "status": "ERROR",
+ "title": "statement.where.no-leading-wildcard-like",
+ "content": "\"DELETE FROM tech_book WHERE name like \"%abc\";\" uses leading wildcard LIKE",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 204,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "ERROR",
- "title": "statement.dml-dry-run",
- "content": "\"DELETE FROM tech_book WHERE name like \"%abc\"\" dry runs failed: Error 1146 (42S02): Table 'testsqlreview.tech_book' doesn't exist",
- "sqlReviewReport": {
- "line": 1,
- "code": 208
+ "status": "ERROR",
+ "title": "statement.dml-dry-run",
+ "content": "\"DELETE FROM tech_book WHERE name like \"%abc\"\" dry runs failed: Error 1146 (42S02): Table 'testsqlreview.tech_book' doesn't exist",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 208,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "statement.affected-row-limit",
- "content": "\"DELETE FROM tech_book WHERE name like \"%abc\";\" dry runs failed: Error 1146 (42S02): Table 'testsqlreview.tech_book' doesn't exist",
- "sqlReviewReport": {
- "line": 1,
- "code": 209
+ "status": "WARNING",
+ "title": "statement.affected-row-limit",
+ "content": "\"DELETE FROM tech_book WHERE name like \"%abc\";\" dry runs failed: Error 1146 (42S02): Table 'testsqlreview.tech_book' doesn't exist",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 209,
+ "startPosition": {
+ "line": 1
+ }
}
}
run: false
-- statement: " INSERT INTO t_copy SELECT * FROM t"
+- statement: ' INSERT INTO t_copy SELECT * FROM t'
result:
- |-
{
- "status": "ERROR",
- "title": "statement.select.no-select-all",
- "content": "\"INSERT INTO t_copy SELECT * FROM t;\" uses SELECT all",
- "sqlReviewReport": {
- "line": 1,
- "code": 203
+ "status": "ERROR",
+ "title": "statement.select.no-select-all",
+ "content": "\"INSERT INTO t_copy SELECT * FROM t;\" uses SELECT all",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 203,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "ERROR",
- "title": "statement.where.require",
- "content": "\"INSERT INTO t_copy SELECT * FROM t;\" requires WHERE clause",
- "sqlReviewReport": {
- "line": 1,
- "code": 202
+ "status": "ERROR",
+ "title": "statement.where.require",
+ "content": "\"INSERT INTO t_copy SELECT * FROM t;\" requires WHERE clause",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 202,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "ERROR",
- "title": "statement.dml-dry-run",
- "content": "\"INSERT INTO t_copy SELECT * FROM t\" dry runs failed: Error 1146 (42S02): Table 'testsqlreview.t_copy' doesn't exist",
- "sqlReviewReport": {
- "line": 1,
- "code": 208
+ "status": "ERROR",
+ "title": "statement.dml-dry-run",
+ "content": "\"INSERT INTO t_copy SELECT * FROM t\" dry runs failed: Error 1146 (42S02): Table 'testsqlreview.t_copy' doesn't exist",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 208,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "statement.insert.row-limit",
- "content": "\"INSERT INTO t_copy SELECT * FROM t;\" dry runs failed: Error 1146 (42S02): Table 'testsqlreview.t_copy' doesn't exist",
- "sqlReviewReport": {
- "line": 1,
- "code": 1101
+ "status": "WARNING",
+ "title": "statement.insert.row-limit",
+ "content": "\"INSERT INTO t_copy SELECT * FROM t;\" dry runs failed: Error 1146 (42S02): Table 'testsqlreview.t_copy' doesn't exist",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 1101,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "statement.insert.must-specify-column",
- "content": "The INSERT statement must specify columns but \"INSERT INTO t_copy SELECT * FROM t;\" does not",
- "sqlReviewReport": {
- "line": 1,
- "code": 1107
+ "status": "WARNING",
+ "title": "statement.insert.must-specify-column",
+ "content": "The INSERT statement must specify columns but \"INSERT INTO t_copy SELECT * FROM t;\" does not",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 1107,
+ "startPosition": {
+ "line": 1
+ }
}
}
run: false
-- statement: " INSERT INTO t VALUES (1, 1, now(), 1, now())"
+- statement: ' INSERT INTO t VALUES (1, 1, now(), 1, now())'
result:
- |-
{
- "status": "ERROR",
- "title": "statement.dml-dry-run",
- "content": "\"INSERT INTO t VALUES (1, 1, now(), 1, now())\" dry runs failed: Error 1146 (42S02): Table 'testsqlreview.t' doesn't exist",
- "sqlReviewReport": {
- "line": 1,
- "code": 208
+ "status": "ERROR",
+ "title": "statement.dml-dry-run",
+ "content": "\"INSERT INTO t VALUES (1, 1, now(), 1, now())\" dry runs failed: Error 1146 (42S02): Table 'testsqlreview.t' doesn't exist",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 208,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "statement.insert.must-specify-column",
- "content": "The INSERT statement must specify columns but \"INSERT INTO t VALUES (1, 1, now(), 1, now());\" does not",
- "sqlReviewReport": {
- "line": 1,
- "code": 1107
+ "status": "WARNING",
+ "title": "statement.insert.must-specify-column",
+ "content": "The INSERT statement must specify columns but \"INSERT INTO t VALUES (1, 1, now(), 1, now());\" does not",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 1107,
+ "startPosition": {
+ "line": 1
+ }
}
}
run: false
@@ -482,22 +618,28 @@
result:
- |-
{
- "status": "ERROR",
- "title": "statement.dml-dry-run",
- "content": "\"DELETE FROM tech_book WHERE id = (SELECT max(id) FROM tech_book WHERE name = 'bytebase')\" dry runs failed: Error 1146 (42S02): Table 'testsqlreview.tech_book' doesn't exist",
- "sqlReviewReport": {
- "line": 1,
- "code": 208
+ "status": "ERROR",
+ "title": "statement.dml-dry-run",
+ "content": "\"DELETE FROM tech_book WHERE id = (SELECT max(id) FROM tech_book WHERE name = 'bytebase')\" dry runs failed: Error 1146 (42S02): Table 'testsqlreview.tech_book' doesn't exist",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 208,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "statement.affected-row-limit",
- "content": "\"DELETE FROM tech_book WHERE id = (SELECT max(id) FROM tech_book WHERE name = 'bytebase');\" dry runs failed: Error 1146 (42S02): Table 'testsqlreview.tech_book' doesn't exist",
- "sqlReviewReport": {
- "line": 1,
- "code": 209
+ "status": "WARNING",
+ "title": "statement.affected-row-limit",
+ "content": "\"DELETE FROM tech_book WHERE id = (SELECT max(id) FROM tech_book WHERE name = 'bytebase');\" dry runs failed: Error 1146 (42S02): Table 'testsqlreview.tech_book' doesn't exist",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 209,
+ "startPosition": {
+ "line": 1
+ }
}
}
run: false
@@ -505,12 +647,15 @@
result:
- |-
{
- "status": "ERROR",
- "title": "statement.disallow-commit",
- "content": "Commit is not allowed, related statement: \"COMMIT;\"",
- "sqlReviewReport": {
- "line": 1,
- "code": 206
+ "status": "ERROR",
+ "title": "statement.disallow-commit",
+ "content": "Commit is not allowed, related statement: \"COMMIT;\"",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 206,
+ "startPosition": {
+ "line": 1
+ }
}
}
run: false
@@ -518,44 +663,47 @@
result:
- |-
{
- "status": "SUCCESS",
- "title": "OK"
+ "status": "SUCCESS",
+ "title": "OK"
}
run: true
- statement: INSERT INTO user(id, name) values (1, 'a'), (2, 'b'), (3, 'c'), (4, 'd'), (5, 'e')
result:
- |-
{
- "status": "SUCCESS",
- "title": "OK"
+ "status": "SUCCESS",
+ "title": "OK"
}
run: true
- statement: DELETE FROM user WHERE id < 10
result:
- |-
{
- "status": "SUCCESS",
- "title": "OK"
+ "status": "SUCCESS",
+ "title": "OK"
}
run: false
- statement: INSERT INTO user(id, name) values (6, 'f'), (7, 'g'), (8, 'h'), (9, 'i'), (10, 'j')
result:
- |-
{
- "status": "SUCCESS",
- "title": "OK"
+ "status": "SUCCESS",
+ "title": "OK"
}
run: true
- statement: DELETE FROM user WHERE id <= 10
result:
- |-
{
- "status": "WARNING",
- "title": "statement.affected-row-limit",
- "content": "\"DELETE FROM user WHERE id <= 10;\" affected 10 rows (estimated). The count exceeds 5.",
- "sqlReviewReport": {
- "line": 1,
- "code": 209
+ "status": "WARNING",
+ "title": "statement.affected-row-limit",
+ "content": "\"DELETE FROM user WHERE id <= 10;\" affected 10 rows (estimated). The count exceeds 5.",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 209,
+ "startPosition": {
+ "line": 1
+ }
}
}
run: false
@@ -573,12 +721,15 @@
result:
- |-
{
- "status": "WARNING",
- "title": "statement.insert.row-limit",
- "content": "\"INSERT INTO user(id, name) SELECT id, name FROM (SELECT 1 AS id, 'a' AS name WHERE 1=1 UNION ALL\n SELECT 2 AS id, 'b' AS name WHERE 1=1 UNION ALL\n SELECT 3 AS id, 'c' AS name WHERE 1=1 UNION ALL\n SELECT 4 AS id, 'd' AS name WHERE 1=1 UNION ALL\n SELECT 5 AS id, 'e' AS name WHERE 1=1 UNION ALL\n SELECT 6 AS id, 'f' AS name WHERE 1=1 UNION ALL\n SELECT 7 AS id, 'g' AS name WHERE 1=1 UNION ALL\n SELECT 8 AS id, 'h' AS name WHERE 1=1 UNION ALL\n SELECT 9 AS id, 'i' AS name WHERE 1=1 UNION ALL\n SELECT 10 AS id, 'j' AS name WHERE 1=1) value_table WHERE 1=1;\" inserts 10 rows. The count exceeds 5.",
- "sqlReviewReport": {
- "line": 1,
- "code": 1101
+ "status": "WARNING",
+ "title": "statement.insert.row-limit",
+ "content": "\"INSERT INTO user(id, name) SELECT id, name FROM (SELECT 1 AS id, 'a' AS name WHERE 1=1 UNION ALL\n SELECT 2 AS id, 'b' AS name WHERE 1=1 UNION ALL\n SELECT 3 AS id, 'c' AS name WHERE 1=1 UNION ALL\n SELECT 4 AS id, 'd' AS name WHERE 1=1 UNION ALL\n SELECT 5 AS id, 'e' AS name WHERE 1=1 UNION ALL\n SELECT 6 AS id, 'f' AS name WHERE 1=1 UNION ALL\n SELECT 7 AS id, 'g' AS name WHERE 1=1 UNION ALL\n SELECT 8 AS id, 'h' AS name WHERE 1=1 UNION ALL\n SELECT 9 AS id, 'i' AS name WHERE 1=1 UNION ALL\n SELECT 10 AS id, 'j' AS name WHERE 1=1) value_table WHERE 1=1;\" inserts 10 rows. The count exceeds 5.",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 1101,
+ "startPosition": {
+ "line": 1
+ }
}
}
run: false
@@ -586,25 +737,31 @@
result:
- |-
{
- "status": "WARNING",
- "title": "statement.disallow-limit",
- "content": "LIMIT clause is forbidden in INSERT, UPDATE and DELETE statement, but \"INSERT INTO user(id, name) SELECT id, name FROM user WHERE id=1 LIMIT 1;\" uses",
- "sqlReviewReport": {
- "line": 1,
- "code": 1103
+ "status": "WARNING",
+ "title": "statement.disallow-limit",
+ "content": "LIMIT clause is forbidden in INSERT, UPDATE and DELETE statement, but \"INSERT INTO user(id, name) SELECT id, name FROM user WHERE id=1 LIMIT 1;\" uses",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 1103,
+ "startPosition": {
+ "line": 1
+ }
}
}
run: false
-- statement: " ALTER TABLE user PARTITION BY HASH(id) PARTITIONS 8;"
+- statement: ' ALTER TABLE user PARTITION BY HASH(id) PARTITIONS 8;'
result:
- |-
{
- "status": "WARNING",
- "title": "table.disallow-partition",
- "content": "Table partition is forbidden, but \"ALTER TABLE user PARTITION BY HASH(id) PARTITIONS 8;\" creates",
- "sqlReviewReport": {
- "line": 1,
- "code": 608
+ "status": "WARNING",
+ "title": "table.disallow-partition",
+ "content": "Table partition is forbidden, but \"ALTER TABLE user PARTITION BY HASH(id) PARTITIONS 8;\" creates",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 608,
+ "startPosition": {
+ "line": 1
+ }
}
}
run: false
@@ -614,75 +771,96 @@
result:
- |-
{
- "status": "WARNING",
- "title": "statement.merge-alter-table",
- "content": "There are 2 statements to modify table `user`",
- "sqlReviewReport": {
- "line": 2,
- "code": 207
+ "status": "WARNING",
+ "title": "statement.merge-alter-table",
+ "content": "There are 2 statements to modify table `user`",
+ "sqlReviewReport": {
+ "line": 2,
+ "code": 207,
+ "startPosition": {
+ "line": 2
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.disallow-change-type",
- "content": "\"ALTER TABLE user CHANGE name name varchar(320) NOT NULL DEFAULT '' COMMENT 'COMMENT' FIRST;\" changes column type",
- "sqlReviewReport": {
- "line": 1,
- "code": 403
+ "status": "WARNING",
+ "title": "column.disallow-change-type",
+ "content": "\"ALTER TABLE user CHANGE name name varchar(320) NOT NULL DEFAULT '' COMMENT 'COMMENT' FIRST;\" changes column type",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 403,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.disallow-change",
- "content": "\"ALTER TABLE user CHANGE name name varchar(320) NOT NULL DEFAULT '' COMMENT 'COMMENT' FIRST;\" contains CHANGE COLUMN statement",
- "sqlReviewReport": {
- "line": 1,
- "code": 406
+ "status": "WARNING",
+ "title": "column.disallow-change",
+ "content": "\"ALTER TABLE user CHANGE name name varchar(320) NOT NULL DEFAULT '' COMMENT 'COMMENT' FIRST;\" contains CHANGE COLUMN statement",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 406,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.disallow-changing-order",
- "content": "\"ALTER TABLE user CHANGE name name varchar(320) NOT NULL DEFAULT '' COMMENT 'COMMENT' FIRST;\" changes column order",
- "sqlReviewReport": {
- "line": 1,
- "code": 407
+ "status": "WARNING",
+ "title": "column.disallow-changing-order",
+ "content": "\"ALTER TABLE user CHANGE name name varchar(320) NOT NULL DEFAULT '' COMMENT 'COMMENT' FIRST;\" changes column order",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 407,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "schema.backward-compatibility",
- "content": "\"ALTER TABLE user CHANGE name name varchar(320) NOT NULL DEFAULT '' COMMENT 'COMMENT' FIRST;\" may cause incompatibility with the existing data and code",
- "sqlReviewReport": {
- "line": 1,
- "code": 111
+ "status": "WARNING",
+ "title": "schema.backward-compatibility",
+ "content": "\"ALTER TABLE user CHANGE name name varchar(320) NOT NULL DEFAULT '' COMMENT 'COMMENT' FIRST;\" may cause incompatibility with the existing data and code",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 111,
+ "startPosition": {
+ "line": 1
+ }
}
}
run: false
-- statement: " DROP TABLE user;"
+- statement: ' DROP TABLE user;'
result:
- |-
{
- "status": "ERROR",
- "title": "table.drop-naming-convention",
- "content": "`user` mismatches drop table naming convention, naming format should be \"_delete$\"",
- "sqlReviewReport": {
- "line": 1,
- "code": 603
+ "status": "ERROR",
+ "title": "table.drop-naming-convention",
+ "content": "`user` mismatches drop table naming convention, naming format should be \"_delete$\"",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 603,
+ "startPosition": {
+ "line": 1
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "schema.backward-compatibility",
- "content": "\"DROP TABLE user;\" may cause incompatibility with the existing data and code",
- "sqlReviewReport": {
- "line": 1,
- "code": 103
+ "status": "WARNING",
+ "title": "schema.backward-compatibility",
+ "content": "\"DROP TABLE user;\" may cause incompatibility with the existing data and code",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 103,
+ "startPosition": {
+ "line": 1
+ }
}
}
run: false
diff --git a/backend/tests/test-data/sql_review_pg.yaml b/backend/tests/test-data/sql_review_pg.yaml
index fd8f426344..4cb67a7754 100644
--- a/backend/tests/test-data/sql_review_pg.yaml
+++ b/backend/tests/test-data/sql_review_pg.yaml
@@ -13,19 +13,20 @@
result:
- |-
{
- "status": "SUCCESS",
- "title": "OK"
+ "status": "SUCCESS",
+ "title": "OK"
}
run: false
- statement: CREATE TABLE user(id);
result:
- |-
{
- "status": "ERROR",
- "title": "Syntax error",
- "content": "syntax error at or near \"user\"",
- "sqlReviewReport": {
- "code": 201
+ "status": "ERROR",
+ "title": "Syntax error",
+ "content": "syntax error at or near \"user\"",
+ "sqlReviewReport": {
+ "code": 201,
+ "startPosition": {}
}
}
run: false
@@ -40,102 +41,132 @@
result:
- |-
{
- "status": "ERROR",
- "title": "table.require-pk",
- "content": "Table \"public\".\"userTable\" requires PRIMARY KEY, related statement: \"CREATE TABLE \\\"userTable\\\"(\\n id INT,\\n name VARCHAR(255),\\n \\\"roomId\\\" INT,\\n CONSTRAINT uk1 UNIQUE (id, name),\\n CONSTRAINT fk1 FOREIGN KEY (\\\"roomId\\\") REFERENCES room(id)\\n )\"",
- "sqlReviewReport": {
- "line": 7,
- "code": 601
+ "status": "ERROR",
+ "title": "table.require-pk",
+ "content": "Table \"public\".\"userTable\" requires PRIMARY KEY, related statement: \"CREATE TABLE \\\"userTable\\\"(\\n id INT,\\n name VARCHAR(255),\\n \\\"roomId\\\" INT,\\n CONSTRAINT uk1 UNIQUE (id, name),\\n CONSTRAINT fk1 FOREIGN KEY (\\\"roomId\\\") REFERENCES room(id)\\n )\"",
+ "sqlReviewReport": {
+ "line": 7,
+ "code": 601,
+ "startPosition": {
+ "line": 7
+ }
}
}
- |-
{
- "status": "ERROR",
- "title": "table.no-foreign-key",
- "content": "Foreign key is not allowed in the table \"public\".\"userTable\", related statement: \"CREATE TABLE \"userTable\"(\n id INT,\n name VARCHAR(255),\n \"roomId\" INT,\n CONSTRAINT uk1 UNIQUE (id, name),\n CONSTRAINT fk1 FOREIGN KEY (\"roomId\") REFERENCES room(id)\n )\"",
- "sqlReviewReport": {
- "line": 7,
- "code": 602
+ "status": "ERROR",
+ "title": "table.no-foreign-key",
+ "content": "Foreign key is not allowed in the table \"public\".\"userTable\", related statement: \"CREATE TABLE \"userTable\"(\n id INT,\n name VARCHAR(255),\n \"roomId\" INT,\n CONSTRAINT uk1 UNIQUE (id, name),\n CONSTRAINT fk1 FOREIGN KEY (\"roomId\") REFERENCES room(id)\n )\"",
+ "sqlReviewReport": {
+ "line": 7,
+ "code": 602,
+ "startPosition": {
+ "line": 7
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "naming.table",
- "content": "\"userTable\" mismatches table naming convention, naming format should be \"^[a-z]+(_[a-z]+)*$\"",
- "sqlReviewReport": {
- "line": 7,
- "code": 301
+ "status": "WARNING",
+ "title": "naming.table",
+ "content": "\"userTable\" mismatches table naming convention, naming format should be \"^[a-z]+(_[a-z]+)*$\"",
+ "sqlReviewReport": {
+ "line": 7,
+ "code": 301,
+ "startPosition": {
+ "line": 7
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "naming.column",
- "content": "\"userTable\".\"roomId\" mismatches column naming convention, naming format should be \"^[a-z]+(_[a-z]+)*$\"",
- "sqlReviewReport": {
- "line": 4,
- "code": 302
+ "status": "WARNING",
+ "title": "naming.column",
+ "content": "\"userTable\".\"roomId\" mismatches column naming convention, naming format should be \"^[a-z]+(_[a-z]+)*$\"",
+ "sqlReviewReport": {
+ "line": 4,
+ "code": 302,
+ "startPosition": {
+ "line": 4
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "naming.index.uk",
- "content": "Unique key in table \"userTable\" mismatches the naming convention, expect \"^$|^uk_userTable_id_name$\" but found \"uk1\"",
- "sqlReviewReport": {
- "line": 5,
- "code": 304
+ "status": "WARNING",
+ "title": "naming.index.uk",
+ "content": "Unique key in table \"userTable\" mismatches the naming convention, expect \"^$|^uk_userTable_id_name$\" but found \"uk1\"",
+ "sqlReviewReport": {
+ "line": 5,
+ "code": 304,
+ "startPosition": {
+ "line": 5
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "naming.index.fk",
- "content": "Foreign key in table \"userTable\" mismatches the naming convention, expect \"^$|^fk_userTable_roomId_room_id$\" but found \"fk1\"",
- "sqlReviewReport": {
- "line": 6,
- "code": 305
+ "status": "WARNING",
+ "title": "naming.index.fk",
+ "content": "Foreign key in table \"userTable\" mismatches the naming convention, expect \"^$|^fk_userTable_roomId_room_id$\" but found \"fk1\"",
+ "sqlReviewReport": {
+ "line": 6,
+ "code": 305,
+ "startPosition": {
+ "line": 6
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.required",
- "content": "Table \"userTable\" requires columns: created_ts, creator_id, updated_ts, updater_id",
- "sqlReviewReport": {
- "line": 7,
- "code": 401
+ "status": "WARNING",
+ "title": "column.required",
+ "content": "Table \"userTable\" requires columns: created_ts, creator_id, updated_ts, updater_id",
+ "sqlReviewReport": {
+ "line": 7,
+ "code": 401,
+ "startPosition": {
+ "line": 7
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.no-null",
- "content": "Column \"id\" in \"public\".\"userTable\" cannot have NULL value",
- "sqlReviewReport": {
- "line": 2,
- "code": 402
+ "status": "WARNING",
+ "title": "column.no-null",
+ "content": "Column \"id\" in \"public\".\"userTable\" cannot have NULL value",
+ "sqlReviewReport": {
+ "line": 2,
+ "code": 402,
+ "startPosition": {
+ "line": 2
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.no-null",
- "content": "Column \"name\" in \"public\".\"userTable\" cannot have NULL value",
- "sqlReviewReport": {
- "line": 3,
- "code": 402
+ "status": "WARNING",
+ "title": "column.no-null",
+ "content": "Column \"name\" in \"public\".\"userTable\" cannot have NULL value",
+ "sqlReviewReport": {
+ "line": 3,
+ "code": 402,
+ "startPosition": {
+ "line": 3
+ }
}
}
- |-
{
- "status": "WARNING",
- "title": "column.no-null",
- "content": "Column \"roomId\" in \"public\".\"userTable\" cannot have NULL value",
- "sqlReviewReport": {
- "line": 4,
- "code": 402
+ "status": "WARNING",
+ "title": "column.no-null",
+ "content": "Column \"roomId\" in \"public\".\"userTable\" cannot have NULL value",
+ "sqlReviewReport": {
+ "line": 4,
+ "code": 402,
+ "startPosition": {
+ "line": 4
+ }
}
}
run: false
@@ -143,12 +174,15 @@
result:
- |-
{
- "status": "ERROR",
- "title": "statement.where.require",
- "content": "\"DELETE FROM t\" requires WHERE clause",
- "sqlReviewReport": {
- "line": 1,
- "code": 202
+ "status": "ERROR",
+ "title": "statement.where.require",
+ "content": "\"DELETE FROM t\" requires WHERE clause",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 202,
+ "startPosition": {
+ "line": 1
+ }
}
}
run: false
@@ -156,12 +190,15 @@
result:
- |-
{
- "status": "ERROR",
- "title": "statement.where.no-leading-wildcard-like",
- "content": "\"DELETE FROM t WHERE a like '%abc'\" uses leading wildcard LIKE",
- "sqlReviewReport": {
- "line": 1,
- "code": 204
+ "status": "ERROR",
+ "title": "statement.where.no-leading-wildcard-like",
+ "content": "\"DELETE FROM t WHERE a like '%abc'\" uses leading wildcard LIKE",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 204,
+ "startPosition": {
+ "line": 1
+ }
}
}
run: false
@@ -169,16 +206,16 @@
result:
- |-
{
- "status": "SUCCESS",
- "title": "OK"
+ "status": "SUCCESS",
+ "title": "OK"
}
run: false
- statement: INSERT INTO t VALUES (1), (2)
result:
- |-
{
- "status": "SUCCESS",
- "title": "OK"
+ "status": "SUCCESS",
+ "title": "OK"
}
run: false
- statement: |-
@@ -193,20 +230,23 @@
result:
- |-
{
- "status": "SUCCESS",
- "title": "OK"
+ "status": "SUCCESS",
+ "title": "OK"
}
run: true
- statement: ALTER INDEX pk_tech_book_id RENAME TO pk1
result:
- |-
{
- "status": "WARNING",
- "title": "naming.index.pk",
- "content": "Primary key in table \"tech_book\" mismatches the naming convention, expect \"^$|^pk_tech_book_id$\" but found \"pk1\"",
- "sqlReviewReport": {
- "line": 1,
- "code": 306
+ "status": "WARNING",
+ "title": "naming.index.pk",
+ "content": "Primary key in table \"tech_book\" mismatches the naming convention, expect \"^$|^pk_tech_book_id$\" but found \"pk1\"",
+ "sqlReviewReport": {
+ "line": 1,
+ "code": 306,
+ "startPosition": {
+ "line": 1
+ }
}
}
run: false
diff --git a/frontend/src/types/proto/store/plan_check_run.ts b/frontend/src/types/proto/store/plan_check_run.ts
index 3a37220105..473f024893 100644
--- a/frontend/src/types/proto/store/plan_check_run.ts
+++ b/frontend/src/types/proto/store/plan_check_run.ts
@@ -1,6 +1,7 @@
/* eslint-disable */
import Long from "long";
import _m0 from "protobufjs/minimal";
+import { Position } from "./common";
import { ChangedResources } from "./instance_change_history";
export const protobufPackage = "bytebase.store";
@@ -188,6 +189,12 @@ export interface PlanCheckRunResult_Result_SqlReviewReport {
detail: string;
/** Code from sql review. */
code: number;
+ /**
+ * 1-based Position of the SQL statement.
+ * To supersede `line` and `column` above.
+ */
+ startPosition: Position | undefined;
+ endPosition: Position | undefined;
}
function createBasePlanCheckRunConfig(): PlanCheckRunConfig {
@@ -848,7 +855,7 @@ export const PlanCheckRunResult_Result_SqlSummaryReport = {
};
function createBasePlanCheckRunResult_Result_SqlReviewReport(): PlanCheckRunResult_Result_SqlReviewReport {
- return { line: 0, column: 0, detail: "", code: 0 };
+ return { line: 0, column: 0, detail: "", code: 0, startPosition: undefined, endPosition: undefined };
}
export const PlanCheckRunResult_Result_SqlReviewReport = {
@@ -865,6 +872,12 @@ export const PlanCheckRunResult_Result_SqlReviewReport = {
if (message.code !== 0) {
writer.uint32(32).int32(message.code);
}
+ if (message.startPosition !== undefined) {
+ Position.encode(message.startPosition, writer.uint32(66).fork()).ldelim();
+ }
+ if (message.endPosition !== undefined) {
+ Position.encode(message.endPosition, writer.uint32(74).fork()).ldelim();
+ }
return writer;
},
@@ -903,6 +916,20 @@ export const PlanCheckRunResult_Result_SqlReviewReport = {
message.code = reader.int32();
continue;
+ case 8:
+ if (tag !== 66) {
+ break;
+ }
+
+ message.startPosition = Position.decode(reader, reader.uint32());
+ continue;
+ case 9:
+ if (tag !== 74) {
+ break;
+ }
+
+ message.endPosition = Position.decode(reader, reader.uint32());
+ continue;
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -918,6 +945,8 @@ export const PlanCheckRunResult_Result_SqlReviewReport = {
column: isSet(object.column) ? globalThis.Number(object.column) : 0,
detail: isSet(object.detail) ? globalThis.String(object.detail) : "",
code: isSet(object.code) ? globalThis.Number(object.code) : 0,
+ startPosition: isSet(object.startPosition) ? Position.fromJSON(object.startPosition) : undefined,
+ endPosition: isSet(object.endPosition) ? Position.fromJSON(object.endPosition) : undefined,
};
},
@@ -935,6 +964,12 @@ export const PlanCheckRunResult_Result_SqlReviewReport = {
if (message.code !== 0) {
obj.code = Math.round(message.code);
}
+ if (message.startPosition !== undefined) {
+ obj.startPosition = Position.toJSON(message.startPosition);
+ }
+ if (message.endPosition !== undefined) {
+ obj.endPosition = Position.toJSON(message.endPosition);
+ }
return obj;
},
@@ -949,6 +984,12 @@ export const PlanCheckRunResult_Result_SqlReviewReport = {
message.column = object.column ?? 0;
message.detail = object.detail ?? "";
message.code = object.code ?? 0;
+ message.startPosition = (object.startPosition !== undefined && object.startPosition !== null)
+ ? Position.fromPartial(object.startPosition)
+ : undefined;
+ message.endPosition = (object.endPosition !== undefined && object.endPosition !== null)
+ ? Position.fromPartial(object.endPosition)
+ : undefined;
return message;
},
};
diff --git a/frontend/src/types/proto/v1/plan_service.ts b/frontend/src/types/proto/v1/plan_service.ts
index f2067da391..c9085e7c93 100644
--- a/frontend/src/types/proto/v1/plan_service.ts
+++ b/frontend/src/types/proto/v1/plan_service.ts
@@ -8,6 +8,7 @@ import {
exportFormatFromJSON,
exportFormatToJSON,
exportFormatToNumber,
+ Position,
VCSType,
vCSTypeFromJSON,
vCSTypeToJSON,
@@ -662,6 +663,12 @@ export interface PlanCheckRun_Result_SqlReviewReport {
detail: string;
/** Code from sql review. */
code: number;
+ /**
+ * 1-based Position of the SQL statement.
+ * To supersede `line` and `column` above.
+ */
+ startPosition: Position | undefined;
+ endPosition: Position | undefined;
}
function createBaseGetPlanRequest(): GetPlanRequest {
@@ -3266,7 +3273,7 @@ export const PlanCheckRun_Result_SqlSummaryReport = {
};
function createBasePlanCheckRun_Result_SqlReviewReport(): PlanCheckRun_Result_SqlReviewReport {
- return { line: 0, column: 0, detail: "", code: 0 };
+ return { line: 0, column: 0, detail: "", code: 0, startPosition: undefined, endPosition: undefined };
}
export const PlanCheckRun_Result_SqlReviewReport = {
@@ -3283,6 +3290,12 @@ export const PlanCheckRun_Result_SqlReviewReport = {
if (message.code !== 0) {
writer.uint32(32).int32(message.code);
}
+ if (message.startPosition !== undefined) {
+ Position.encode(message.startPosition, writer.uint32(42).fork()).ldelim();
+ }
+ if (message.endPosition !== undefined) {
+ Position.encode(message.endPosition, writer.uint32(50).fork()).ldelim();
+ }
return writer;
},
@@ -3321,6 +3334,20 @@ export const PlanCheckRun_Result_SqlReviewReport = {
message.code = reader.int32();
continue;
+ case 5:
+ if (tag !== 42) {
+ break;
+ }
+
+ message.startPosition = Position.decode(reader, reader.uint32());
+ continue;
+ case 6:
+ if (tag !== 50) {
+ break;
+ }
+
+ message.endPosition = Position.decode(reader, reader.uint32());
+ continue;
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -3336,6 +3363,8 @@ export const PlanCheckRun_Result_SqlReviewReport = {
column: isSet(object.column) ? globalThis.Number(object.column) : 0,
detail: isSet(object.detail) ? globalThis.String(object.detail) : "",
code: isSet(object.code) ? globalThis.Number(object.code) : 0,
+ startPosition: isSet(object.startPosition) ? Position.fromJSON(object.startPosition) : undefined,
+ endPosition: isSet(object.endPosition) ? Position.fromJSON(object.endPosition) : undefined,
};
},
@@ -3353,6 +3382,12 @@ export const PlanCheckRun_Result_SqlReviewReport = {
if (message.code !== 0) {
obj.code = Math.round(message.code);
}
+ if (message.startPosition !== undefined) {
+ obj.startPosition = Position.toJSON(message.startPosition);
+ }
+ if (message.endPosition !== undefined) {
+ obj.endPosition = Position.toJSON(message.endPosition);
+ }
return obj;
},
@@ -3365,6 +3400,12 @@ export const PlanCheckRun_Result_SqlReviewReport = {
message.column = object.column ?? 0;
message.detail = object.detail ?? "";
message.code = object.code ?? 0;
+ message.startPosition = (object.startPosition !== undefined && object.startPosition !== null)
+ ? Position.fromPartial(object.startPosition)
+ : undefined;
+ message.endPosition = (object.endPosition !== undefined && object.endPosition !== null)
+ ? Position.fromPartial(object.endPosition)
+ : undefined;
return message;
},
};
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index ee405bf7ab..0b57696279 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -12036,6 +12036,14 @@ components:
type: integer
description: Code from sql review.
format: int32
+ startPosition:
+ allOf:
+ - $ref: '#/components/schemas/Position'
+ description: |-
+ 1-based Position of the SQL statement.
+ To supersede `line` and `column` above.
+ endPosition:
+ $ref: '#/components/schemas/Position'
Result_SqlSummaryReport:
type: object
properties:
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index b0063a848a..6edcc1f147 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -2840,6 +2840,8 @@ Type is the database change type.
| column | [int32](#int32) | | |
| detail | [string](#string) | | |
| code | [int32](#int32) | | Code from sql review. |
+| start_position | [Position](#bytebase-store-Position) | | 1-based Position of the SQL statement. To supersede `line` and `column` above. |
+| end_position | [Position](#bytebase-store-Position) | | |
diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.html
index 8e1dc509d3..d6851cacd4 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -7435,6 +7435,21 @@ Format: instances/{instance}/databases/{database} </p></td>
<td><p>Code from sql review. </p></td>
</tr>
+ <tr>
+ <td>start_position</td>
+ <td><a href="#bytebase.store.Position">Position</a></td>
+ <td></td>
+ <td><p>1-based Position of the SQL statement.
+To supersede `line` and `column` above. </p></td>
+ </tr>
+
+ <tr>
+ <td>end_position</td>
+ <td><a href="#bytebase.store.Position">Position</a></td>
+ <td></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 f8f2f95e91..36e5023c52 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -6356,6 +6356,8 @@ When paginating, all other parameters provided to `ListPlans` must match the cal
| column | [int32](#int32) | | |
| detail | [string](#string) | | |
| code | [int32](#int32) | | Code from sql review. |
+| start_position | [Position](#bytebase-v1-Position) | | 1-based Position of the SQL statement. To supersede `line` and `column` above. |
+| end_position | [Position](#bytebase-v1-Position) | | |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index d931e295f9..695629a929 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -18175,6 +18175,21 @@ Format: projects/{project-ID}/vcsConnectors/{vcs-connector} </p></td>
<td><p>Code from sql review. </p></td>
</tr>
+ <tr>
+ <td>start_position</td>
+ <td><a href="#bytebase.v1.Position">Position</a></td>
+ <td></td>
+ <td><p>1-based Position of the SQL statement.
+To supersede `line` and `column` above. </p></td>
+ </tr>
+
+ <tr>
+ <td>end_position</td>
+ <td><a href="#bytebase.v1.Position">Position</a></td>
+ <td></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 9be8f002e2..4beebd331f 100644
--- a/proto/generated-go/store/plan_check_run.pb.go
+++ b/proto/generated-go/store/plan_check_run.pb.go
@@ -523,6 +523,10 @@ type PlanCheckRunResult_Result_SqlReviewReport struct {
Detail string `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"`
// Code from sql review.
Code int32 `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"`
+ // 1-based Position of the SQL statement.
+ // To supersede `line` and `column` above.
+ StartPosition *Position `protobuf:"bytes,8,opt,name=start_position,json=startPosition,proto3" json:"start_position,omitempty"`
+ EndPosition *Position `protobuf:"bytes,9,opt,name=end_position,json=endPosition,proto3" json:"end_position,omitempty"`
}
func (x *PlanCheckRunResult_Result_SqlReviewReport) Reset() {
@@ -585,118 +589,141 @@ func (x *PlanCheckRunResult_Result_SqlReviewReport) GetCode() int32 {
return 0
}
+func (x *PlanCheckRunResult_Result_SqlReviewReport) GetStartPosition() *Position {
+ if x != nil {
+ return x.StartPosition
+ }
+ return nil
+}
+
+func (x *PlanCheckRunResult_Result_SqlReviewReport) GetEndPosition() *Position {
+ if x != nil {
+ return x.EndPosition
+ }
+ return nil
+}
+
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, 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, 0xf0, 0x05, 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,
- 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x0e, 0x32, 0x35, 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, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61,
- 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x12, 0x63, 0x68, 0x61, 0x6e,
- 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21,
- 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x55, 0x69,
- 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6e, 0x61,
- 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61,
- 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x12, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61,
- 0x73, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01,
- 0x28, 0x03, 0x48, 0x00, 0x52, 0x10, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x47, 0x72,
- 0x6f, 0x75, 0x70, 0x55, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x53, 0x0a, 0x0b, 0x67, 0x68, 0x6f,
- 0x73, 0x74, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32,
- 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, 0x43, 0x6f, 0x6e, 0x66,
- 0x69, 0x67, 0x2e, 0x47, 0x68, 0x6f, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74,
- 0x72, 0x79, 0x52, 0x0a, 0x67, 0x68, 0x6f, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x76,
- 0x0a, 0x18, 0x70, 0x72, 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x61, 0x63,
- 0x6b, 0x75, 0x70, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b,
- 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, 0x43, 0x6f,
- 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x72, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61,
- 0x63, 0x6b, 0x75, 0x70, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x48, 0x01, 0x52, 0x15, 0x70, 0x72,
- 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x65, 0x74,
- 0x61, 0x69, 0x6c, 0x88, 0x01, 0x01, 0x1a, 0x3d, 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, 0x1a, 0x33, 0x0a, 0x15, 0x50, 0x72, 0x65, 0x55, 0x70, 0x64, 0x61,
- 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x1a,
- 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 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, 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, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x70, 0x72, 0x65, 0x5f,
- 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x64, 0x65,
- 0x74, 0x61, 0x69, 0x6c, 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, 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, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x1a, 0x12, 0x73, 0x74,
+ 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 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, 0xf0, 0x05, 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, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x74, 0x79, 0x70,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, 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, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x68, 0x61, 0x6e,
+ 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x12,
+ 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, 0x79,
+ 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x75,
+ 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,
+ 0x63, 0x65, 0x55, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,
+ 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x61,
+ 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x12, 0x64, 0x61,
+ 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x75, 0x69, 0x64,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x10, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61,
+ 0x73, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x55, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x53, 0x0a,
+ 0x0b, 0x67, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x32, 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,
+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x47, 0x68, 0x6f, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x67,
+ 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x67, 0x68, 0x6f, 0x73, 0x74, 0x46, 0x6c, 0x61,
+ 0x67, 0x73, 0x12, 0x76, 0x0a, 0x18, 0x70, 0x72, 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x07,
+ 0x20, 0x01, 0x28, 0x0b, 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, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x72, 0x65, 0x55, 0x70, 0x64, 0x61,
+ 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x48, 0x01,
+ 0x52, 0x15, 0x70, 0x72, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75,
+ 0x70, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x88, 0x01, 0x01, 0x1a, 0x3d, 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, 0x1a, 0x33, 0x0a, 0x15, 0x50, 0x72, 0x65,
+ 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x65, 0x74, 0x61,
+ 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 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, 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, 0x42, 0x1b, 0x0a, 0x19, 0x5f,
+ 0x70, 0x72, 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75,
+ 0x70, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x22, 0xde, 0x07, 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, 0xec, 0x06, 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, 0xe7,
+ 0x01, 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, 0x12, 0x3f, 0x0a, 0x0e, 0x73, 0x74,
+ 0x61, 0x72, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,
+ 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x74,
+ 0x61, 0x72, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x0c, 0x65,
+ 0x6e, 0x64, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f,
+ 0x72, 0x65, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x65, 0x6e, 0x64,
+ 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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 (
@@ -724,21 +751,24 @@ var file_store_plan_check_run_proto_goTypes = []any{
(*PlanCheckRunResult_Result_SqlSummaryReport)(nil), // 7: bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport
(*PlanCheckRunResult_Result_SqlReviewReport)(nil), // 8: bytebase.store.PlanCheckRunResult.Result.SqlReviewReport
(*ChangedResources)(nil), // 9: bytebase.store.ChangedResources
+ (*Position)(nil), // 10: bytebase.store.Position
}
var file_store_plan_check_run_proto_depIdxs = []int32{
- 0, // 0: bytebase.store.PlanCheckRunConfig.change_database_type:type_name -> bytebase.store.PlanCheckRunConfig.ChangeDatabaseType
- 4, // 1: bytebase.store.PlanCheckRunConfig.ghost_flags:type_name -> bytebase.store.PlanCheckRunConfig.GhostFlagsEntry
- 5, // 2: bytebase.store.PlanCheckRunConfig.pre_update_backup_detail:type_name -> bytebase.store.PlanCheckRunConfig.PreUpdateBackupDetail
- 6, // 3: bytebase.store.PlanCheckRunResult.results:type_name -> bytebase.store.PlanCheckRunResult.Result
- 1, // 4: bytebase.store.PlanCheckRunResult.Result.status:type_name -> bytebase.store.PlanCheckRunResult.Result.Status
- 7, // 5: bytebase.store.PlanCheckRunResult.Result.sql_summary_report:type_name -> bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport
- 8, // 6: bytebase.store.PlanCheckRunResult.Result.sql_review_report:type_name -> bytebase.store.PlanCheckRunResult.Result.SqlReviewReport
- 9, // 7: bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport.changed_resources:type_name -> bytebase.store.ChangedResources
- 8, // [8:8] is the sub-list for method output_type
- 8, // [8:8] is the sub-list for method input_type
- 8, // [8:8] is the sub-list for extension type_name
- 8, // [8:8] is the sub-list for extension extendee
- 0, // [0:8] is the sub-list for field type_name
+ 0, // 0: bytebase.store.PlanCheckRunConfig.change_database_type:type_name -> bytebase.store.PlanCheckRunConfig.ChangeDatabaseType
+ 4, // 1: bytebase.store.PlanCheckRunConfig.ghost_flags:type_name -> bytebase.store.PlanCheckRunConfig.GhostFlagsEntry
+ 5, // 2: bytebase.store.PlanCheckRunConfig.pre_update_backup_detail:type_name -> bytebase.store.PlanCheckRunConfig.PreUpdateBackupDetail
+ 6, // 3: bytebase.store.PlanCheckRunResult.results:type_name -> bytebase.store.PlanCheckRunResult.Result
+ 1, // 4: bytebase.store.PlanCheckRunResult.Result.status:type_name -> bytebase.store.PlanCheckRunResult.Result.Status
+ 7, // 5: bytebase.store.PlanCheckRunResult.Result.sql_summary_report:type_name -> bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport
+ 8, // 6: bytebase.store.PlanCheckRunResult.Result.sql_review_report:type_name -> bytebase.store.PlanCheckRunResult.Result.SqlReviewReport
+ 9, // 7: bytebase.store.PlanCheckRunResult.Result.SqlSummaryReport.changed_resources:type_name -> bytebase.store.ChangedResources
+ 10, // 8: bytebase.store.PlanCheckRunResult.Result.SqlReviewReport.start_position:type_name -> bytebase.store.Position
+ 10, // 9: bytebase.store.PlanCheckRunResult.Result.SqlReviewReport.end_position:type_name -> bytebase.store.Position
+ 10, // [10:10] is the sub-list for method output_type
+ 10, // [10:10] is the sub-list for method input_type
+ 10, // [10:10] is the sub-list for extension type_name
+ 10, // [10:10] is the sub-list for extension extendee
+ 0, // [0:10] is the sub-list for field type_name
}
func init() { file_store_plan_check_run_proto_init() }
@@ -746,6 +776,7 @@ func file_store_plan_check_run_proto_init() {
if File_store_plan_check_run_proto != nil {
return
}
+ file_store_common_proto_init()
file_store_instance_change_history_proto_init()
if !protoimpl.UnsafeEnabled {
file_store_plan_check_run_proto_msgTypes[0].Exporter = func(v any, i int) any {
diff --git a/proto/generated-go/v1/plan_service.pb.go b/proto/generated-go/v1/plan_service.pb.go
index c0617c15a5..4823fba31f 100644
--- a/proto/generated-go/v1/plan_service.pb.go
+++ b/proto/generated-go/v1/plan_service.pb.go
@@ -1954,6 +1954,10 @@ type PlanCheckRun_Result_SqlReviewReport struct {
Detail string `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"`
// Code from sql review.
Code int32 `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"`
+ // 1-based Position of the SQL statement.
+ // To supersede `line` and `column` above.
+ StartPosition *Position `protobuf:"bytes,5,opt,name=start_position,json=startPosition,proto3" json:"start_position,omitempty"`
+ EndPosition *Position `protobuf:"bytes,6,opt,name=end_position,json=endPosition,proto3" json:"end_position,omitempty"`
}
func (x *PlanCheckRun_Result_SqlReviewReport) Reset() {
@@ -2016,6 +2020,20 @@ func (x *PlanCheckRun_Result_SqlReviewReport) GetCode() int32 {
return 0
}
+func (x *PlanCheckRun_Result_SqlReviewReport) GetStartPosition() *Position {
+ if x != nil {
+ return x.StartPosition
+ }
+ return nil
+}
+
+func (x *PlanCheckRun_Result_SqlReviewReport) GetEndPosition() *Position {
+ if x != nil {
+ return x.EndPosition
+ }
+ return nil
+}
+
var File_v1_plan_service_proto protoreflect.FileDescriptor
var file_v1_plan_service_proto_rawDesc = []byte{
@@ -2255,7 +2273,7 @@ var file_v1_plan_service_proto_rawDesc = []byte{
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x52, 0x75, 0x6e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65,
- 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc2, 0x0a, 0x0a, 0x0c,
+ 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbb, 0x0b, 0x0a, 0x0c,
0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x12, 0x12, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
@@ -2278,7 +2296,7 @@ var file_v1_plan_service_proto_rawDesc = []byte{
0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
0x70, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54,
- 0x69, 0x6d, 0x65, 0x1a, 0xcf, 0x05, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3f,
+ 0x69, 0x6d, 0x65, 0x1a, 0xc8, 0x06, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3f,
0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27,
0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61,
0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
@@ -2311,97 +2329,105 @@ var file_v1_plan_service_proto_rawDesc = []byte{
0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 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, 0x22, 0xb5, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14,
- 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
- 0x45, 0x44, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45,
- 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x46, 0x41, 0x4b, 0x45, 0x5f,
- 0x41, 0x44, 0x56, 0x49, 0x53, 0x45, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x41, 0x54, 0x41,
- 0x42, 0x41, 0x53, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x41,
- 0x44, 0x56, 0x49, 0x53, 0x45, 0x10, 0x03, 0x12, 0x25, 0x0a, 0x21, 0x44, 0x41, 0x54, 0x41, 0x42,
- 0x41, 0x53, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x55,
- 0x4d, 0x4d, 0x41, 0x52, 0x59, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x05, 0x12, 0x14,
- 0x0a, 0x10, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45,
- 0x43, 0x54, 0x10, 0x06, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45,
- 0x5f, 0x47, 0x48, 0x4f, 0x53, 0x54, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x07, 0x22, 0x51, 0x0a,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x1a, 0xe1, 0x01, 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, 0x12, 0x3c, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x69,
+ 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x6f, 0x73, 0x69, 0x74,
+ 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x0c, 0x65, 0x6e, 0x64, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74,
+ 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e,
+ 0x52, 0x0b, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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,
- 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04,
- 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44,
- 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x04,
- 0x32, 0xbc, 0x07, 0x0a, 0x0b, 0x50, 0x6c, 0x61, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
- 0x12, 0x67, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x1b, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61,
- 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x22, 0x2c, 0xda, 0x41, 0x04,
- 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f,
- 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a,
- 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7a, 0x0a, 0x09, 0x4c, 0x69, 0x73,
- 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
- 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72,
- 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f,
- 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68,
- 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x6c, 0x61, 0x6e, 0x73,
- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72,
- 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x7b,
- 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f,
- 0x2a, 0x7d, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12,
- 0x7a, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x1e, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61,
- 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x6e,
- 0x22, 0x39, 0xda, 0x41, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x70, 0x6c, 0x61, 0x6e,
- 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x22, 0x1d, 0x2f, 0x76,
- 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,
- 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x84, 0x01, 0x0a, 0x0a,
- 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74,
- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50,
- 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74,
- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x22, 0x43, 0xda,
- 0x41, 0x10, 0x70, 0x6c, 0x61, 0x6e, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61,
- 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x3a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x32, 0x22,
- 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x6c, 0x61, 0x6e, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70,
+ 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, 0xb5,
+ 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f,
+ 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x22, 0x0a,
+ 0x1e, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x4d,
+ 0x45, 0x4e, 0x54, 0x5f, 0x46, 0x41, 0x4b, 0x45, 0x5f, 0x41, 0x44, 0x56, 0x49, 0x53, 0x45, 0x10,
+ 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x53, 0x54,
+ 0x41, 0x54, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x44, 0x56, 0x49, 0x53, 0x45, 0x10, 0x03,
+ 0x12, 0x25, 0x0a, 0x21, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x53, 0x54, 0x41,
+ 0x54, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x55, 0x4d, 0x4d, 0x41, 0x52, 0x59, 0x5f, 0x52,
+ 0x45, 0x50, 0x4f, 0x52, 0x54, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x41, 0x54, 0x41, 0x42,
+ 0x41, 0x53, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x10, 0x06, 0x12, 0x17, 0x0a,
+ 0x13, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x47, 0x48, 0x4f, 0x53, 0x54, 0x5f,
+ 0x53, 0x59, 0x4e, 0x43, 0x10, 0x07, 0x22, 0x51, 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, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e,
+ 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x02, 0x12,
+ 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x43,
+ 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x32, 0xbc, 0x07, 0x0a, 0x0b, 0x50, 0x6c,
+ 0x61, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x07, 0x47, 0x65, 0x74,
+ 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
+ 0x50, 0x6c, 0x61, 0x6e, 0x22, 0x2c, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4,
+ 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70,
0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x2f,
- 0x2a, 0x7d, 0x12, 0xa2, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x43,
- 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
+ 0x2a, 0x7d, 0x12, 0x7a, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x12,
+ 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69,
+ 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73,
+ 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e,
+ 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12,
+ 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f,
+ 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x87,
+ 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x1f,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61,
+ 0x72, 0x63, 0x68, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65,
+ 0x61, 0x72, 0x63, 0x68, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x22, 0x35, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93,
+ 0x02, 0x26, 0x12, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d,
+ 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6c, 0x61, 0x6e,
+ 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x7a, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61,
+ 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x22, 0x39, 0xda, 0x41, 0x0b, 0x70, 0x61,
+ 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x70, 0x6c, 0x61, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a,
+ 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65,
+ 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70,
+ 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x84, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50,
+ 0x6c, 0x61, 0x6e, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x22, 0x43, 0xda, 0x41, 0x10, 0x70, 0x6c, 0x61, 0x6e, 0x2c,
+ 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+ 0x2a, 0x3a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x32, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x6c,
+ 0x61, 0x6e, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73,
+ 0x2f, 0x2a, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xa2, 0x01, 0x0a, 0x11,
+ 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e,
+ 0x73, 0x12, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
+ 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x43,
- 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
- 0x26, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69,
- 0x73, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65,
- 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70,
- 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a,
- 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x43, 0x68,
- 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x50,
- 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x50, 0x6c, 0x61, 0x6e, 0x43,
- 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62,
- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x50, 0x6c,
- 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x22, 0x3d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a,
- 0x01, 0x2a, 0x22, 0x2b, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72,
- 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x2f, 0x2a,
- 0x7d, 0x3a, 0x72, 0x75, 0x6e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 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,
+ 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x22, 0x3e, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+ 0x2f, 0x12, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70,
+ 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x2f,
+ 0x2a, 0x7d, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x75, 0x6e, 0x73,
+ 0x12, 0x95, 0x01, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63,
+ 0x6b, 0x73, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x52, 0x75, 0x6e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
+ 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b,
+ 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0xda, 0x41, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x01, 0x2a, 0x22, 0x2b, 0x2f, 0x76, 0x31,
+ 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f,
+ 0x2a, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x75, 0x6e, 0x50, 0x6c,
+ 0x61, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 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 (
@@ -2454,6 +2480,7 @@ var file_v1_plan_service_proto_goTypes = []any{
(ExportFormat)(0), // 32: bytebase.v1.ExportFormat
(VCSType)(0), // 33: bytebase.v1.VCSType
(*ChangedResources)(nil), // 34: bytebase.v1.ChangedResources
+ (*Position)(nil), // 35: bytebase.v1.Position
}
var file_v1_plan_service_proto_depIdxs = []int32{
11, // 0: bytebase.v1.ListPlansResponse.plans:type_name -> bytebase.v1.Plan
@@ -2486,25 +2513,27 @@ var file_v1_plan_service_proto_depIdxs = []int32{
28, // 27: bytebase.v1.PlanCheckRun.Result.sql_summary_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlSummaryReport
29, // 28: bytebase.v1.PlanCheckRun.Result.sql_review_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlReviewReport
34, // 29: bytebase.v1.PlanCheckRun.Result.SqlSummaryReport.changed_resources:type_name -> bytebase.v1.ChangedResources
- 4, // 30: bytebase.v1.PlanService.GetPlan:input_type -> bytebase.v1.GetPlanRequest
- 5, // 31: bytebase.v1.PlanService.ListPlans:input_type -> bytebase.v1.ListPlansRequest
- 7, // 32: bytebase.v1.PlanService.SearchPlans:input_type -> bytebase.v1.SearchPlansRequest
- 9, // 33: bytebase.v1.PlanService.CreatePlan:input_type -> bytebase.v1.CreatePlanRequest
- 10, // 34: bytebase.v1.PlanService.UpdatePlan:input_type -> bytebase.v1.UpdatePlanRequest
- 12, // 35: bytebase.v1.PlanService.ListPlanCheckRuns:input_type -> bytebase.v1.ListPlanCheckRunsRequest
- 14, // 36: bytebase.v1.PlanService.RunPlanChecks:input_type -> bytebase.v1.RunPlanChecksRequest
- 11, // 37: bytebase.v1.PlanService.GetPlan:output_type -> bytebase.v1.Plan
- 6, // 38: bytebase.v1.PlanService.ListPlans:output_type -> bytebase.v1.ListPlansResponse
- 8, // 39: bytebase.v1.PlanService.SearchPlans:output_type -> bytebase.v1.SearchPlansResponse
- 11, // 40: bytebase.v1.PlanService.CreatePlan:output_type -> bytebase.v1.Plan
- 11, // 41: bytebase.v1.PlanService.UpdatePlan:output_type -> bytebase.v1.Plan
- 13, // 42: bytebase.v1.PlanService.ListPlanCheckRuns:output_type -> bytebase.v1.ListPlanCheckRunsResponse
- 15, // 43: bytebase.v1.PlanService.RunPlanChecks:output_type -> bytebase.v1.RunPlanChecksResponse
- 37, // [37:44] is the sub-list for method output_type
- 30, // [30:37] is the sub-list for method input_type
- 30, // [30:30] is the sub-list for extension type_name
- 30, // [30:30] is the sub-list for extension extendee
- 0, // [0:30] is the sub-list for field type_name
+ 35, // 30: bytebase.v1.PlanCheckRun.Result.SqlReviewReport.start_position:type_name -> bytebase.v1.Position
+ 35, // 31: bytebase.v1.PlanCheckRun.Result.SqlReviewReport.end_position:type_name -> bytebase.v1.Position
+ 4, // 32: bytebase.v1.PlanService.GetPlan:input_type -> bytebase.v1.GetPlanRequest
+ 5, // 33: bytebase.v1.PlanService.ListPlans:input_type -> bytebase.v1.ListPlansRequest
+ 7, // 34: bytebase.v1.PlanService.SearchPlans:input_type -> bytebase.v1.SearchPlansRequest
+ 9, // 35: bytebase.v1.PlanService.CreatePlan:input_type -> bytebase.v1.CreatePlanRequest
+ 10, // 36: bytebase.v1.PlanService.UpdatePlan:input_type -> bytebase.v1.UpdatePlanRequest
+ 12, // 37: bytebase.v1.PlanService.ListPlanCheckRuns:input_type -> bytebase.v1.ListPlanCheckRunsRequest
+ 14, // 38: bytebase.v1.PlanService.RunPlanChecks:input_type -> bytebase.v1.RunPlanChecksRequest
+ 11, // 39: bytebase.v1.PlanService.GetPlan:output_type -> bytebase.v1.Plan
+ 6, // 40: bytebase.v1.PlanService.ListPlans:output_type -> bytebase.v1.ListPlansResponse
+ 8, // 41: bytebase.v1.PlanService.SearchPlans:output_type -> bytebase.v1.SearchPlansResponse
+ 11, // 42: bytebase.v1.PlanService.CreatePlan:output_type -> bytebase.v1.Plan
+ 11, // 43: bytebase.v1.PlanService.UpdatePlan:output_type -> bytebase.v1.Plan
+ 13, // 44: bytebase.v1.PlanService.ListPlanCheckRuns:output_type -> bytebase.v1.ListPlanCheckRunsResponse
+ 15, // 45: bytebase.v1.PlanService.RunPlanChecks:output_type -> bytebase.v1.RunPlanChecksResponse
+ 39, // [39:46] is the sub-list for method output_type
+ 32, // [32:39] is the sub-list for method input_type
+ 32, // [32:32] is the sub-list for extension type_name
+ 32, // [32:32] is the sub-list for extension extendee
+ 0, // [0:32] is the sub-list for field type_name
}
func init() { file_v1_plan_service_proto_init() }
diff --git a/proto/store/plan_check_run.proto b/proto/store/plan_check_run.proto
index 8a9289f888..977faf2288 100644
--- a/proto/store/plan_check_run.proto
+++ b/proto/store/plan_check_run.proto
@@ -2,6 +2,7 @@ syntax = "proto3";
package bytebase.store;
+import "store/common.proto";
import "store/instance_change_history.proto";
option go_package = "generated-go/store";
@@ -66,6 +67,10 @@ message PlanCheckRunResult {
string detail = 3;
// Code from sql review.
int32 code = 4;
+ // 1-based Position of the SQL statement.
+ // To supersede `line` and `column` above.
+ Position start_position = 8;
+ Position end_position = 9;
}
}
}
diff --git a/proto/v1/plan_service.proto b/proto/v1/plan_service.proto
index 13f3f62164..dd885d86cc 100644
--- a/proto/v1/plan_service.proto
+++ b/proto/v1/plan_service.proto
@@ -392,6 +392,10 @@ message PlanCheckRun {
string detail = 3;
// Code from sql review.
int32 code = 4;
+ // 1-based Position of the SQL statement.
+ // To supersede `line` and `column` above.
+ Position start_position = 5;
+ Position end_position = 6;
}
}
}