Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat(proto): sheet commands (#11937)
p0nya4d4f2ff8c47
diff --git a/frontend/src/types/proto/v1/sheet_service.ts b/frontend/src/types/proto/v1/sheet_service.tsindex b25f814cfa..a76a425c5b 100644--- a/frontend/src/types/proto/v1/sheet_service.ts+++ b/frontend/src/types/proto/v1/sheet_service.ts@@ -99,7 +99,11 @@ export interface SheetPayload {| DatabaseConfig| undefined;/** The snapshot of the baseline database config when creating the sheet. */- baselineDatabaseConfig: DatabaseConfig | undefined;+ baselineDatabaseConfig:+ | DatabaseConfig+ | undefined;+ /** The start and end position of each command in the sheet statement. */+ commands: SheetCommand[];}/** Type of the SheetPayload. */@@ -148,6 +152,11 @@ export function sheetPayload_TypeToNumber(object: SheetPayload_Type): number {}}+export interface SheetCommand {+ start: number;+ end: number;+}+function createBaseCreateSheetRequest(): CreateSheetRequest {return { parent: "", sheet: undefined };}@@ -580,7 +589,12 @@ export const Sheet = {};function createBaseSheetPayload(): SheetPayload {- return { type: SheetPayload_Type.TYPE_UNSPECIFIED, databaseConfig: undefined, baselineDatabaseConfig: undefined };+ return {+ type: SheetPayload_Type.TYPE_UNSPECIFIED,+ databaseConfig: undefined,+ baselineDatabaseConfig: undefined,+ commands: [],+ };}export const SheetPayload = {@@ -594,6 +608,9 @@ export const SheetPayload = {if (message.baselineDatabaseConfig !== undefined) {DatabaseConfig.encode(message.baselineDatabaseConfig, writer.uint32(26).fork()).ldelim();}+ for (const v of message.commands) {+ SheetCommand.encode(v!, writer.uint32(34).fork()).ldelim();+ }return writer;},@@ -625,6 +642,13 @@ export const SheetPayload = {message.baselineDatabaseConfig = DatabaseConfig.decode(reader, reader.uint32());continue;+ case 4:+ if (tag !== 34) {+ break;+ }++ message.commands.push(SheetCommand.decode(reader, reader.uint32()));+ continue;}if ((tag & 7) === 4 || tag === 0) {break;@@ -641,6 +665,9 @@ export const SheetPayload = {baselineDatabaseConfig: isSet(object.baselineDatabaseConfig)? DatabaseConfig.fromJSON(object.baselineDatabaseConfig): undefined,+ commands: globalThis.Array.isArray(object?.commands)+ ? object.commands.map((e: any) => SheetCommand.fromJSON(e))+ : [],};},@@ -655,6 +682,9 @@ export const SheetPayload = {if (message.baselineDatabaseConfig !== undefined) {obj.baselineDatabaseConfig = DatabaseConfig.toJSON(message.baselineDatabaseConfig);}+ if (message.commands?.length) {+ obj.commands = message.commands.map((e) => SheetCommand.toJSON(e));+ }return obj;},@@ -671,6 +701,81 @@ export const SheetPayload = {(object.baselineDatabaseConfig !== undefined && object.baselineDatabaseConfig !== null)? DatabaseConfig.fromPartial(object.baselineDatabaseConfig): undefined;+ message.commands = object.commands?.map((e) => SheetCommand.fromPartial(e)) || [];+ return message;+ },+};++function createBaseSheetCommand(): SheetCommand {+ return { start: 0, end: 0 };+}++export const SheetCommand = {+ encode(message: SheetCommand, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.start !== 0) {+ writer.uint32(8).int32(message.start);+ }+ if (message.end !== 0) {+ writer.uint32(16).int32(message.end);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): SheetCommand {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseSheetCommand();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 8) {+ break;+ }++ message.start = reader.int32();+ continue;+ case 2:+ if (tag !== 16) {+ break;+ }++ message.end = reader.int32();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): SheetCommand {+ return {+ start: isSet(object.start) ? globalThis.Number(object.start) : 0,+ end: isSet(object.end) ? globalThis.Number(object.end) : 0,+ };+ },++ toJSON(message: SheetCommand): unknown {+ const obj: any = {};+ if (message.start !== 0) {+ obj.start = Math.round(message.start);+ }+ if (message.end !== 0) {+ obj.end = Math.round(message.end);+ }+ return obj;+ },++ create(base?: DeepPartial<SheetCommand>): SheetCommand {+ return SheetCommand.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<SheetCommand>): SheetCommand {+ const message = createBaseSheetCommand();+ message.start = object.start ?? 0;+ message.end = object.end ?? 0;return message;},};diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 27356d62e2..2f117c2eb2 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -12886,6 +12886,15 @@ components:type: stringdescription: The SQL dialect.format: enum+ SheetCommand:+ type: object+ properties:+ start:+ type: integer+ format: int32+ end:+ type: integer+ format: int32SheetPayload:type: objectproperties:@@ -12903,6 +12912,11 @@ components:allOf:- $ref: '#/components/schemas/DatabaseConfig'description: The snapshot of the baseline database config when creating the sheet.+ commands:+ type: array+ items:+ $ref: '#/components/schemas/SheetCommand'+ description: The start and end position of each command in the sheet statement.SlowQueryDetails:type: objectproperties:diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 336318a5a4..3d36253931 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -572,6 +572,7 @@- [CreateSheetRequest](#bytebase-v1-CreateSheetRequest)- [GetSheetRequest](#bytebase-v1-GetSheetRequest)- [Sheet](#bytebase-v1-Sheet)+ - [SheetCommand](#bytebase-v1-SheetCommand)- [SheetPayload](#bytebase-v1-SheetPayload)- [UpdateSheetRequest](#bytebase-v1-UpdateSheetRequest)@@ -9341,6 +9342,22 @@ We support three types of SMTP encryption: NONE, STARTTLS, and SSL/TLS.+<a name="bytebase-v1-SheetCommand"></a>++### SheetCommand++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| start | [int32](#int32) | | |+| end | [int32](#int32) | | |++++++<a name="bytebase-v1-SheetPayload"></a>### SheetPayload@@ -9352,6 +9369,7 @@ We support three types of SMTP encryption: NONE, STARTTLS, and SSL/TLS.| type | [SheetPayload.Type](#bytebase-v1-SheetPayload-Type) | | || database_config | [DatabaseConfig](#bytebase-v1-DatabaseConfig) | | The snapshot of the database config when creating the sheet, be used to compare with the baseline_database_config and apply the diff to the database. || baseline_database_config | [DatabaseConfig](#bytebase-v1-DatabaseConfig) | | The snapshot of the baseline database config when creating the sheet. |+| commands | [SheetCommand](#bytebase-v1-SheetCommand) | repeated | The start and end position of each command in the sheet statement. |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 6bdd86180b..10bd92ecbc 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -2371,6 +2371,10 @@<a href="#bytebase.v1.Sheet"><span class="badge">M</span>Sheet</a></li>+ <li>+ <a href="#bytebase.v1.SheetCommand"><span class="badge">M</span>SheetCommand</a>+ </li>+<li><a href="#bytebase.v1.SheetPayload"><span class="badge">M</span>SheetPayload</a></li>@@ -25786,6 +25790,37 @@ set the `raw` to true in GetSheet request to retrieve the full content. </p></td+ <h3 id="bytebase.v1.SheetCommand">SheetCommand</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>start</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>end</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>+++++<h3 id="bytebase.v1.SheetPayload">SheetPayload</h3><p></p>@@ -25817,6 +25852,13 @@ set the `raw` to true in GetSheet request to retrieve the full content. </p></td<td><p>The snapshot of the baseline database config when creating the sheet. </p></td></tr>+ <tr>+ <td>commands</td>+ <td><a href="#bytebase.v1.SheetCommand">SheetCommand</a></td>+ <td>repeated</td>+ <td><p>The start and end position of each command in the sheet statement. </p></td>+ </tr>+</tbody></table>diff --git a/proto/generated-go/v1/sheet_service.pb.go b/proto/generated-go/v1/sheet_service.pb.goindex 143871b726..540f35a084 100644--- a/proto/generated-go/v1/sheet_service.pb.go+++ b/proto/generated-go/v1/sheet_service.pb.go@@ -396,6 +396,8 @@ type SheetPayload struct {DatabaseConfig *DatabaseConfig `protobuf:"bytes,2,opt,name=database_config,json=databaseConfig,proto3" json:"database_config,omitempty"`// The snapshot of the baseline database config when creating the sheet.BaselineDatabaseConfig *DatabaseConfig `protobuf:"bytes,3,opt,name=baseline_database_config,json=baselineDatabaseConfig,proto3" json:"baseline_database_config,omitempty"`+ // The start and end position of each command in the sheet statement.+ Commands []*SheetCommand `protobuf:"bytes,4,rep,name=commands,proto3" json:"commands,omitempty"`}func (x *SheetPayload) Reset() {@@ -451,6 +453,68 @@ func (x *SheetPayload) GetBaselineDatabaseConfig() *DatabaseConfig {return nil}+func (x *SheetPayload) GetCommands() []*SheetCommand {+ if x != nil {+ return x.Commands+ }+ return nil+}++type SheetCommand struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ Start int32 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`+ End int32 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`+}++func (x *SheetCommand) Reset() {+ *x = SheetCommand{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_sheet_service_proto_msgTypes[5]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *SheetCommand) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*SheetCommand) ProtoMessage() {}++func (x *SheetCommand) ProtoReflect() protoreflect.Message {+ mi := &file_v1_sheet_service_proto_msgTypes[5]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use SheetCommand.ProtoReflect.Descriptor instead.+func (*SheetCommand) Descriptor() ([]byte, []int) {+ return file_v1_sheet_service_proto_rawDescGZIP(), []int{5}+}++func (x *SheetCommand) GetStart() int32 {+ if x != nil {+ return x.Start+ }+ return 0+}++func (x *SheetCommand) GetEnd() int32 {+ if x != nil {+ return x.End+ }+ return 0+}+var File_v1_sheet_service_proto protoreflect.FileDescriptorvar file_v1_sheet_service_proto_rawDesc = []byte{@@ -514,7 +578,7 @@ var file_v1_sheet_service_proto_rawDesc = []byte{0x6c, 0x6f, 0x61, 0x64, 0x12, 0x31, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x0e,0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52,- 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x22, 0x90, 0x02, 0x0a, 0x0c, 0x53, 0x68, 0x65, 0x65,+ 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x22, 0xc7, 0x02, 0x0a, 0x0c, 0x53, 0x68, 0x65, 0x65,0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61,@@ -528,37 +592,44 @@ var file_v1_sheet_service_proto_rawDesc = []byte{0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69,0x67, 0x52, 0x16, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62,- 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x2f, 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, 0x11, 0x0a, 0x0d, 0x53, 0x43, 0x48, 0x45, 0x4d,- 0x41, 0x5f, 0x44, 0x45, 0x53, 0x49, 0x47, 0x4e, 0x10, 0x01, 0x32, 0x8c, 0x03, 0x0a, 0x0c, 0x53,- 0x68, 0x65, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x0b,- 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x12, 0x1f, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,- 0x53, 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x62,- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74,- 0x22, 0x3c, 0xda, 0x41, 0x0c, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x73, 0x68, 0x65, 0x65,- 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x3a, 0x05, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22, 0x1e,- 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a,- 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x12, 0x6b,- 0x0a, 0x08, 0x47, 0x65, 0x74, 0x53, 0x68, 0x65, 0x65, 0x74, 0x12, 0x1c, 0x2e, 0x62, 0x79, 0x74,- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x65, 0x65,- 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x22, 0x2d, 0xda, 0x41,- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x76, 0x31,- 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f,- 0x2a, 0x2f, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x8b, 0x01, 0x0a, 0x0b,- 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x12, 0x1f, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,- 0x53, 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x62,- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74,- 0x22, 0x47, 0xda, 0x41, 0x11, 0x73, 0x68, 0x65, 0x65, 0x74, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74,- 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x05, 0x73, 0x68,- 0x65, 0x65, 0x74, 0x32, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x2e,- 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f,- 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 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,+ 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x6f, 0x6d,+ 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x43,+ 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73,+ 0x22, 0x2f, 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, 0x11,+ 0x0a, 0x0d, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x41, 0x5f, 0x44, 0x45, 0x53, 0x49, 0x47, 0x4e, 0x10,+ 0x01, 0x22, 0x36, 0x0a, 0x0c, 0x53, 0x68, 0x65, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e,+ 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,+ 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02,+ 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x32, 0x8c, 0x03, 0x0a, 0x0c, 0x53, 0x68,+ 0x65, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x0b, 0x43,+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53,+ 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x22,+ 0x3c, 0xda, 0x41, 0x0c, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x73, 0x68, 0x65, 0x65, 0x74,+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x3a, 0x05, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22, 0x1e, 0x2f,+ 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65,+ 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x12, 0x6b, 0x0a,+ 0x08, 0x47, 0x65, 0x74, 0x53, 0x68, 0x65, 0x65, 0x74, 0x12, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x65, 0x65, 0x74,+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x22, 0x2d, 0xda, 0x41, 0x04,+ 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x76, 0x31, 0x2f,+ 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a,+ 0x2f, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x8b, 0x01, 0x0a, 0x0b, 0x55,+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53,+ 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x22,+ 0x47, 0xda, 0x41, 0x11, 0x73, 0x68, 0x65, 0x65, 0x74, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,+ 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x05, 0x73, 0x68, 0x65,+ 0x65, 0x74, 0x32, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x2e, 0x6e,+ 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x73,+ 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 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 (@@ -574,7 +645,7 @@ func file_v1_sheet_service_proto_rawDescGZIP() []byte {}var file_v1_sheet_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)-var file_v1_sheet_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5)+var file_v1_sheet_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6)var file_v1_sheet_service_proto_goTypes = []interface{}{(SheetPayload_Type)(0), // 0: bytebase.v1.SheetPayload.Type(*CreateSheetRequest)(nil), // 1: bytebase.v1.CreateSheetRequest@@ -582,33 +653,35 @@ var file_v1_sheet_service_proto_goTypes = []interface{}{(*UpdateSheetRequest)(nil), // 3: bytebase.v1.UpdateSheetRequest(*Sheet)(nil), // 4: bytebase.v1.Sheet(*SheetPayload)(nil), // 5: bytebase.v1.SheetPayload- (*fieldmaskpb.FieldMask)(nil), // 6: google.protobuf.FieldMask- (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp- (Engine)(0), // 8: bytebase.v1.Engine- (*DatabaseConfig)(nil), // 9: bytebase.v1.DatabaseConfig+ (*SheetCommand)(nil), // 6: bytebase.v1.SheetCommand+ (*fieldmaskpb.FieldMask)(nil), // 7: google.protobuf.FieldMask+ (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp+ (Engine)(0), // 9: bytebase.v1.Engine+ (*DatabaseConfig)(nil), // 10: bytebase.v1.DatabaseConfig}var file_v1_sheet_service_proto_depIdxs = []int32{4, // 0: bytebase.v1.CreateSheetRequest.sheet:type_name -> bytebase.v1.Sheet4, // 1: bytebase.v1.UpdateSheetRequest.sheet:type_name -> bytebase.v1.Sheet- 6, // 2: bytebase.v1.UpdateSheetRequest.update_mask:type_name -> google.protobuf.FieldMask- 7, // 3: bytebase.v1.Sheet.create_time:type_name -> google.protobuf.Timestamp- 7, // 4: bytebase.v1.Sheet.update_time:type_name -> google.protobuf.Timestamp+ 7, // 2: bytebase.v1.UpdateSheetRequest.update_mask:type_name -> google.protobuf.FieldMask+ 8, // 3: bytebase.v1.Sheet.create_time:type_name -> google.protobuf.Timestamp+ 8, // 4: bytebase.v1.Sheet.update_time:type_name -> google.protobuf.Timestamp5, // 5: bytebase.v1.Sheet.payload:type_name -> bytebase.v1.SheetPayload- 8, // 6: bytebase.v1.Sheet.engine:type_name -> bytebase.v1.Engine+ 9, // 6: bytebase.v1.Sheet.engine:type_name -> bytebase.v1.Engine0, // 7: bytebase.v1.SheetPayload.type:type_name -> bytebase.v1.SheetPayload.Type- 9, // 8: bytebase.v1.SheetPayload.database_config:type_name -> bytebase.v1.DatabaseConfig- 9, // 9: bytebase.v1.SheetPayload.baseline_database_config:type_name -> bytebase.v1.DatabaseConfig- 1, // 10: bytebase.v1.SheetService.CreateSheet:input_type -> bytebase.v1.CreateSheetRequest- 2, // 11: bytebase.v1.SheetService.GetSheet:input_type -> bytebase.v1.GetSheetRequest- 3, // 12: bytebase.v1.SheetService.UpdateSheet:input_type -> bytebase.v1.UpdateSheetRequest- 4, // 13: bytebase.v1.SheetService.CreateSheet:output_type -> bytebase.v1.Sheet- 4, // 14: bytebase.v1.SheetService.GetSheet:output_type -> bytebase.v1.Sheet- 4, // 15: bytebase.v1.SheetService.UpdateSheet:output_type -> bytebase.v1.Sheet- 13, // [13:16] is the sub-list for method output_type- 10, // [10:13] 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+ 10, // 8: bytebase.v1.SheetPayload.database_config:type_name -> bytebase.v1.DatabaseConfig+ 10, // 9: bytebase.v1.SheetPayload.baseline_database_config:type_name -> bytebase.v1.DatabaseConfig+ 6, // 10: bytebase.v1.SheetPayload.commands:type_name -> bytebase.v1.SheetCommand+ 1, // 11: bytebase.v1.SheetService.CreateSheet:input_type -> bytebase.v1.CreateSheetRequest+ 2, // 12: bytebase.v1.SheetService.GetSheet:input_type -> bytebase.v1.GetSheetRequest+ 3, // 13: bytebase.v1.SheetService.UpdateSheet:input_type -> bytebase.v1.UpdateSheetRequest+ 4, // 14: bytebase.v1.SheetService.CreateSheet:output_type -> bytebase.v1.Sheet+ 4, // 15: bytebase.v1.SheetService.GetSheet:output_type -> bytebase.v1.Sheet+ 4, // 16: bytebase.v1.SheetService.UpdateSheet:output_type -> bytebase.v1.Sheet+ 14, // [14:17] is the sub-list for method output_type+ 11, // [11:14] is the sub-list for method input_type+ 11, // [11:11] is the sub-list for extension type_name+ 11, // [11:11] is the sub-list for extension extendee+ 0, // [0:11] is the sub-list for field type_name}func init() { file_v1_sheet_service_proto_init() }@@ -679,6 +752,18 @@ func file_v1_sheet_service_proto_init() {return nil}}+ file_v1_sheet_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*SheetCommand); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }}type x struct{}out := protoimpl.TypeBuilder{@@ -686,7 +771,7 @@ func file_v1_sheet_service_proto_init() {GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: file_v1_sheet_service_proto_rawDesc,NumEnums: 1,- NumMessages: 5,+ NumMessages: 6,NumExtensions: 0,NumServices: 1,},diff --git a/proto/v1/sheet_service.proto b/proto/v1/sheet_service.protoindex f602b894e2..733ff22b60 100644--- a/proto/v1/sheet_service.proto+++ b/proto/v1/sheet_service.proto@@ -123,4 +123,12 @@ message SheetPayload {// The snapshot of the baseline database config when creating the sheet.DatabaseConfig baseline_database_config = 3;++ // The start and end position of each command in the sheet statement.+ repeated SheetCommand commands = 4;+}++message SheetCommand {+ int32 start = 1;+ int32 end = 2;}