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: add slow query api and protobuf definition (#5354)
rebelicec1780ab5934a
diff --git a/frontend/src/types/proto/google/protobuf/descriptor.ts b/frontend/src/types/proto/google/protobuf/descriptor.tsindex 732b3e57d6..71146cb3cc 100644--- a/frontend/src/types/proto/google/protobuf/descriptor.ts+++ b/frontend/src/types/proto/google/protobuf/descriptor.ts@@ -42,9 +42,13 @@ export interface FileDescriptorProto {sourceCodeInfo?: SourceCodeInfo;/*** The syntax of the proto file.- * The supported values are "proto2" and "proto3".+ * The supported values are "proto2", "proto3", and "editions".+ *+ * If `edition` is present, this value must be "editions".*/syntax: string;+ /** The edition of the proto file, which is an opaque string. */+ edition: string;}/** Describes a message type. */@@ -619,6 +623,10 @@ export interface MessageOptions {*/deprecated: boolean;/**+ * NOTE: Do not set the option in .proto files. Always use the maps syntax+ * instead. The option should only be implicitly set by the proto compiler+ * parser.+ ** Whether the message is an automatically generated map entry type for the* maps field.*@@ -636,12 +644,23 @@ export interface MessageOptions {* use a native map in the target language to hold the keys and values.* The reflection APIs in such implementations still need to work as* if the field is a repeated message field.- *- * NOTE: Do not set the option in .proto files. Always use the maps syntax- * instead. The option should only be implicitly set by the proto compiler- * parser.*/mapEntry: boolean;+ /**+ * Enable the legacy handling of JSON field name conflicts. This lowercases+ * and strips underscored from the fields before comparison in proto3 only.+ * The new behavior takes `json_name` into account and applies to proto2 as+ * well.+ *+ * This should only be used as a temporary measure against broken builds due+ * to the change in behavior for JSON field name conflicts.+ *+ * TODO(b/261750190) This is legacy behavior we plan to remove once downstream+ * teams have had time to migrate.+ *+ * @deprecated+ */+ deprecatedLegacyJsonFieldConflicts: boolean;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}@@ -705,11 +724,8 @@ export interface FieldOptions {* check its required fields, regardless of whether or not the message has* been parsed.*- * As of 2021, lazy does no correctness checks on the byte stream during- * parsing. This may lead to crashes if and when an invalid byte stream is- * finally parsed upon access.- *- * TODO(b/211906113): Enable validation on lazy fields.+ * As of May 2022, lazy verifies the contents of the byte stream during+ * parsing. An invalid byte stream will cause the overall parsing to fail.*/lazy: boolean;/**@@ -727,6 +743,13 @@ export interface FieldOptions {deprecated: boolean;/** For Google-internal migration only. Do not use. */weak: boolean;+ /**+ * Indicate that the field value should not be printed out when using debug+ * formats, e.g. when the field contains sensitive credentials.+ */+ debugRedact: boolean;+ retention: FieldOptions_OptionRetention;+ target: FieldOptions_OptionTargetType;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}@@ -813,6 +836,137 @@ export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string {}}+/**+ * If set to RETENTION_SOURCE, the option will be omitted from the binary.+ * Note: as of January 2023, support for this is in progress and does not yet+ * have an effect (b/264593489).+ */+export enum FieldOptions_OptionRetention {+ RETENTION_UNKNOWN = 0,+ RETENTION_RUNTIME = 1,+ RETENTION_SOURCE = 2,+ UNRECOGNIZED = -1,+}++export function fieldOptions_OptionRetentionFromJSON(object: any): FieldOptions_OptionRetention {+ switch (object) {+ case 0:+ case "RETENTION_UNKNOWN":+ return FieldOptions_OptionRetention.RETENTION_UNKNOWN;+ case 1:+ case "RETENTION_RUNTIME":+ return FieldOptions_OptionRetention.RETENTION_RUNTIME;+ case 2:+ case "RETENTION_SOURCE":+ return FieldOptions_OptionRetention.RETENTION_SOURCE;+ case -1:+ case "UNRECOGNIZED":+ default:+ return FieldOptions_OptionRetention.UNRECOGNIZED;+ }+}++export function fieldOptions_OptionRetentionToJSON(object: FieldOptions_OptionRetention): string {+ switch (object) {+ case FieldOptions_OptionRetention.RETENTION_UNKNOWN:+ return "RETENTION_UNKNOWN";+ case FieldOptions_OptionRetention.RETENTION_RUNTIME:+ return "RETENTION_RUNTIME";+ case FieldOptions_OptionRetention.RETENTION_SOURCE:+ return "RETENTION_SOURCE";+ case FieldOptions_OptionRetention.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++/**+ * This indicates the types of entities that the field may apply to when used+ * as an option. If it is unset, then the field may be freely used as an+ * option on any kind of entity. Note: as of January 2023, support for this is+ * in progress and does not yet have an effect (b/264593489).+ */+export enum FieldOptions_OptionTargetType {+ TARGET_TYPE_UNKNOWN = 0,+ TARGET_TYPE_FILE = 1,+ TARGET_TYPE_EXTENSION_RANGE = 2,+ TARGET_TYPE_MESSAGE = 3,+ TARGET_TYPE_FIELD = 4,+ TARGET_TYPE_ONEOF = 5,+ TARGET_TYPE_ENUM = 6,+ TARGET_TYPE_ENUM_ENTRY = 7,+ TARGET_TYPE_SERVICE = 8,+ TARGET_TYPE_METHOD = 9,+ UNRECOGNIZED = -1,+}++export function fieldOptions_OptionTargetTypeFromJSON(object: any): FieldOptions_OptionTargetType {+ switch (object) {+ case 0:+ case "TARGET_TYPE_UNKNOWN":+ return FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN;+ case 1:+ case "TARGET_TYPE_FILE":+ return FieldOptions_OptionTargetType.TARGET_TYPE_FILE;+ case 2:+ case "TARGET_TYPE_EXTENSION_RANGE":+ return FieldOptions_OptionTargetType.TARGET_TYPE_EXTENSION_RANGE;+ case 3:+ case "TARGET_TYPE_MESSAGE":+ return FieldOptions_OptionTargetType.TARGET_TYPE_MESSAGE;+ case 4:+ case "TARGET_TYPE_FIELD":+ return FieldOptions_OptionTargetType.TARGET_TYPE_FIELD;+ case 5:+ case "TARGET_TYPE_ONEOF":+ return FieldOptions_OptionTargetType.TARGET_TYPE_ONEOF;+ case 6:+ case "TARGET_TYPE_ENUM":+ return FieldOptions_OptionTargetType.TARGET_TYPE_ENUM;+ case 7:+ case "TARGET_TYPE_ENUM_ENTRY":+ return FieldOptions_OptionTargetType.TARGET_TYPE_ENUM_ENTRY;+ case 8:+ case "TARGET_TYPE_SERVICE":+ return FieldOptions_OptionTargetType.TARGET_TYPE_SERVICE;+ case 9:+ case "TARGET_TYPE_METHOD":+ return FieldOptions_OptionTargetType.TARGET_TYPE_METHOD;+ case -1:+ case "UNRECOGNIZED":+ default:+ return FieldOptions_OptionTargetType.UNRECOGNIZED;+ }+}++export function fieldOptions_OptionTargetTypeToJSON(object: FieldOptions_OptionTargetType): string {+ switch (object) {+ case FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN:+ return "TARGET_TYPE_UNKNOWN";+ case FieldOptions_OptionTargetType.TARGET_TYPE_FILE:+ return "TARGET_TYPE_FILE";+ case FieldOptions_OptionTargetType.TARGET_TYPE_EXTENSION_RANGE:+ return "TARGET_TYPE_EXTENSION_RANGE";+ case FieldOptions_OptionTargetType.TARGET_TYPE_MESSAGE:+ return "TARGET_TYPE_MESSAGE";+ case FieldOptions_OptionTargetType.TARGET_TYPE_FIELD:+ return "TARGET_TYPE_FIELD";+ case FieldOptions_OptionTargetType.TARGET_TYPE_ONEOF:+ return "TARGET_TYPE_ONEOF";+ case FieldOptions_OptionTargetType.TARGET_TYPE_ENUM:+ return "TARGET_TYPE_ENUM";+ case FieldOptions_OptionTargetType.TARGET_TYPE_ENUM_ENTRY:+ return "TARGET_TYPE_ENUM_ENTRY";+ case FieldOptions_OptionTargetType.TARGET_TYPE_SERVICE:+ return "TARGET_TYPE_SERVICE";+ case FieldOptions_OptionTargetType.TARGET_TYPE_METHOD:+ return "TARGET_TYPE_METHOD";+ case FieldOptions_OptionTargetType.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}+export interface OneofOptions {/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];@@ -831,6 +985,17 @@ export interface EnumOptions {* is a formalization for deprecating enums.*/deprecated: boolean;+ /**+ * Enable the legacy handling of JSON field name conflicts. This lowercases+ * and strips underscored from the fields before comparison in proto3 only.+ * The new behavior takes `json_name` into account and applies to proto2 as+ * well.+ * TODO(b/261750190) Remove this legacy behavior once downstream teams have+ * had time to migrate.+ *+ * @deprecated+ */+ deprecatedLegacyJsonFieldConflicts: boolean;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}@@ -1122,10 +1287,57 @@ export interface GeneratedCodeInfo_Annotation {begin: number;/*** Identifies the ending offset in bytes in the generated code that- * relates to the identified offset. The end offset should be one past+ * relates to the identified object. The end offset should be one past* the last relevant byte (so the length of the text = end - begin).*/end: number;+ semantic: GeneratedCodeInfo_Annotation_Semantic;+}++/**+ * Represents the identified object's effect on the element in the original+ * .proto file.+ */+export enum GeneratedCodeInfo_Annotation_Semantic {+ /** NONE - There is no effect or the effect is indescribable. */+ NONE = 0,+ /** SET - The element is set or otherwise mutated. */+ SET = 1,+ /** ALIAS - An alias to the element is returned. */+ ALIAS = 2,+ UNRECOGNIZED = -1,+}++export function generatedCodeInfo_Annotation_SemanticFromJSON(object: any): GeneratedCodeInfo_Annotation_Semantic {+ switch (object) {+ case 0:+ case "NONE":+ return GeneratedCodeInfo_Annotation_Semantic.NONE;+ case 1:+ case "SET":+ return GeneratedCodeInfo_Annotation_Semantic.SET;+ case 2:+ case "ALIAS":+ return GeneratedCodeInfo_Annotation_Semantic.ALIAS;+ case -1:+ case "UNRECOGNIZED":+ default:+ return GeneratedCodeInfo_Annotation_Semantic.UNRECOGNIZED;+ }+}++export function generatedCodeInfo_Annotation_SemanticToJSON(object: GeneratedCodeInfo_Annotation_Semantic): string {+ switch (object) {+ case GeneratedCodeInfo_Annotation_Semantic.NONE:+ return "NONE";+ case GeneratedCodeInfo_Annotation_Semantic.SET:+ return "SET";+ case GeneratedCodeInfo_Annotation_Semantic.ALIAS:+ return "ALIAS";+ case GeneratedCodeInfo_Annotation_Semantic.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }}function createBaseFileDescriptorSet(): FileDescriptorSet {@@ -1202,6 +1414,7 @@ function createBaseFileDescriptorProto(): FileDescriptorProto {options: undefined,sourceCodeInfo: undefined,syntax: "",+ edition: "",};}@@ -1247,6 +1460,9 @@ export const FileDescriptorProto = {if (message.syntax !== "") {writer.uint32(98).string(message.syntax);}+ if (message.edition !== "") {+ writer.uint32(106).string(message.edition);+ }return writer;},@@ -1359,6 +1575,13 @@ export const FileDescriptorProto = {message.syntax = reader.string();continue;+ case 13:+ if (tag != 106) {+ break;+ }++ message.edition = reader.string();+ continue;}if ((tag & 7) == 4 || tag == 0) {break;@@ -1388,6 +1611,7 @@ export const FileDescriptorProto = {options: isSet(object.options) ? FileOptions.fromJSON(object.options) : undefined,sourceCodeInfo: isSet(object.sourceCodeInfo) ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) : undefined,syntax: isSet(object.syntax) ? String(object.syntax) : "",+ edition: isSet(object.edition) ? String(object.edition) : "",};},@@ -1434,6 +1658,7 @@ export const FileDescriptorProto = {message.sourceCodeInfo !== undefined &&(obj.sourceCodeInfo = message.sourceCodeInfo ? SourceCodeInfo.toJSON(message.sourceCodeInfo) : undefined);message.syntax !== undefined && (obj.syntax = message.syntax);+ message.edition !== undefined && (obj.edition = message.edition);return obj;},@@ -1459,6 +1684,7 @@ export const FileDescriptorProto = {? SourceCodeInfo.fromPartial(object.sourceCodeInfo): undefined;message.syntax = object.syntax ?? "";+ message.edition = object.edition ?? "";return message;},};@@ -3051,6 +3277,7 @@ function createBaseMessageOptions(): MessageOptions {noStandardDescriptorAccessor: false,deprecated: false,mapEntry: false,+ deprecatedLegacyJsonFieldConflicts: false,uninterpretedOption: [],};}@@ -3069,6 +3296,9 @@ export const MessageOptions = {if (message.mapEntry === true) {writer.uint32(56).bool(message.mapEntry);}+ if (message.deprecatedLegacyJsonFieldConflicts === true) {+ writer.uint32(88).bool(message.deprecatedLegacyJsonFieldConflicts);+ }for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}@@ -3110,6 +3340,13 @@ export const MessageOptions = {message.mapEntry = reader.bool();continue;+ case 11:+ if (tag != 88) {+ break;+ }++ message.deprecatedLegacyJsonFieldConflicts = reader.bool();+ continue;case 999:if (tag != 7994) {break;@@ -3134,6 +3371,9 @@ export const MessageOptions = {: false,deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,mapEntry: isSet(object.mapEntry) ? Boolean(object.mapEntry) : false,+ deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)+ ? Boolean(object.deprecatedLegacyJsonFieldConflicts)+ : false,uninterpretedOption: Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -3147,6 +3387,8 @@ export const MessageOptions = {(obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor);message.deprecated !== undefined && (obj.deprecated = message.deprecated);message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry);+ message.deprecatedLegacyJsonFieldConflicts !== undefined &&+ (obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts);if (message.uninterpretedOption) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);} else {@@ -3165,6 +3407,7 @@ export const MessageOptions = {message.noStandardDescriptorAccessor = object.noStandardDescriptorAccessor ?? false;message.deprecated = object.deprecated ?? false;message.mapEntry = object.mapEntry ?? false;+ message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},@@ -3179,6 +3422,9 @@ function createBaseFieldOptions(): FieldOptions {unverifiedLazy: false,deprecated: false,weak: false,+ debugRedact: false,+ retention: 0,+ target: 0,uninterpretedOption: [],};}@@ -3206,6 +3452,15 @@ export const FieldOptions = {if (message.weak === true) {writer.uint32(80).bool(message.weak);}+ if (message.debugRedact === true) {+ writer.uint32(128).bool(message.debugRedact);+ }+ if (message.retention !== 0) {+ writer.uint32(136).int32(message.retention);+ }+ if (message.target !== 0) {+ writer.uint32(144).int32(message.target);+ }for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}@@ -3268,6 +3523,27 @@ export const FieldOptions = {message.weak = reader.bool();continue;+ case 16:+ if (tag != 128) {+ break;+ }++ message.debugRedact = reader.bool();+ continue;+ case 17:+ if (tag != 136) {+ break;+ }++ message.retention = reader.int32() as any;+ continue;+ case 18:+ if (tag != 144) {+ break;+ }++ message.target = reader.int32() as any;+ continue;case 999:if (tag != 7994) {break;@@ -3293,6 +3569,9 @@ export const FieldOptions = {unverifiedLazy: isSet(object.unverifiedLazy) ? Boolean(object.unverifiedLazy) : false,deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,weak: isSet(object.weak) ? Boolean(object.weak) : false,+ debugRedact: isSet(object.debugRedact) ? Boolean(object.debugRedact) : false,+ retention: isSet(object.retention) ? fieldOptions_OptionRetentionFromJSON(object.retention) : 0,+ target: isSet(object.target) ? fieldOptions_OptionTargetTypeFromJSON(object.target) : 0,uninterpretedOption: Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -3308,6 +3587,9 @@ export const FieldOptions = {message.unverifiedLazy !== undefined && (obj.unverifiedLazy = message.unverifiedLazy);message.deprecated !== undefined && (obj.deprecated = message.deprecated);message.weak !== undefined && (obj.weak = message.weak);+ message.debugRedact !== undefined && (obj.debugRedact = message.debugRedact);+ message.retention !== undefined && (obj.retention = fieldOptions_OptionRetentionToJSON(message.retention));+ message.target !== undefined && (obj.target = fieldOptions_OptionTargetTypeToJSON(message.target));if (message.uninterpretedOption) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);} else {@@ -3329,6 +3611,9 @@ export const FieldOptions = {message.unverifiedLazy = object.unverifiedLazy ?? false;message.deprecated = object.deprecated ?? false;message.weak = object.weak ?? false;+ message.debugRedact = object.debugRedact ?? false;+ message.retention = object.retention ?? 0;+ message.target = object.target ?? 0;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},@@ -3399,7 +3684,7 @@ export const OneofOptions = {};function createBaseEnumOptions(): EnumOptions {- return { allowAlias: false, deprecated: false, uninterpretedOption: [] };+ return { allowAlias: false, deprecated: false, deprecatedLegacyJsonFieldConflicts: false, uninterpretedOption: [] };}export const EnumOptions = {@@ -3410,6 +3695,9 @@ export const EnumOptions = {if (message.deprecated === true) {writer.uint32(24).bool(message.deprecated);}+ if (message.deprecatedLegacyJsonFieldConflicts === true) {+ writer.uint32(48).bool(message.deprecatedLegacyJsonFieldConflicts);+ }for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}@@ -3437,6 +3725,13 @@ export const EnumOptions = {message.deprecated = reader.bool();continue;+ case 6:+ if (tag != 48) {+ break;+ }++ message.deprecatedLegacyJsonFieldConflicts = reader.bool();+ continue;case 999:if (tag != 7994) {break;@@ -3457,6 +3752,9 @@ export const EnumOptions = {return {allowAlias: isSet(object.allowAlias) ? Boolean(object.allowAlias) : false,deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,+ deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)+ ? Boolean(object.deprecatedLegacyJsonFieldConflicts)+ : false,uninterpretedOption: Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -3467,6 +3765,8 @@ export const EnumOptions = {const obj: any = {};message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias);message.deprecated !== undefined && (obj.deprecated = message.deprecated);+ message.deprecatedLegacyJsonFieldConflicts !== undefined &&+ (obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts);if (message.uninterpretedOption) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);} else {@@ -3483,6 +3783,7 @@ export const EnumOptions = {const message = createBaseEnumOptions();message.allowAlias = object.allowAlias ?? false;message.deprecated = object.deprecated ?? false;+ message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},@@ -4230,7 +4531,7 @@ export const GeneratedCodeInfo = {};function createBaseGeneratedCodeInfo_Annotation(): GeneratedCodeInfo_Annotation {- return { path: [], sourceFile: "", begin: 0, end: 0 };+ return { path: [], sourceFile: "", begin: 0, end: 0, semantic: 0 };}export const GeneratedCodeInfo_Annotation = {@@ -4249,6 +4550,9 @@ export const GeneratedCodeInfo_Annotation = {if (message.end !== 0) {writer.uint32(32).int32(message.end);}+ if (message.semantic !== 0) {+ writer.uint32(40).int32(message.semantic);+ }return writer;},@@ -4296,6 +4600,13 @@ export const GeneratedCodeInfo_Annotation = {message.end = reader.int32();continue;+ case 5:+ if (tag != 40) {+ break;+ }++ message.semantic = reader.int32() as any;+ continue;}if ((tag & 7) == 4 || tag == 0) {break;@@ -4311,6 +4622,7 @@ export const GeneratedCodeInfo_Annotation = {sourceFile: isSet(object.sourceFile) ? String(object.sourceFile) : "",begin: isSet(object.begin) ? Number(object.begin) : 0,end: isSet(object.end) ? Number(object.end) : 0,+ semantic: isSet(object.semantic) ? generatedCodeInfo_Annotation_SemanticFromJSON(object.semantic) : 0,};},@@ -4324,6 +4636,7 @@ export const GeneratedCodeInfo_Annotation = {message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile);message.begin !== undefined && (obj.begin = Math.round(message.begin));message.end !== undefined && (obj.end = Math.round(message.end));+ message.semantic !== undefined && (obj.semantic = generatedCodeInfo_Annotation_SemanticToJSON(message.semantic));return obj;},@@ -4337,6 +4650,7 @@ export const GeneratedCodeInfo_Annotation = {message.sourceFile = object.sourceFile ?? "";message.begin = object.begin ?? 0;message.end = object.end ?? 0;+ message.semantic = object.semantic ?? 0;return message;},};diff --git a/frontend/src/types/proto/google/type/interval.ts b/frontend/src/types/proto/google/type/interval.tsnew file mode 100644index 0000000000..21a0f56d98--- /dev/null+++ b/frontend/src/types/proto/google/type/interval.ts@@ -0,0 +1,134 @@+/* eslint-disable */+import * as _m0 from "protobufjs/minimal";+import { Timestamp } from "../protobuf/timestamp";++export const protobufPackage = "google.type";++/**+ * Represents a time interval, encoded as a Timestamp start (inclusive) and a+ * Timestamp end (exclusive).+ *+ * The start must be less than or equal to the end.+ * When the start equals the end, the interval is empty (matches no time).+ * When both start and end are unspecified, the interval matches any time.+ */+export interface Interval {+ /**+ * Optional. Inclusive start of the interval.+ *+ * If specified, a Timestamp matching this interval will have to be the same+ * or after the start.+ */+ startTime?: Date;+ /**+ * Optional. Exclusive end of the interval.+ *+ * If specified, a Timestamp matching this interval will have to be before the+ * end.+ */+ endTime?: Date;+}++function createBaseInterval(): Interval {+ return { startTime: undefined, endTime: undefined };+}++export const Interval = {+ encode(message: Interval, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.startTime !== undefined) {+ Timestamp.encode(toTimestamp(message.startTime), writer.uint32(10).fork()).ldelim();+ }+ if (message.endTime !== undefined) {+ Timestamp.encode(toTimestamp(message.endTime), writer.uint32(18).fork()).ldelim();+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): Interval {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseInterval();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag != 10) {+ break;+ }++ message.startTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));+ continue;+ case 2:+ if (tag != 18) {+ break;+ }++ message.endTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));+ continue;+ }+ if ((tag & 7) == 4 || tag == 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): Interval {+ return {+ startTime: isSet(object.startTime) ? fromJsonTimestamp(object.startTime) : undefined,+ endTime: isSet(object.endTime) ? fromJsonTimestamp(object.endTime) : undefined,+ };+ },++ toJSON(message: Interval): unknown {+ const obj: any = {};+ message.startTime !== undefined && (obj.startTime = message.startTime.toISOString());+ message.endTime !== undefined && (obj.endTime = message.endTime.toISOString());+ return obj;+ },++ create(base?: DeepPartial<Interval>): Interval {+ return Interval.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<Interval>): Interval {+ const message = createBaseInterval();+ message.startTime = object.startTime ?? undefined;+ message.endTime = object.endTime ?? undefined;+ return message;+ },+};++type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;++export type DeepPartial<T> = T extends Builtin ? T+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }+ : Partial<T>;++function toTimestamp(date: Date): Timestamp {+ const seconds = date.getTime() / 1_000;+ const nanos = (date.getTime() % 1_000) * 1_000_000;+ return { seconds, nanos };+}++function fromTimestamp(t: Timestamp): Date {+ let millis = t.seconds * 1_000;+ millis += t.nanos / 1_000_000;+ return new Date(millis);+}++function fromJsonTimestamp(o: any): Date {+ if (o instanceof Date) {+ return o;+ } else if (typeof o === "string") {+ return new Date(o);+ } else {+ return fromTimestamp(Timestamp.fromJSON(o));+ }+}++function isSet(value: any): boolean {+ return value !== null && value !== undefined;+}diff --git a/frontend/src/types/proto/v1/database_service.ts b/frontend/src/types/proto/v1/database_service.tsindex 563bfcf51d..e53f8a3574 100644--- a/frontend/src/types/proto/v1/database_service.ts+++ b/frontend/src/types/proto/v1/database_service.ts@@ -500,6 +500,95 @@ export function backup_BackupStateToJSON(object: Backup_BackupState): string {}}+/** ListSlowQueriesRequest is the request of listing slow query. */+export interface ListSlowQueriesRequest {+ /**+ * The filter of the slow query log.+ * follow the [ebnf](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form) syntax.+ * Support filter by project and start_time in SlowQueryDetails for now.+ * For example:+ * Search the slow query log of the specific project:+ * - the specific project: project = "projects/{project}"+ * Search the slow query log that start_time after 2022-01-01T12:00:00.000Z:+ * - start_time > "2022-01-01T12:00:00.000Z"+ * - Should use [RFC-3339 format](https://www.rfc-editor.org/rfc/rfc3339).+ * - Currently we only support filtering down to date granularity.+ */+ filter: string;+ /**+ * The order by of the slow query log.+ * Support order by count, latest_log_time, average_query_time, nighty_fifth_percentile_query_time,+ * average_rows_sent, nighty_fifth_percentile_rows_sent, average_rows_examined, nighty_fifth_percentile_rows_examined for now.+ * For example:+ * - order by count: order_by = "count"+ * - order by latest_log_time desc: order_by = "latest_log_time desc"+ * Default: order by nighty_fifth_percentile_query_time desc.+ */+ orderBy: string;+}++/** ListSlowQueriesResponse is the response of listing slow query. */+export interface ListSlowQueriesResponse {+ /** The slow query logs. */+ slowQueryLogs: SlowQueryLog[];+}++/** SlowQueryLog is the slow query log. */+export interface SlowQueryLog {+ /**+ * The resource of the slow query log.+ * The format is "environments/{environment}/instances/{instance}/databases/{database}".+ */+ resource: string;+ /**+ * The project of the slow query log.+ * The format is "projects/{project}".+ */+ project: string;+ /** The statistics of the slow query log. */+ statistics?: SlowQueryStatistics;+}++/** SlowQueryStatistics is the statistics of the slow query log. */+export interface SlowQueryStatistics {+ /** The fingerprint of the slow query log. */+ sqlFingerprint: string;+ /** The count of the slow query log. */+ count: number;+ /** The latest log time of the slow query log. */+ latestLogTime?: Date;+ /** The average query time of the slow query log. */+ averageQueryTime?: Duration;+ /** The nighty fifth percentile query time of the slow query log. */+ nightyFifthPercentileQueryTime?: Duration;+ /** The average rows sent of the slow query log. */+ averageRowsSent: number;+ /** The nighty fifth percentile rows sent of the slow query log. */+ nightyFifthPercentileRowsSent: number;+ /** The average rows examined of the slow query log. */+ averageRowsExamined: number;+ /** The nighty fifth percentile rows examined of the slow query log. */+ nightyFifthPercentileRowsExamined: number;+ /** The details of the slow query log. */+ details: SlowQueryDetails[];+}++/** SlowQueryDetails is the details of the slow query log. */+export interface SlowQueryDetails {+ /** The start time of the slow query log. */+ startTime?: Date;+ /** The query time of the slow query log. */+ queryTime?: Duration;+ /** The lock time of the slow query log. */+ lockTime?: Duration;+ /** The rows sent of the slow query log. */+ rowsSent: number;+ /** The rows examined of the slow query log. */+ rowsExamined: number;+ /** The sql text of the slow query log. */+ sqlText: string;+}+function createBaseGetDatabaseRequest(): GetDatabaseRequest {return { name: "" };}@@ -3093,6 +3182,563 @@ export const Backup = {},};+function createBaseListSlowQueriesRequest(): ListSlowQueriesRequest {+ return { filter: "", orderBy: "" };+}++export const ListSlowQueriesRequest = {+ encode(message: ListSlowQueriesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.filter !== "") {+ writer.uint32(10).string(message.filter);+ }+ if (message.orderBy !== "") {+ writer.uint32(18).string(message.orderBy);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): ListSlowQueriesRequest {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseListSlowQueriesRequest();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag != 10) {+ break;+ }++ message.filter = reader.string();+ continue;+ case 2:+ if (tag != 18) {+ break;+ }++ message.orderBy = reader.string();+ continue;+ }+ if ((tag & 7) == 4 || tag == 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): ListSlowQueriesRequest {+ return {+ filter: isSet(object.filter) ? String(object.filter) : "",+ orderBy: isSet(object.orderBy) ? String(object.orderBy) : "",+ };+ },++ toJSON(message: ListSlowQueriesRequest): unknown {+ const obj: any = {};+ message.filter !== undefined && (obj.filter = message.filter);+ message.orderBy !== undefined && (obj.orderBy = message.orderBy);+ return obj;+ },++ create(base?: DeepPartial<ListSlowQueriesRequest>): ListSlowQueriesRequest {+ return ListSlowQueriesRequest.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<ListSlowQueriesRequest>): ListSlowQueriesRequest {+ const message = createBaseListSlowQueriesRequest();+ message.filter = object.filter ?? "";+ message.orderBy = object.orderBy ?? "";+ return message;+ },+};++function createBaseListSlowQueriesResponse(): ListSlowQueriesResponse {+ return { slowQueryLogs: [] };+}++export const ListSlowQueriesResponse = {+ encode(message: ListSlowQueriesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ for (const v of message.slowQueryLogs) {+ SlowQueryLog.encode(v!, writer.uint32(10).fork()).ldelim();+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): ListSlowQueriesResponse {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseListSlowQueriesResponse();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag != 10) {+ break;+ }++ message.slowQueryLogs.push(SlowQueryLog.decode(reader, reader.uint32()));+ continue;+ }+ if ((tag & 7) == 4 || tag == 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): ListSlowQueriesResponse {+ return {+ slowQueryLogs: Array.isArray(object?.slowQueryLogs)+ ? object.slowQueryLogs.map((e: any) => SlowQueryLog.fromJSON(e))+ : [],+ };+ },++ toJSON(message: ListSlowQueriesResponse): unknown {+ const obj: any = {};+ if (message.slowQueryLogs) {+ obj.slowQueryLogs = message.slowQueryLogs.map((e) => e ? SlowQueryLog.toJSON(e) : undefined);+ } else {+ obj.slowQueryLogs = [];+ }+ return obj;+ },++ create(base?: DeepPartial<ListSlowQueriesResponse>): ListSlowQueriesResponse {+ return ListSlowQueriesResponse.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<ListSlowQueriesResponse>): ListSlowQueriesResponse {+ const message = createBaseListSlowQueriesResponse();+ message.slowQueryLogs = object.slowQueryLogs?.map((e) => SlowQueryLog.fromPartial(e)) || [];+ return message;+ },+};++function createBaseSlowQueryLog(): SlowQueryLog {+ return { resource: "", project: "", statistics: undefined };+}++export const SlowQueryLog = {+ encode(message: SlowQueryLog, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.resource !== "") {+ writer.uint32(10).string(message.resource);+ }+ if (message.project !== "") {+ writer.uint32(18).string(message.project);+ }+ if (message.statistics !== undefined) {+ SlowQueryStatistics.encode(message.statistics, writer.uint32(26).fork()).ldelim();+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): SlowQueryLog {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseSlowQueryLog();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag != 10) {+ break;+ }++ message.resource = reader.string();+ continue;+ case 2:+ if (tag != 18) {+ break;+ }++ message.project = reader.string();+ continue;+ case 3:+ if (tag != 26) {+ break;+ }++ message.statistics = SlowQueryStatistics.decode(reader, reader.uint32());+ continue;+ }+ if ((tag & 7) == 4 || tag == 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): SlowQueryLog {+ return {+ resource: isSet(object.resource) ? String(object.resource) : "",+ project: isSet(object.project) ? String(object.project) : "",+ statistics: isSet(object.statistics) ? SlowQueryStatistics.fromJSON(object.statistics) : undefined,+ };+ },++ toJSON(message: SlowQueryLog): unknown {+ const obj: any = {};+ message.resource !== undefined && (obj.resource = message.resource);+ message.project !== undefined && (obj.project = message.project);+ message.statistics !== undefined &&+ (obj.statistics = message.statistics ? SlowQueryStatistics.toJSON(message.statistics) : undefined);+ return obj;+ },++ create(base?: DeepPartial<SlowQueryLog>): SlowQueryLog {+ return SlowQueryLog.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<SlowQueryLog>): SlowQueryLog {+ const message = createBaseSlowQueryLog();+ message.resource = object.resource ?? "";+ message.project = object.project ?? "";+ message.statistics = (object.statistics !== undefined && object.statistics !== null)+ ? SlowQueryStatistics.fromPartial(object.statistics)+ : undefined;+ return message;+ },+};++function createBaseSlowQueryStatistics(): SlowQueryStatistics {+ return {+ sqlFingerprint: "",+ count: 0,+ latestLogTime: undefined,+ averageQueryTime: undefined,+ nightyFifthPercentileQueryTime: undefined,+ averageRowsSent: 0,+ nightyFifthPercentileRowsSent: 0,+ averageRowsExamined: 0,+ nightyFifthPercentileRowsExamined: 0,+ details: [],+ };+}++export const SlowQueryStatistics = {+ encode(message: SlowQueryStatistics, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.sqlFingerprint !== "") {+ writer.uint32(10).string(message.sqlFingerprint);+ }+ if (message.count !== 0) {+ writer.uint32(16).int32(message.count);+ }+ if (message.latestLogTime !== undefined) {+ Timestamp.encode(toTimestamp(message.latestLogTime), writer.uint32(26).fork()).ldelim();+ }+ if (message.averageQueryTime !== undefined) {+ Duration.encode(message.averageQueryTime, writer.uint32(34).fork()).ldelim();+ }+ if (message.nightyFifthPercentileQueryTime !== undefined) {+ Duration.encode(message.nightyFifthPercentileQueryTime, writer.uint32(42).fork()).ldelim();+ }+ if (message.averageRowsSent !== 0) {+ writer.uint32(48).int32(message.averageRowsSent);+ }+ if (message.nightyFifthPercentileRowsSent !== 0) {+ writer.uint32(56).int32(message.nightyFifthPercentileRowsSent);+ }+ if (message.averageRowsExamined !== 0) {+ writer.uint32(64).int32(message.averageRowsExamined);+ }+ if (message.nightyFifthPercentileRowsExamined !== 0) {+ writer.uint32(72).int32(message.nightyFifthPercentileRowsExamined);+ }+ for (const v of message.details) {+ SlowQueryDetails.encode(v!, writer.uint32(82).fork()).ldelim();+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): SlowQueryStatistics {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseSlowQueryStatistics();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag != 10) {+ break;+ }++ message.sqlFingerprint = reader.string();+ continue;+ case 2:+ if (tag != 16) {+ break;+ }++ message.count = reader.int32();+ continue;+ case 3:+ if (tag != 26) {+ break;+ }++ message.latestLogTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));+ continue;+ case 4:+ if (tag != 34) {+ break;+ }++ message.averageQueryTime = Duration.decode(reader, reader.uint32());+ continue;+ case 5:+ if (tag != 42) {+ break;+ }++ message.nightyFifthPercentileQueryTime = Duration.decode(reader, reader.uint32());+ continue;+ case 6:+ if (tag != 48) {+ break;+ }++ message.averageRowsSent = reader.int32();+ continue;+ case 7:+ if (tag != 56) {+ break;+ }++ message.nightyFifthPercentileRowsSent = reader.int32();+ continue;+ case 8:+ if (tag != 64) {+ break;+ }++ message.averageRowsExamined = reader.int32();+ continue;+ case 9:+ if (tag != 72) {+ break;+ }++ message.nightyFifthPercentileRowsExamined = reader.int32();+ continue;+ case 10:+ if (tag != 82) {+ break;+ }++ message.details.push(SlowQueryDetails.decode(reader, reader.uint32()));+ continue;+ }+ if ((tag & 7) == 4 || tag == 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): SlowQueryStatistics {+ return {+ sqlFingerprint: isSet(object.sqlFingerprint) ? String(object.sqlFingerprint) : "",+ count: isSet(object.count) ? Number(object.count) : 0,+ latestLogTime: isSet(object.latestLogTime) ? fromJsonTimestamp(object.latestLogTime) : undefined,+ averageQueryTime: isSet(object.averageQueryTime) ? Duration.fromJSON(object.averageQueryTime) : undefined,+ nightyFifthPercentileQueryTime: isSet(object.nightyFifthPercentileQueryTime)+ ? Duration.fromJSON(object.nightyFifthPercentileQueryTime)+ : undefined,+ averageRowsSent: isSet(object.averageRowsSent) ? Number(object.averageRowsSent) : 0,+ nightyFifthPercentileRowsSent: isSet(object.nightyFifthPercentileRowsSent)+ ? Number(object.nightyFifthPercentileRowsSent)+ : 0,+ averageRowsExamined: isSet(object.averageRowsExamined) ? Number(object.averageRowsExamined) : 0,+ nightyFifthPercentileRowsExamined: isSet(object.nightyFifthPercentileRowsExamined)+ ? Number(object.nightyFifthPercentileRowsExamined)+ : 0,+ details: Array.isArray(object?.details) ? object.details.map((e: any) => SlowQueryDetails.fromJSON(e)) : [],+ };+ },++ toJSON(message: SlowQueryStatistics): unknown {+ const obj: any = {};+ message.sqlFingerprint !== undefined && (obj.sqlFingerprint = message.sqlFingerprint);+ message.count !== undefined && (obj.count = Math.round(message.count));+ message.latestLogTime !== undefined && (obj.latestLogTime = message.latestLogTime.toISOString());+ message.averageQueryTime !== undefined &&+ (obj.averageQueryTime = message.averageQueryTime ? Duration.toJSON(message.averageQueryTime) : undefined);+ message.nightyFifthPercentileQueryTime !== undefined &&+ (obj.nightyFifthPercentileQueryTime = message.nightyFifthPercentileQueryTime+ ? Duration.toJSON(message.nightyFifthPercentileQueryTime)+ : undefined);+ message.averageRowsSent !== undefined && (obj.averageRowsSent = Math.round(message.averageRowsSent));+ message.nightyFifthPercentileRowsSent !== undefined &&+ (obj.nightyFifthPercentileRowsSent = Math.round(message.nightyFifthPercentileRowsSent));+ message.averageRowsExamined !== undefined && (obj.averageRowsExamined = Math.round(message.averageRowsExamined));+ message.nightyFifthPercentileRowsExamined !== undefined &&+ (obj.nightyFifthPercentileRowsExamined = Math.round(message.nightyFifthPercentileRowsExamined));+ if (message.details) {+ obj.details = message.details.map((e) => e ? SlowQueryDetails.toJSON(e) : undefined);+ } else {+ obj.details = [];+ }+ return obj;+ },++ create(base?: DeepPartial<SlowQueryStatistics>): SlowQueryStatistics {+ return SlowQueryStatistics.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<SlowQueryStatistics>): SlowQueryStatistics {+ const message = createBaseSlowQueryStatistics();+ message.sqlFingerprint = object.sqlFingerprint ?? "";+ message.count = object.count ?? 0;+ message.latestLogTime = object.latestLogTime ?? undefined;+ message.averageQueryTime = (object.averageQueryTime !== undefined && object.averageQueryTime !== null)+ ? Duration.fromPartial(object.averageQueryTime)+ : undefined;+ message.nightyFifthPercentileQueryTime =+ (object.nightyFifthPercentileQueryTime !== undefined && object.nightyFifthPercentileQueryTime !== null)+ ? Duration.fromPartial(object.nightyFifthPercentileQueryTime)+ : undefined;+ message.averageRowsSent = object.averageRowsSent ?? 0;+ message.nightyFifthPercentileRowsSent = object.nightyFifthPercentileRowsSent ?? 0;+ message.averageRowsExamined = object.averageRowsExamined ?? 0;+ message.nightyFifthPercentileRowsExamined = object.nightyFifthPercentileRowsExamined ?? 0;+ message.details = object.details?.map((e) => SlowQueryDetails.fromPartial(e)) || [];+ return message;+ },+};++function createBaseSlowQueryDetails(): SlowQueryDetails {+ return { startTime: undefined, queryTime: undefined, lockTime: undefined, rowsSent: 0, rowsExamined: 0, sqlText: "" };+}++export const SlowQueryDetails = {+ encode(message: SlowQueryDetails, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.startTime !== undefined) {+ Timestamp.encode(toTimestamp(message.startTime), writer.uint32(10).fork()).ldelim();+ }+ if (message.queryTime !== undefined) {+ Duration.encode(message.queryTime, writer.uint32(18).fork()).ldelim();+ }+ if (message.lockTime !== undefined) {+ Duration.encode(message.lockTime, writer.uint32(26).fork()).ldelim();+ }+ if (message.rowsSent !== 0) {+ writer.uint32(32).int32(message.rowsSent);+ }+ if (message.rowsExamined !== 0) {+ writer.uint32(40).int32(message.rowsExamined);+ }+ if (message.sqlText !== "") {+ writer.uint32(50).string(message.sqlText);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): SlowQueryDetails {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseSlowQueryDetails();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag != 10) {+ break;+ }++ message.startTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));+ continue;+ case 2:+ if (tag != 18) {+ break;+ }++ message.queryTime = Duration.decode(reader, reader.uint32());+ continue;+ case 3:+ if (tag != 26) {+ break;+ }++ message.lockTime = Duration.decode(reader, reader.uint32());+ continue;+ case 4:+ if (tag != 32) {+ break;+ }++ message.rowsSent = reader.int32();+ continue;+ case 5:+ if (tag != 40) {+ break;+ }++ message.rowsExamined = reader.int32();+ continue;+ case 6:+ if (tag != 50) {+ break;+ }++ message.sqlText = reader.string();+ continue;+ }+ if ((tag & 7) == 4 || tag == 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): SlowQueryDetails {+ return {+ startTime: isSet(object.startTime) ? fromJsonTimestamp(object.startTime) : undefined,+ queryTime: isSet(object.queryTime) ? Duration.fromJSON(object.queryTime) : undefined,+ lockTime: isSet(object.lockTime) ? Duration.fromJSON(object.lockTime) : undefined,+ rowsSent: isSet(object.rowsSent) ? Number(object.rowsSent) : 0,+ rowsExamined: isSet(object.rowsExamined) ? Number(object.rowsExamined) : 0,+ sqlText: isSet(object.sqlText) ? String(object.sqlText) : "",+ };+ },++ toJSON(message: SlowQueryDetails): unknown {+ const obj: any = {};+ message.startTime !== undefined && (obj.startTime = message.startTime.toISOString());+ message.queryTime !== undefined &&+ (obj.queryTime = message.queryTime ? Duration.toJSON(message.queryTime) : undefined);+ message.lockTime !== undefined && (obj.lockTime = message.lockTime ? Duration.toJSON(message.lockTime) : undefined);+ message.rowsSent !== undefined && (obj.rowsSent = Math.round(message.rowsSent));+ message.rowsExamined !== undefined && (obj.rowsExamined = Math.round(message.rowsExamined));+ message.sqlText !== undefined && (obj.sqlText = message.sqlText);+ return obj;+ },++ create(base?: DeepPartial<SlowQueryDetails>): SlowQueryDetails {+ return SlowQueryDetails.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<SlowQueryDetails>): SlowQueryDetails {+ const message = createBaseSlowQueryDetails();+ message.startTime = object.startTime ?? undefined;+ message.queryTime = (object.queryTime !== undefined && object.queryTime !== null)+ ? Duration.fromPartial(object.queryTime)+ : undefined;+ message.lockTime = (object.lockTime !== undefined && object.lockTime !== null)+ ? Duration.fromPartial(object.lockTime)+ : undefined;+ message.rowsSent = object.rowsSent ?? 0;+ message.rowsExamined = object.rowsExamined ?? 0;+ message.sqlText = object.sqlText ?? "";+ return message;+ },+};+export type DatabaseServiceDefinition = typeof DatabaseServiceDefinition;export const DatabaseServiceDefinition = {name: "DatabaseService",@@ -3919,6 +4565,78 @@ export const DatabaseServiceDefinition = {},},},+ listSlowQueries: {+ name: "ListSlowQueries",+ requestType: ListSlowQueriesRequest,+ requestStream: false,+ responseType: ListSlowQueriesResponse,+ responseStream: false,+ options: {+ _unknownFields: {+ 578365826: [+ new Uint8Array([+ 56,+ 18,+ 54,+ 47,+ 118,+ 49,+ 47,+ 101,+ 110,+ 118,+ 105,+ 114,+ 111,+ 110,+ 109,+ 101,+ 110,+ 116,+ 115,+ 47,+ 42,+ 47,+ 105,+ 110,+ 115,+ 116,+ 97,+ 110,+ 99,+ 101,+ 115,+ 47,+ 42,+ 47,+ 100,+ 97,+ 116,+ 97,+ 98,+ 97,+ 115,+ 101,+ 115,+ 47,+ 42,+ 47,+ 115,+ 108,+ 111,+ 119,+ 81,+ 117,+ 101,+ 114,+ 105,+ 101,+ 115,+ ]),+ ],+ },+ },+ },},} as const;@@ -3954,6 +4672,10 @@ export interface DatabaseServiceImplementation<CallContextExt = {}> {request: ListBackupRequest,context: CallContext & CallContextExt,): Promise<DeepPartial<ListBackupResponse>>;+ listSlowQueries(+ request: ListSlowQueriesRequest,+ context: CallContext & CallContextExt,+ ): Promise<DeepPartial<ListSlowQueriesResponse>>;}export interface DatabaseServiceClient<CallOptionsExt = {}> {@@ -3991,6 +4713,10 @@ export interface DatabaseServiceClient<CallOptionsExt = {}> {request: DeepPartial<ListBackupRequest>,options?: CallOptions & CallOptionsExt,): Promise<ListBackupResponse>;+ listSlowQueries(+ request: DeepPartial<ListSlowQueriesRequest>,+ options?: CallOptions & CallOptionsExt,+ ): Promise<ListSlowQueriesResponse>;}declare var self: any | undefined;diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex acac5829b4..aa163202a7 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -82,7 +82,12 @@- [ListBackupResponse](#bytebase-v1-ListBackupResponse)- [ListDatabasesRequest](#bytebase-v1-ListDatabasesRequest)- [ListDatabasesResponse](#bytebase-v1-ListDatabasesResponse)+ - [ListSlowQueriesRequest](#bytebase-v1-ListSlowQueriesRequest)+ - [ListSlowQueriesResponse](#bytebase-v1-ListSlowQueriesResponse)- [SchemaMetadata](#bytebase-v1-SchemaMetadata)+ - [SlowQueryDetails](#bytebase-v1-SlowQueryDetails)+ - [SlowQueryLog](#bytebase-v1-SlowQueryLog)+ - [SlowQueryStatistics](#bytebase-v1-SlowQueryStatistics)- [TableMetadata](#bytebase-v1-TableMetadata)- [UpdateBackupSettingRequest](#bytebase-v1-UpdateBackupSettingRequest)- [UpdateDatabaseRequest](#bytebase-v1-UpdateDatabaseRequest)@@ -1455,6 +1460,37 @@ When paginating, all other parameters provided to `ListDatabases` must match the+<a name="bytebase-v1-ListSlowQueriesRequest"></a>++### ListSlowQueriesRequest+ListSlowQueriesRequest is the request of listing slow query.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| filter | [string](#string) | | The filter of the slow query log. follow the [ebnf](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form) syntax. Support filter by project and start_time in SlowQueryDetails for now. For example: Search the slow query log of the specific project: - the specific project: project = "projects/{project}" Search the slow query log that start_time after 2022-01-01T12:00:00.000Z: - start_time > "2022-01-01T12:00:00.000Z" - Should use [RFC-3339 format](https://www.rfc-editor.org/rfc/rfc3339). - Currently we only support filtering down to date granularity. |+| order_by | [string](#string) | | The order by of the slow query log. Support order by count, latest_log_time, average_query_time, nighty_fifth_percentile_query_time, average_rows_sent, nighty_fifth_percentile_rows_sent, average_rows_examined, nighty_fifth_percentile_rows_examined for now. For example: - order by count: order_by = "count" - order by latest_log_time desc: order_by = "latest_log_time desc" Default: order by nighty_fifth_percentile_query_time desc. |+++++++<a name="bytebase-v1-ListSlowQueriesResponse"></a>++### ListSlowQueriesResponse+ListSlowQueriesResponse is the response of listing slow query.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| slow_query_logs | [SlowQueryLog](#bytebase-v1-SlowQueryLog) | repeated | The slow query logs. |++++++<a name="bytebase-v1-SchemaMetadata"></a>### SchemaMetadata@@ -1473,6 +1509,67 @@ This is the concept of schema in Postgres, but it's a no-op for MySQL.+<a name="bytebase-v1-SlowQueryDetails"></a>++### SlowQueryDetails+SlowQueryDetails is the details of the slow query log.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| start_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The start time of the slow query log. |+| query_time | [google.protobuf.Duration](#google-protobuf-Duration) | | The query time of the slow query log. |+| lock_time | [google.protobuf.Duration](#google-protobuf-Duration) | | The lock time of the slow query log. |+| rows_sent | [int32](#int32) | | The rows sent of the slow query log. |+| rows_examined | [int32](#int32) | | The rows examined of the slow query log. |+| sql_text | [string](#string) | | The sql text of the slow query log. |+++++++<a name="bytebase-v1-SlowQueryLog"></a>++### SlowQueryLog+SlowQueryLog is the slow query log.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| resource | [string](#string) | | The resource of the slow query log. The format is "environments/{environment}/instances/{instance}/databases/{database}". |+| project | [string](#string) | | The project of the slow query log. The format is "projects/{project}". |+| statistics | [SlowQueryStatistics](#bytebase-v1-SlowQueryStatistics) | | The statistics of the slow query log. |+++++++<a name="bytebase-v1-SlowQueryStatistics"></a>++### SlowQueryStatistics+SlowQueryStatistics is the statistics of the slow query log.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| sql_fingerprint | [string](#string) | | The fingerprint of the slow query log. |+| count | [int32](#int32) | | The count of the slow query log. |+| latest_log_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The latest log time of the slow query log. |+| average_query_time | [google.protobuf.Duration](#google-protobuf-Duration) | | The average query time of the slow query log. |+| nighty_fifth_percentile_query_time | [google.protobuf.Duration](#google-protobuf-Duration) | | The nighty fifth percentile query time of the slow query log. |+| average_rows_sent | [int32](#int32) | | The average rows sent of the slow query log. |+| nighty_fifth_percentile_rows_sent | [int32](#int32) | | The nighty fifth percentile rows sent of the slow query log. |+| average_rows_examined | [int32](#int32) | | The average rows examined of the slow query log. |+| nighty_fifth_percentile_rows_examined | [int32](#int32) | | The nighty fifth percentile rows examined of the slow query log. |+| details | [SlowQueryDetails](#bytebase-v1-SlowQueryDetails) | repeated | The details of the slow query log. |++++++<a name="bytebase-v1-TableMetadata"></a>### TableMetadata@@ -1601,6 +1698,7 @@ The type of the backup.| UpdateBackupSetting | [UpdateBackupSettingRequest](#bytebase-v1-UpdateBackupSettingRequest) | [BackupSetting](#bytebase-v1-BackupSetting) | || CreateBackup | [CreateBackupRequest](#bytebase-v1-CreateBackupRequest) | [Backup](#bytebase-v1-Backup) | || ListBackup | [ListBackupRequest](#bytebase-v1-ListBackupRequest) | [ListBackupResponse](#bytebase-v1-ListBackupResponse) | |+| ListSlowQueries | [ListSlowQueriesRequest](#bytebase-v1-ListSlowQueriesRequest) | [ListSlowQueriesResponse](#bytebase-v1-ListSlowQueriesResponse) | |diff --git a/proto/generated-go/v1/database_service.pb.go b/proto/generated-go/v1/database_service.pb.goindex f770664de4..cc46dda859 100644--- a/proto/generated-go/v1/database_service.pb.go+++ b/proto/generated-go/v1/database_service.pb.go@@ -2070,6 +2070,423 @@ func (x *Backup) GetComment() string {return ""}+// ListSlowQueriesRequest is the request of listing slow query.+type ListSlowQueriesRequest struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The filter of the slow query log.+ // follow the [ebnf](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form) syntax.+ // Support filter by project and start_time in SlowQueryDetails for now.+ // For example:+ // Search the slow query log of the specific project:+ // - the specific project: project = "projects/{project}"+ //+ // Search the slow query log that start_time after 2022-01-01T12:00:00.000Z:+ // - start_time > "2022-01-01T12:00:00.000Z"+ // - Should use [RFC-3339 format](https://www.rfc-editor.org/rfc/rfc3339).+ // - Currently we only support filtering down to date granularity.+ Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`+ // The order by of the slow query log.+ // Support order by count, latest_log_time, average_query_time, nighty_fifth_percentile_query_time,+ // average_rows_sent, nighty_fifth_percentile_rows_sent, average_rows_examined, nighty_fifth_percentile_rows_examined for now.+ // For example:+ // - order by count: order_by = "count"+ // - order by latest_log_time desc: order_by = "latest_log_time desc"+ //+ // Default: order by nighty_fifth_percentile_query_time desc.+ OrderBy string `protobuf:"bytes,2,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"`+}++func (x *ListSlowQueriesRequest) Reset() {+ *x = ListSlowQueriesRequest{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_database_service_proto_msgTypes[26]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *ListSlowQueriesRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*ListSlowQueriesRequest) ProtoMessage() {}++func (x *ListSlowQueriesRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_database_service_proto_msgTypes[26]+ 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 ListSlowQueriesRequest.ProtoReflect.Descriptor instead.+func (*ListSlowQueriesRequest) Descriptor() ([]byte, []int) {+ return file_v1_database_service_proto_rawDescGZIP(), []int{26}+}++func (x *ListSlowQueriesRequest) GetFilter() string {+ if x != nil {+ return x.Filter+ }+ return ""+}++func (x *ListSlowQueriesRequest) GetOrderBy() string {+ if x != nil {+ return x.OrderBy+ }+ return ""+}++// ListSlowQueriesResponse is the response of listing slow query.+type ListSlowQueriesResponse struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The slow query logs.+ SlowQueryLogs []*SlowQueryLog `protobuf:"bytes,1,rep,name=slow_query_logs,json=slowQueryLogs,proto3" json:"slow_query_logs,omitempty"`+}++func (x *ListSlowQueriesResponse) Reset() {+ *x = ListSlowQueriesResponse{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_database_service_proto_msgTypes[27]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *ListSlowQueriesResponse) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*ListSlowQueriesResponse) ProtoMessage() {}++func (x *ListSlowQueriesResponse) ProtoReflect() protoreflect.Message {+ mi := &file_v1_database_service_proto_msgTypes[27]+ 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 ListSlowQueriesResponse.ProtoReflect.Descriptor instead.+func (*ListSlowQueriesResponse) Descriptor() ([]byte, []int) {+ return file_v1_database_service_proto_rawDescGZIP(), []int{27}+}++func (x *ListSlowQueriesResponse) GetSlowQueryLogs() []*SlowQueryLog {+ if x != nil {+ return x.SlowQueryLogs+ }+ return nil+}++// SlowQueryLog is the slow query log.+type SlowQueryLog struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The resource of the slow query log.+ // The format is "environments/{environment}/instances/{instance}/databases/{database}".+ Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`+ // The project of the slow query log.+ // The format is "projects/{project}".+ Project string `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"`+ // The statistics of the slow query log.+ Statistics *SlowQueryStatistics `protobuf:"bytes,3,opt,name=statistics,proto3" json:"statistics,omitempty"`+}++func (x *SlowQueryLog) Reset() {+ *x = SlowQueryLog{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_database_service_proto_msgTypes[28]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *SlowQueryLog) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*SlowQueryLog) ProtoMessage() {}++func (x *SlowQueryLog) ProtoReflect() protoreflect.Message {+ mi := &file_v1_database_service_proto_msgTypes[28]+ 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 SlowQueryLog.ProtoReflect.Descriptor instead.+func (*SlowQueryLog) Descriptor() ([]byte, []int) {+ return file_v1_database_service_proto_rawDescGZIP(), []int{28}+}++func (x *SlowQueryLog) GetResource() string {+ if x != nil {+ return x.Resource+ }+ return ""+}++func (x *SlowQueryLog) GetProject() string {+ if x != nil {+ return x.Project+ }+ return ""+}++func (x *SlowQueryLog) GetStatistics() *SlowQueryStatistics {+ if x != nil {+ return x.Statistics+ }+ return nil+}++// SlowQueryStatistics is the statistics of the slow query log.+type SlowQueryStatistics struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The fingerprint of the slow query log.+ SqlFingerprint string `protobuf:"bytes,1,opt,name=sql_fingerprint,json=sqlFingerprint,proto3" json:"sql_fingerprint,omitempty"`+ // The count of the slow query log.+ Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`+ // The latest log time of the slow query log.+ LatestLogTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=latest_log_time,json=latestLogTime,proto3" json:"latest_log_time,omitempty"`+ // The average query time of the slow query log.+ AverageQueryTime *durationpb.Duration `protobuf:"bytes,4,opt,name=average_query_time,json=averageQueryTime,proto3" json:"average_query_time,omitempty"`+ // The nighty fifth percentile query time of the slow query log.+ NightyFifthPercentileQueryTime *durationpb.Duration `protobuf:"bytes,5,opt,name=nighty_fifth_percentile_query_time,json=nightyFifthPercentileQueryTime,proto3" json:"nighty_fifth_percentile_query_time,omitempty"`+ // The average rows sent of the slow query log.+ AverageRowsSent int32 `protobuf:"varint,6,opt,name=average_rows_sent,json=averageRowsSent,proto3" json:"average_rows_sent,omitempty"`+ // The nighty fifth percentile rows sent of the slow query log.+ NightyFifthPercentileRowsSent int32 `protobuf:"varint,7,opt,name=nighty_fifth_percentile_rows_sent,json=nightyFifthPercentileRowsSent,proto3" json:"nighty_fifth_percentile_rows_sent,omitempty"`+ // The average rows examined of the slow query log.+ AverageRowsExamined int32 `protobuf:"varint,8,opt,name=average_rows_examined,json=averageRowsExamined,proto3" json:"average_rows_examined,omitempty"`+ // The nighty fifth percentile rows examined of the slow query log.+ NightyFifthPercentileRowsExamined int32 `protobuf:"varint,9,opt,name=nighty_fifth_percentile_rows_examined,json=nightyFifthPercentileRowsExamined,proto3" json:"nighty_fifth_percentile_rows_examined,omitempty"`+ // The details of the slow query log.+ Details []*SlowQueryDetails `protobuf:"bytes,10,rep,name=details,proto3" json:"details,omitempty"`+}++func (x *SlowQueryStatistics) Reset() {+ *x = SlowQueryStatistics{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_database_service_proto_msgTypes[29]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *SlowQueryStatistics) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*SlowQueryStatistics) ProtoMessage() {}++func (x *SlowQueryStatistics) ProtoReflect() protoreflect.Message {+ mi := &file_v1_database_service_proto_msgTypes[29]+ 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 SlowQueryStatistics.ProtoReflect.Descriptor instead.+func (*SlowQueryStatistics) Descriptor() ([]byte, []int) {+ return file_v1_database_service_proto_rawDescGZIP(), []int{29}+}++func (x *SlowQueryStatistics) GetSqlFingerprint() string {+ if x != nil {+ return x.SqlFingerprint+ }+ return ""+}++func (x *SlowQueryStatistics) GetCount() int32 {+ if x != nil {+ return x.Count+ }+ return 0+}++func (x *SlowQueryStatistics) GetLatestLogTime() *timestamppb.Timestamp {+ if x != nil {+ return x.LatestLogTime+ }+ return nil+}++func (x *SlowQueryStatistics) GetAverageQueryTime() *durationpb.Duration {+ if x != nil {+ return x.AverageQueryTime+ }+ return nil+}++func (x *SlowQueryStatistics) GetNightyFifthPercentileQueryTime() *durationpb.Duration {+ if x != nil {+ return x.NightyFifthPercentileQueryTime+ }+ return nil+}++func (x *SlowQueryStatistics) GetAverageRowsSent() int32 {+ if x != nil {+ return x.AverageRowsSent+ }+ return 0+}++func (x *SlowQueryStatistics) GetNightyFifthPercentileRowsSent() int32 {+ if x != nil {+ return x.NightyFifthPercentileRowsSent+ }+ return 0+}++func (x *SlowQueryStatistics) GetAverageRowsExamined() int32 {+ if x != nil {+ return x.AverageRowsExamined+ }+ return 0+}++func (x *SlowQueryStatistics) GetNightyFifthPercentileRowsExamined() int32 {+ if x != nil {+ return x.NightyFifthPercentileRowsExamined+ }+ return 0+}++func (x *SlowQueryStatistics) GetDetails() []*SlowQueryDetails {+ if x != nil {+ return x.Details+ }+ return nil+}++// SlowQueryDetails is the details of the slow query log.+type SlowQueryDetails struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The start time of the slow query log.+ StartTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`+ // The query time of the slow query log.+ QueryTime *durationpb.Duration `protobuf:"bytes,2,opt,name=query_time,json=queryTime,proto3" json:"query_time,omitempty"`+ // The lock time of the slow query log.+ LockTime *durationpb.Duration `protobuf:"bytes,3,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"`+ // The rows sent of the slow query log.+ RowsSent int32 `protobuf:"varint,4,opt,name=rows_sent,json=rowsSent,proto3" json:"rows_sent,omitempty"`+ // The rows examined of the slow query log.+ RowsExamined int32 `protobuf:"varint,5,opt,name=rows_examined,json=rowsExamined,proto3" json:"rows_examined,omitempty"`+ // The sql text of the slow query log.+ SqlText string `protobuf:"bytes,6,opt,name=sql_text,json=sqlText,proto3" json:"sql_text,omitempty"`+}++func (x *SlowQueryDetails) Reset() {+ *x = SlowQueryDetails{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_database_service_proto_msgTypes[30]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *SlowQueryDetails) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*SlowQueryDetails) ProtoMessage() {}++func (x *SlowQueryDetails) ProtoReflect() protoreflect.Message {+ mi := &file_v1_database_service_proto_msgTypes[30]+ 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 SlowQueryDetails.ProtoReflect.Descriptor instead.+func (*SlowQueryDetails) Descriptor() ([]byte, []int) {+ return file_v1_database_service_proto_rawDescGZIP(), []int{30}+}++func (x *SlowQueryDetails) GetStartTime() *timestamppb.Timestamp {+ if x != nil {+ return x.StartTime+ }+ return nil+}++func (x *SlowQueryDetails) GetQueryTime() *durationpb.Duration {+ if x != nil {+ return x.QueryTime+ }+ return nil+}++func (x *SlowQueryDetails) GetLockTime() *durationpb.Duration {+ if x != nil {+ return x.LockTime+ }+ return nil+}++func (x *SlowQueryDetails) GetRowsSent() int32 {+ if x != nil {+ return x.RowsSent+ }+ return 0+}++func (x *SlowQueryDetails) GetRowsExamined() int32 {+ if x != nil {+ return x.RowsExamined+ }+ return 0+}++func (x *SlowQueryDetails) GetSqlText() string {+ if x != nil {+ return x.SqlText+ }+ return ""+}+var File_v1_database_service_proto protoreflect.FileDescriptorvar file_v1_database_service_proto_rawDesc = []byte{@@ -2359,111 +2776,198 @@ var file_v1_database_service_proto_rawDesc = []byte{0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x45, 0x4e, 0x44,0x49, 0x4e, 0x47, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04,0x44, 0x4f, 0x4e, 0x45, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44,- 0x10, 0x03, 0x32, 0xe7, 0x0c, 0x0a, 0x0f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53,- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x44, 0x61,- 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x22, 0x40,- 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f,- 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e,- 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,- 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d,- 0x12, 0x94, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,- 0x65, 0x73, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65,- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,- 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,- 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0xda, 0x41, 0x00, 0x82, 0xd3,- 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e,- 0x74, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a,- 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x61,- 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x12, 0xb0, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61,- 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x22, 0x2e, 0x62, 0x79, 0x74,- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44,- 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15,- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74,- 0x61, 0x62, 0x61, 0x73, 0x65, 0x22, 0x63, 0xda, 0x41, 0x14, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61,- 0x73, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3,- 0xe4, 0x93, 0x02, 0x46, 0x3a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x32, 0x3a,- 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x6e, 0x61,- 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f,- 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61,- 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xb5, 0x01, 0x0a, 0x14, 0x42,- 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,- 0x73, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,- 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74,- 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63,- 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73,- 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42,- 0x3a, 0x01, 0x2a, 0x22, 0x3d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,+ 0x10, 0x03, 0x22, 0x4b, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75,+ 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06,+ 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69,+ 0x6c, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79,+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x22,+ 0x5c, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x69,+ 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0f, 0x73, 0x6c,+ 0x6f, 0x77, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x01, 0x20,+ 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,+ 0x31, 0x2e, 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x52, 0x0d,+ 0x73, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x73, 0x22, 0x8b, 0x01,+ 0x0a, 0x0c, 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x12, 0x1f,+ 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,+ 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12,+ 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,+ 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x40, 0x0a, 0x0a, 0x73, 0x74, 0x61,+ 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e,+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6c, 0x6f, 0x77,+ 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52,+ 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0xfd, 0x04, 0x0a, 0x13,+ 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,+ 0x69, 0x63, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x71, 0x6c, 0x5f, 0x66, 0x69, 0x6e, 0x67, 0x65,+ 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x71,+ 0x6c, 0x46, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05,+ 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75,+ 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6c, 0x6f, 0x67,+ 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 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, 0x52, 0x0d, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4c,+ 0x6f, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x12, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67,+ 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01,+ 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x61,+ 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12,+ 0x65, 0x0a, 0x22, 0x6e, 0x69, 0x67, 0x68, 0x74, 0x79, 0x5f, 0x66, 0x69, 0x66, 0x74, 0x68, 0x5f,+ 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79,+ 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f,+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75,+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1e, 0x6e, 0x69, 0x67, 0x68, 0x74, 0x79, 0x46, 0x69,+ 0x66, 0x74, 0x68, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x51, 0x75, 0x65,+ 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67,+ 0x65, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28,+ 0x05, 0x52, 0x0f, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, 0x6f, 0x77, 0x73, 0x53, 0x65,+ 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x21, 0x6e, 0x69, 0x67, 0x68, 0x74, 0x79, 0x5f, 0x66, 0x69, 0x66,+ 0x74, 0x68, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x5f, 0x72, 0x6f,+ 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x1d, 0x6e,+ 0x69, 0x67, 0x68, 0x74, 0x79, 0x46, 0x69, 0x66, 0x74, 0x68, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e,+ 0x74, 0x69, 0x6c, 0x65, 0x52, 0x6f, 0x77, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x15,+ 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x65, 0x78, 0x61,+ 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x61, 0x76, 0x65,+ 0x72, 0x61, 0x67, 0x65, 0x52, 0x6f, 0x77, 0x73, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64,+ 0x12, 0x50, 0x0a, 0x25, 0x6e, 0x69, 0x67, 0x68, 0x74, 0x79, 0x5f, 0x66, 0x69, 0x66, 0x74, 0x68,+ 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x5f, 0x72, 0x6f, 0x77, 0x73,+ 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52,+ 0x21, 0x6e, 0x69, 0x67, 0x68, 0x74, 0x79, 0x46, 0x69, 0x66, 0x74, 0x68, 0x50, 0x65, 0x72, 0x63,+ 0x65, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x52, 0x6f, 0x77, 0x73, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e,+ 0x65, 0x64, 0x12, 0x37, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x0a, 0x20,+ 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,+ 0x31, 0x2e, 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69,+ 0x6c, 0x73, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x9c, 0x02, 0x0a, 0x10,+ 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73,+ 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01,+ 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,+ 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x71,+ 0x75, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,+ 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,+ 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72,+ 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69,+ 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74,+ 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a,+ 0x09, 0x72, 0x6f, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,+ 0x52, 0x08, 0x72, 0x6f, 0x77, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x6f,+ 0x77, 0x73, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28,+ 0x05, 0x52, 0x0c, 0x72, 0x6f, 0x77, 0x73, 0x45, 0x78, 0x61, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x12,+ 0x19, 0x0a, 0x08, 0x73, 0x71, 0x6c, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28,+ 0x09, 0x52, 0x07, 0x73, 0x71, 0x6c, 0x54, 0x65, 0x78, 0x74, 0x32, 0x86, 0x0e, 0x0a, 0x0f, 0x44,+ 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x87,+ 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1f,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,+ 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,+ 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61,+ 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x22, 0x40, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82,+ 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65,0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f,- 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x61, 0x74,- 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x3a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61,- 0x74, 0x65, 0x12, 0xa1, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,- 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x27, 0x2e, 0x62, 0x79, 0x74,- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61,- 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75,- 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,- 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,- 0x74, 0x61, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x12, 0x3a, 0x2f, 0x76, 0x31, 0x2f,- 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e,- 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a,- 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x6d, 0x65, 0x74,- 0x61, 0x64, 0x61, 0x74, 0x61, 0x7d, 0x12, 0x99, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x44, 0x61,- 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x25, 0x2e, 0x62,- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61,- 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75,- 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,- 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61,- 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e,- 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73,- 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64,- 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d,- 0x61, 0x7d, 0x12, 0x9d, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70,- 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53,- 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b,- 0x75, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x47, 0x82, 0xd3, 0xe4, 0x93, 0x02,- 0x41, 0x12, 0x3f, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76,- 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74,- 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,- 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,- 0x67, 0x7d, 0x12, 0xb4, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x63,- 0x6b, 0x75, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x27, 0x2e, 0x62, 0x79, 0x74,- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42,- 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75,- 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,- 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22,- 0x58, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x52, 0x3a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,- 0x32, 0x47, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x6e,- 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73,- 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64,- 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75,- 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x7d, 0x12, 0x92, 0x01, 0x0a, 0x0c, 0x43, 0x72,- 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74,- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42,- 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62,- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75,- 0x70, 0x22, 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45, 0x3a, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75,- 0x70, 0x22, 0x3b, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x65,- 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e,- 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61,- 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x9b,- 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x1e, 0x2e,+ 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61,+ 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x94, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73,+ 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74,+ 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e,0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,- 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e,+ 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,+ 0x65, 0x22, 0x3c, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x76,+ 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f,+ 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,+ 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x12,+ 0xb0, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,+ 0x73, 0x65, 0x12, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,+ 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52,+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x22, 0x63, 0xda,+ 0x41, 0x14, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74,+ 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x46, 0x3a, 0x08, 0x64, 0x61,+ 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x32, 0x3a, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x64, 0x61, 0x74,+ 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72,+ 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,+ 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f,+ 0x2a, 0x7d, 0x12, 0xb5, 0x01, 0x0a, 0x14, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61,+ 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55,+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44,+ 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,+ 0x22, 0x48, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x3a, 0x01, 0x2a, 0x22, 0x3d, 0x2f, 0x76, 0x31,+ 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e,+ 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,+ 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x3a, 0x62,+ 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0xa1, 0x01, 0x0a, 0x13, 0x47,+ 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,+ 0x74, 0x61, 0x12, 0x27, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,+ 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61,+ 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,+ 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93,+ 0x02, 0x3c, 0x12, 0x3a, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e,+ 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73,+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,+ 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x7d, 0x12, 0x99,+ 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x63,+ 0x68, 0x65, 0x6d, 0x61, 0x12, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x53, 0x63,+ 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,+ 0x73, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a,+ 0x12, 0x38, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69,+ 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61,+ 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73,+ 0x2f, 0x2a, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x7d, 0x12, 0x9d, 0x01, 0x0a, 0x10, 0x47,+ 0x65, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12,+ 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65,+ 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,+ 0x67, 0x22, 0x47, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x41, 0x12, 0x3f, 0x2f, 0x76, 0x31, 0x2f, 0x7b,+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74,+ 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f,+ 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x61, 0x63, 0x6b,+ 0x75, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x7d, 0x12, 0xb4, 0x01, 0x0a, 0x13, 0x55,+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69,+ 0x6e, 0x67, 0x12, 0x27, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,+ 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x65, 0x74,+ 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70,+ 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x58, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x52, 0x3a,+ 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x32, 0x47, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x73,+ 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69,+ 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61,+ 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73,+ 0x2f, 0x2a, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,+ 0x7d, 0x12, 0x92, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b,+ 0x75, 0x70, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,+ 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71,+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x22, 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02,+ 0x45, 0x3a, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x22, 0x3b, 0x2f, 0x76, 0x31, 0x2f, 0x7b,+ 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65,+ 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f,+ 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62,+ 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x9b, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x42,+ 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65,+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4c, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e,+ 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61,+ 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74,+ 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f,+ 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x61, 0x63,+ 0x6b, 0x75, 0x70, 0x73, 0x12, 0x9c, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6c, 0x6f,+ 0x77, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6c, 0x6f, 0x77, 0x51,+ 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e,0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,- 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4c,- 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12,- 0x3b, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x65, 0x6e, 0x76,- 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74,- 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,- 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 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,+ 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,+ 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, 0x76, 0x31,+ 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f,+ 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61,+ 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72,+ 0x69, 0x65, 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 (@@ -2479,7 +2983,7 @@ func file_v1_database_service_proto_rawDescGZIP() []byte {}var file_v1_database_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2)-var file_v1_database_service_proto_msgTypes = make([]protoimpl.MessageInfo, 27)+var file_v1_database_service_proto_msgTypes = make([]protoimpl.MessageInfo, 32)var file_v1_database_service_proto_goTypes = []interface{}{(Backup_BackupType)(0), // 0: bytebase.v1.Backup.BackupType(Backup_BackupState)(0), // 1: bytebase.v1.Backup.BackupState@@ -2509,25 +3013,30 @@ var file_v1_database_service_proto_goTypes = []interface{}{(*DatabaseSchema)(nil), // 25: bytebase.v1.DatabaseSchema(*BackupSetting)(nil), // 26: bytebase.v1.BackupSetting(*Backup)(nil), // 27: bytebase.v1.Backup- nil, // 28: bytebase.v1.Database.LabelsEntry- (*fieldmaskpb.FieldMask)(nil), // 29: google.protobuf.FieldMask- (State)(0), // 30: bytebase.v1.State- (*timestamppb.Timestamp)(nil), // 31: google.protobuf.Timestamp- (*wrapperspb.StringValue)(nil), // 32: google.protobuf.StringValue- (*durationpb.Duration)(nil), // 33: google.protobuf.Duration+ (*ListSlowQueriesRequest)(nil), // 28: bytebase.v1.ListSlowQueriesRequest+ (*ListSlowQueriesResponse)(nil), // 29: bytebase.v1.ListSlowQueriesResponse+ (*SlowQueryLog)(nil), // 30: bytebase.v1.SlowQueryLog+ (*SlowQueryStatistics)(nil), // 31: bytebase.v1.SlowQueryStatistics+ (*SlowQueryDetails)(nil), // 32: bytebase.v1.SlowQueryDetails+ nil, // 33: bytebase.v1.Database.LabelsEntry+ (*fieldmaskpb.FieldMask)(nil), // 34: google.protobuf.FieldMask+ (State)(0), // 35: bytebase.v1.State+ (*timestamppb.Timestamp)(nil), // 36: google.protobuf.Timestamp+ (*wrapperspb.StringValue)(nil), // 37: google.protobuf.StringValue+ (*durationpb.Duration)(nil), // 38: google.protobuf.Duration}var file_v1_database_service_proto_depIdxs = []int32{15, // 0: bytebase.v1.ListDatabasesResponse.databases:type_name -> bytebase.v1.Database15, // 1: bytebase.v1.UpdateDatabaseRequest.database:type_name -> bytebase.v1.Database- 29, // 2: bytebase.v1.UpdateDatabaseRequest.update_mask:type_name -> google.protobuf.FieldMask+ 34, // 2: bytebase.v1.UpdateDatabaseRequest.update_mask:type_name -> google.protobuf.FieldMask5, // 3: bytebase.v1.BatchUpdateDatabasesRequest.requests:type_name -> bytebase.v1.UpdateDatabaseRequest15, // 4: bytebase.v1.BatchUpdateDatabasesResponse.databases:type_name -> bytebase.v1.Database26, // 5: bytebase.v1.UpdateBackupSettingRequest.setting:type_name -> bytebase.v1.BackupSetting27, // 6: bytebase.v1.CreateBackupRequest.backup:type_name -> bytebase.v1.Backup27, // 7: bytebase.v1.ListBackupResponse.backups:type_name -> bytebase.v1.Backup- 30, // 8: bytebase.v1.Database.sync_state:type_name -> bytebase.v1.State- 31, // 9: bytebase.v1.Database.successful_sync_time:type_name -> google.protobuf.Timestamp- 28, // 10: bytebase.v1.Database.labels:type_name -> bytebase.v1.Database.LabelsEntry+ 35, // 8: bytebase.v1.Database.sync_state:type_name -> bytebase.v1.State+ 36, // 9: bytebase.v1.Database.successful_sync_time:type_name -> google.protobuf.Timestamp+ 33, // 10: bytebase.v1.Database.labels:type_name -> bytebase.v1.Database.LabelsEntry17, // 11: bytebase.v1.DatabaseMetadata.schemas:type_name -> bytebase.v1.SchemaMetadata23, // 12: bytebase.v1.DatabaseMetadata.extensions:type_name -> bytebase.v1.ExtensionMetadata18, // 13: bytebase.v1.SchemaMetadata.tables:type_name -> bytebase.v1.TableMetadata@@ -2535,38 +3044,49 @@ var file_v1_database_service_proto_depIdxs = []int32{19, // 15: bytebase.v1.TableMetadata.columns:type_name -> bytebase.v1.ColumnMetadata22, // 16: bytebase.v1.TableMetadata.indexes:type_name -> bytebase.v1.IndexMetadata24, // 17: bytebase.v1.TableMetadata.foreign_keys:type_name -> bytebase.v1.ForeignKeyMetadata- 32, // 18: bytebase.v1.ColumnMetadata.default:type_name -> google.protobuf.StringValue+ 37, // 18: bytebase.v1.ColumnMetadata.default:type_name -> google.protobuf.StringValue21, // 19: bytebase.v1.ViewMetadata.dependent_columns:type_name -> bytebase.v1.DependentColumn- 33, // 20: bytebase.v1.BackupSetting.backup_retain_duration:type_name -> google.protobuf.Duration- 31, // 21: bytebase.v1.Backup.create_time:type_name -> google.protobuf.Timestamp- 31, // 22: bytebase.v1.Backup.update_time:type_name -> google.protobuf.Timestamp+ 38, // 20: bytebase.v1.BackupSetting.backup_retain_duration:type_name -> google.protobuf.Duration+ 36, // 21: bytebase.v1.Backup.create_time:type_name -> google.protobuf.Timestamp+ 36, // 22: bytebase.v1.Backup.update_time:type_name -> google.protobuf.Timestamp1, // 23: bytebase.v1.Backup.state:type_name -> bytebase.v1.Backup.BackupState0, // 24: bytebase.v1.Backup.backup_type:type_name -> bytebase.v1.Backup.BackupType- 2, // 25: bytebase.v1.DatabaseService.GetDatabase:input_type -> bytebase.v1.GetDatabaseRequest- 3, // 26: bytebase.v1.DatabaseService.ListDatabases:input_type -> bytebase.v1.ListDatabasesRequest- 5, // 27: bytebase.v1.DatabaseService.UpdateDatabase:input_type -> bytebase.v1.UpdateDatabaseRequest- 6, // 28: bytebase.v1.DatabaseService.BatchUpdateDatabases:input_type -> bytebase.v1.BatchUpdateDatabasesRequest- 8, // 29: bytebase.v1.DatabaseService.GetDatabaseMetadata:input_type -> bytebase.v1.GetDatabaseMetadataRequest- 9, // 30: bytebase.v1.DatabaseService.GetDatabaseSchema:input_type -> bytebase.v1.GetDatabaseSchemaRequest- 10, // 31: bytebase.v1.DatabaseService.GetBackupSetting:input_type -> bytebase.v1.GetBackupSettingRequest- 11, // 32: bytebase.v1.DatabaseService.UpdateBackupSetting:input_type -> bytebase.v1.UpdateBackupSettingRequest- 12, // 33: bytebase.v1.DatabaseService.CreateBackup:input_type -> bytebase.v1.CreateBackupRequest- 13, // 34: bytebase.v1.DatabaseService.ListBackup:input_type -> bytebase.v1.ListBackupRequest- 15, // 35: bytebase.v1.DatabaseService.GetDatabase:output_type -> bytebase.v1.Database- 4, // 36: bytebase.v1.DatabaseService.ListDatabases:output_type -> bytebase.v1.ListDatabasesResponse- 15, // 37: bytebase.v1.DatabaseService.UpdateDatabase:output_type -> bytebase.v1.Database- 7, // 38: bytebase.v1.DatabaseService.BatchUpdateDatabases:output_type -> bytebase.v1.BatchUpdateDatabasesResponse- 16, // 39: bytebase.v1.DatabaseService.GetDatabaseMetadata:output_type -> bytebase.v1.DatabaseMetadata- 25, // 40: bytebase.v1.DatabaseService.GetDatabaseSchema:output_type -> bytebase.v1.DatabaseSchema- 26, // 41: bytebase.v1.DatabaseService.GetBackupSetting:output_type -> bytebase.v1.BackupSetting- 26, // 42: bytebase.v1.DatabaseService.UpdateBackupSetting:output_type -> bytebase.v1.BackupSetting- 27, // 43: bytebase.v1.DatabaseService.CreateBackup:output_type -> bytebase.v1.Backup- 14, // 44: bytebase.v1.DatabaseService.ListBackup:output_type -> bytebase.v1.ListBackupResponse- 35, // [35:45] is the sub-list for method output_type- 25, // [25:35] is the sub-list for method input_type- 25, // [25:25] is the sub-list for extension type_name- 25, // [25:25] is the sub-list for extension extendee- 0, // [0:25] is the sub-list for field type_name+ 30, // 25: bytebase.v1.ListSlowQueriesResponse.slow_query_logs:type_name -> bytebase.v1.SlowQueryLog+ 31, // 26: bytebase.v1.SlowQueryLog.statistics:type_name -> bytebase.v1.SlowQueryStatistics+ 36, // 27: bytebase.v1.SlowQueryStatistics.latest_log_time:type_name -> google.protobuf.Timestamp+ 38, // 28: bytebase.v1.SlowQueryStatistics.average_query_time:type_name -> google.protobuf.Duration+ 38, // 29: bytebase.v1.SlowQueryStatistics.nighty_fifth_percentile_query_time:type_name -> google.protobuf.Duration+ 32, // 30: bytebase.v1.SlowQueryStatistics.details:type_name -> bytebase.v1.SlowQueryDetails+ 36, // 31: bytebase.v1.SlowQueryDetails.start_time:type_name -> google.protobuf.Timestamp+ 38, // 32: bytebase.v1.SlowQueryDetails.query_time:type_name -> google.protobuf.Duration+ 38, // 33: bytebase.v1.SlowQueryDetails.lock_time:type_name -> google.protobuf.Duration+ 2, // 34: bytebase.v1.DatabaseService.GetDatabase:input_type -> bytebase.v1.GetDatabaseRequest+ 3, // 35: bytebase.v1.DatabaseService.ListDatabases:input_type -> bytebase.v1.ListDatabasesRequest+ 5, // 36: bytebase.v1.DatabaseService.UpdateDatabase:input_type -> bytebase.v1.UpdateDatabaseRequest+ 6, // 37: bytebase.v1.DatabaseService.BatchUpdateDatabases:input_type -> bytebase.v1.BatchUpdateDatabasesRequest+ 8, // 38: bytebase.v1.DatabaseService.GetDatabaseMetadata:input_type -> bytebase.v1.GetDatabaseMetadataRequest+ 9, // 39: bytebase.v1.DatabaseService.GetDatabaseSchema:input_type -> bytebase.v1.GetDatabaseSchemaRequest+ 10, // 40: bytebase.v1.DatabaseService.GetBackupSetting:input_type -> bytebase.v1.GetBackupSettingRequest+ 11, // 41: bytebase.v1.DatabaseService.UpdateBackupSetting:input_type -> bytebase.v1.UpdateBackupSettingRequest+ 12, // 42: bytebase.v1.DatabaseService.CreateBackup:input_type -> bytebase.v1.CreateBackupRequest+ 13, // 43: bytebase.v1.DatabaseService.ListBackup:input_type -> bytebase.v1.ListBackupRequest+ 28, // 44: bytebase.v1.DatabaseService.ListSlowQueries:input_type -> bytebase.v1.ListSlowQueriesRequest+ 15, // 45: bytebase.v1.DatabaseService.GetDatabase:output_type -> bytebase.v1.Database+ 4, // 46: bytebase.v1.DatabaseService.ListDatabases:output_type -> bytebase.v1.ListDatabasesResponse+ 15, // 47: bytebase.v1.DatabaseService.UpdateDatabase:output_type -> bytebase.v1.Database+ 7, // 48: bytebase.v1.DatabaseService.BatchUpdateDatabases:output_type -> bytebase.v1.BatchUpdateDatabasesResponse+ 16, // 49: bytebase.v1.DatabaseService.GetDatabaseMetadata:output_type -> bytebase.v1.DatabaseMetadata+ 25, // 50: bytebase.v1.DatabaseService.GetDatabaseSchema:output_type -> bytebase.v1.DatabaseSchema+ 26, // 51: bytebase.v1.DatabaseService.GetBackupSetting:output_type -> bytebase.v1.BackupSetting+ 26, // 52: bytebase.v1.DatabaseService.UpdateBackupSetting:output_type -> bytebase.v1.BackupSetting+ 27, // 53: bytebase.v1.DatabaseService.CreateBackup:output_type -> bytebase.v1.Backup+ 14, // 54: bytebase.v1.DatabaseService.ListBackup:output_type -> bytebase.v1.ListBackupResponse+ 29, // 55: bytebase.v1.DatabaseService.ListSlowQueries:output_type -> bytebase.v1.ListSlowQueriesResponse+ 45, // [45:56] is the sub-list for method output_type+ 34, // [34:45] is the sub-list for method input_type+ 34, // [34:34] is the sub-list for extension type_name+ 34, // [34:34] is the sub-list for extension extendee+ 0, // [0:34] is the sub-list for field type_name}func init() { file_v1_database_service_proto_init() }@@ -2888,6 +3408,66 @@ func file_v1_database_service_proto_init() {return nil}}+ file_v1_database_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*ListSlowQueriesRequest); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_database_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*ListSlowQueriesResponse); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_database_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*SlowQueryLog); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_database_service_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*SlowQueryStatistics); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_database_service_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*SlowQueryDetails); 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{@@ -2895,7 +3475,7 @@ func file_v1_database_service_proto_init() {GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: file_v1_database_service_proto_rawDesc,NumEnums: 2,- NumMessages: 27,+ NumMessages: 32,NumExtensions: 0,NumServices: 1,},diff --git a/proto/generated-go/v1/database_service.pb.gw.go b/proto/generated-go/v1/database_service.pb.gw.goindex adb62a9936..12896b1418 100644--- a/proto/generated-go/v1/database_service.pb.gw.go+++ b/proto/generated-go/v1/database_service.pb.gw.go@@ -683,6 +683,42 @@ func local_request_DatabaseService_ListBackup_0(ctx context.Context, marshaler r}+var (+ filter_DatabaseService_ListSlowQueries_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}+)++func request_DatabaseService_ListSlowQueries_0(ctx context.Context, marshaler runtime.Marshaler, client DatabaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var protoReq ListSlowQueriesRequest+ var metadata runtime.ServerMetadata++ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_DatabaseService_ListSlowQueries_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }++ msg, err := client.ListSlowQueries(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err++}++func local_request_DatabaseService_ListSlowQueries_0(ctx context.Context, marshaler runtime.Marshaler, server DatabaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var protoReq ListSlowQueriesRequest+ var metadata runtime.ServerMetadata++ if err := req.ParseForm(); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_DatabaseService_ListSlowQueries_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }++ msg, err := server.ListSlowQueries(ctx, &protoReq)+ return msg, metadata, err++}+// RegisterDatabaseServiceHandlerServer registers the http handlers for service DatabaseService to "mux".// UnaryRPC :call DatabaseServiceServer directly.// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.@@ -939,6 +975,31 @@ func RegisterDatabaseServiceHandlerServer(ctx context.Context, mux *runtime.Serv})+ mux.Handle("GET", pattern_DatabaseService_ListSlowQueries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ var err error+ var annotatedContext context.Context+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.DatabaseService/ListSlowQueries", runtime.WithHTTPPathPattern("/v1/environments/*/instances/*/databases/*/slowQueries"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_DatabaseService_ListSlowQueries_0(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }++ forward_DatabaseService_ListSlowQueries_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)++ })+return nil}@@ -1200,6 +1261,28 @@ func RegisterDatabaseServiceHandlerClient(ctx context.Context, mux *runtime.Serv})+ mux.Handle("GET", pattern_DatabaseService_ListSlowQueries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ var err error+ var annotatedContext context.Context+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.DatabaseService/ListSlowQueries", runtime.WithHTTPPathPattern("/v1/environments/*/instances/*/databases/*/slowQueries"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_DatabaseService_ListSlowQueries_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }++ forward_DatabaseService_ListSlowQueries_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)++ })+return nil}@@ -1223,6 +1306,8 @@ var (pattern_DatabaseService_CreateBackup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4, 2, 5}, []string{"v1", "environments", "instances", "databases", "parent", "backups"}, ""))pattern_DatabaseService_ListBackup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4, 2, 5}, []string{"v1", "environments", "instances", "databases", "parent", "backups"}, ""))++ pattern_DatabaseService_ListSlowQueries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 2, 4}, []string{"v1", "environments", "instances", "databases", "slowQueries"}, "")))var (@@ -1245,4 +1330,6 @@ var (forward_DatabaseService_CreateBackup_0 = runtime.ForwardResponseMessageforward_DatabaseService_ListBackup_0 = runtime.ForwardResponseMessage++ forward_DatabaseService_ListSlowQueries_0 = runtime.ForwardResponseMessage)diff --git a/proto/generated-go/v1/database_service_grpc.pb.go b/proto/generated-go/v1/database_service_grpc.pb.goindex c3cfd17465..0a0b49fb9c 100644--- a/proto/generated-go/v1/database_service_grpc.pb.go+++ b/proto/generated-go/v1/database_service_grpc.pb.go@@ -29,6 +29,7 @@ const (DatabaseService_UpdateBackupSetting_FullMethodName = "/bytebase.v1.DatabaseService/UpdateBackupSetting"DatabaseService_CreateBackup_FullMethodName = "/bytebase.v1.DatabaseService/CreateBackup"DatabaseService_ListBackup_FullMethodName = "/bytebase.v1.DatabaseService/ListBackup"+ DatabaseService_ListSlowQueries_FullMethodName = "/bytebase.v1.DatabaseService/ListSlowQueries")// DatabaseServiceClient is the client API for DatabaseService service.@@ -45,6 +46,7 @@ type DatabaseServiceClient interface {UpdateBackupSetting(ctx context.Context, in *UpdateBackupSettingRequest, opts ...grpc.CallOption) (*BackupSetting, error)CreateBackup(ctx context.Context, in *CreateBackupRequest, opts ...grpc.CallOption) (*Backup, error)ListBackup(ctx context.Context, in *ListBackupRequest, opts ...grpc.CallOption) (*ListBackupResponse, error)+ ListSlowQueries(ctx context.Context, in *ListSlowQueriesRequest, opts ...grpc.CallOption) (*ListSlowQueriesResponse, error)}type databaseServiceClient struct {@@ -145,6 +147,15 @@ func (c *databaseServiceClient) ListBackup(ctx context.Context, in *ListBackupRereturn out, nil}+func (c *databaseServiceClient) ListSlowQueries(ctx context.Context, in *ListSlowQueriesRequest, opts ...grpc.CallOption) (*ListSlowQueriesResponse, error) {+ out := new(ListSlowQueriesResponse)+ err := c.cc.Invoke(ctx, DatabaseService_ListSlowQueries_FullMethodName, in, out, opts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}+// DatabaseServiceServer is the server API for DatabaseService service.// All implementations must embed UnimplementedDatabaseServiceServer// for forward compatibility@@ -159,6 +170,7 @@ type DatabaseServiceServer interface {UpdateBackupSetting(context.Context, *UpdateBackupSettingRequest) (*BackupSetting, error)CreateBackup(context.Context, *CreateBackupRequest) (*Backup, error)ListBackup(context.Context, *ListBackupRequest) (*ListBackupResponse, error)+ ListSlowQueries(context.Context, *ListSlowQueriesRequest) (*ListSlowQueriesResponse, error)mustEmbedUnimplementedDatabaseServiceServer()}@@ -196,6 +208,9 @@ func (UnimplementedDatabaseServiceServer) CreateBackup(context.Context, *CreateBfunc (UnimplementedDatabaseServiceServer) ListBackup(context.Context, *ListBackupRequest) (*ListBackupResponse, error) {return nil, status.Errorf(codes.Unimplemented, "method ListBackup not implemented")}+func (UnimplementedDatabaseServiceServer) ListSlowQueries(context.Context, *ListSlowQueriesRequest) (*ListSlowQueriesResponse, error) {+ return nil, status.Errorf(codes.Unimplemented, "method ListSlowQueries not implemented")+}func (UnimplementedDatabaseServiceServer) mustEmbedUnimplementedDatabaseServiceServer() {}// UnsafeDatabaseServiceServer may be embedded to opt out of forward compatibility for this service.@@ -389,6 +404,24 @@ func _DatabaseService_ListBackup_Handler(srv interface{}, ctx context.Context, dreturn interceptor(ctx, in, info, handler)}+func _DatabaseService_ListSlowQueries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(ListSlowQueriesRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(DatabaseServiceServer).ListSlowQueries(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: DatabaseService_ListSlowQueries_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(DatabaseServiceServer).ListSlowQueries(ctx, req.(*ListSlowQueriesRequest))+ }+ return interceptor(ctx, in, info, handler)+}+// DatabaseService_ServiceDesc is the grpc.ServiceDesc for DatabaseService service.// It's only intended for direct use with grpc.RegisterService,// and not to be introspected or modified (even as a copy)@@ -436,6 +469,10 @@ var DatabaseService_ServiceDesc = grpc.ServiceDesc{MethodName: "ListBackup",Handler: _DatabaseService_ListBackup_Handler,},+ {+ MethodName: "ListSlowQueries",+ Handler: _DatabaseService_ListSlowQueries_Handler,+ },},Streams: []grpc.StreamDesc{},Metadata: "v1/database_service.proto",diff --git a/proto/v1/database_service.proto b/proto/v1/database_service.protoindex 85ea28c5b7..4c382da7ea 100644--- a/proto/v1/database_service.proto+++ b/proto/v1/database_service.proto@@ -70,6 +70,10 @@ service DatabaseService {option (google.api.http) = {get: "/v1/{parent=environments/*/instances/*/databases/*}/backups"};option (google.api.method_signature) = "parent";}++ rpc ListSlowQueries(ListSlowQueriesRequest) returns (ListSlowQueriesResponse) {+ option (google.api.http) = {get: "/v1/environments/*/instances/*/databases/*/slowQueries"};+ }}message GetDatabaseRequest {@@ -499,3 +503,101 @@ message Backup {// The comment of the backup.string comment = 6;}++// ListSlowQueriesRequest is the request of listing slow query.+message ListSlowQueriesRequest {+ // The filter of the slow query log.+ // follow the [ebnf](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form) syntax.+ // Support filter by project and start_time in SlowQueryDetails for now.+ // For example:+ // Search the slow query log of the specific project:+ // - the specific project: project = "projects/{project}"+ // Search the slow query log that start_time after 2022-01-01T12:00:00.000Z:+ // - start_time > "2022-01-01T12:00:00.000Z"+ // - Should use [RFC-3339 format](https://www.rfc-editor.org/rfc/rfc3339).+ // - Currently we only support filtering down to date granularity.+ string filter = 1;++ // The order by of the slow query log.+ // Support order by count, latest_log_time, average_query_time, nighty_fifth_percentile_query_time,+ // average_rows_sent, nighty_fifth_percentile_rows_sent, average_rows_examined, nighty_fifth_percentile_rows_examined for now.+ // For example:+ // - order by count: order_by = "count"+ // - order by latest_log_time desc: order_by = "latest_log_time desc"+ // Default: order by nighty_fifth_percentile_query_time desc.+ string order_by = 2;+}++// ListSlowQueriesResponse is the response of listing slow query.+message ListSlowQueriesResponse {+ // The slow query logs.+ repeated SlowQueryLog slow_query_logs = 1;+}++// SlowQueryLog is the slow query log.+message SlowQueryLog {+ // The resource of the slow query log.+ // The format is "environments/{environment}/instances/{instance}/databases/{database}".+ string resource = 1 [(google.api.field_behavior) = REQUIRED];++ // The project of the slow query log.+ // The format is "projects/{project}".+ string project = 2;++ // The statistics of the slow query log.+ SlowQueryStatistics statistics = 3;+}++// SlowQueryStatistics is the statistics of the slow query log.+message SlowQueryStatistics {+ // The fingerprint of the slow query log.+ string sql_fingerprint = 1;++ // The count of the slow query log.+ int32 count = 2;++ // The latest log time of the slow query log.+ google.protobuf.Timestamp latest_log_time = 3;++ // The average query time of the slow query log.+ google.protobuf.Duration average_query_time = 4;++ // The nighty fifth percentile query time of the slow query log.+ google.protobuf.Duration nighty_fifth_percentile_query_time = 5;++ // The average rows sent of the slow query log.+ int32 average_rows_sent = 6;++ // The nighty fifth percentile rows sent of the slow query log.+ int32 nighty_fifth_percentile_rows_sent = 7;++ // The average rows examined of the slow query log.+ int32 average_rows_examined = 8;++ // The nighty fifth percentile rows examined of the slow query log.+ int32 nighty_fifth_percentile_rows_examined = 9;++ // The details of the slow query log.+ repeated SlowQueryDetails details = 10;+}++// SlowQueryDetails is the details of the slow query log.+message SlowQueryDetails {+ // The start time of the slow query log.+ google.protobuf.Timestamp start_time = 1;++ // The query time of the slow query log.+ google.protobuf.Duration query_time = 2;++ // The lock time of the slow query log.+ google.protobuf.Duration lock_time = 3;++ // The rows sent of the slow query log.+ int32 rows_sent = 4;++ // The rows examined of the slow query log.+ int32 rows_examined = 5;++ // The sql text of the slow query log.+ string sql_text = 6;+}