Skip to content

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

82.1 KB
Raw Blame
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.12
// 	protoc        (unknown)
// source: v1/sql_service.proto

package v1

import (
	_ "google.golang.org/genproto/googleapis/api/annotations"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	durationpb "google.golang.org/protobuf/types/known/durationpb"
	structpb "google.golang.org/protobuf/types/known/structpb"
	timestamppb "google.golang.org/protobuf/types/known/timestamppb"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

type QueryOption_RedisRunCommandsOn int32

const (
	// UNSPECIFIED defaults to SINGLE_NODE.
	QueryOption_REDIS_RUN_COMMANDS_ON_UNSPECIFIED QueryOption_RedisRunCommandsOn = 0
	// Execute Redis commands on a single node in the cluster.
	QueryOption_SINGLE_NODE QueryOption_RedisRunCommandsOn = 1
	// Execute Redis commands on all nodes in the cluster for cluster-wide operations.
	QueryOption_ALL_NODES QueryOption_RedisRunCommandsOn = 2
)

// Enum value maps for QueryOption_RedisRunCommandsOn.
var (
	QueryOption_RedisRunCommandsOn_name = map[int32]string{
		0: "REDIS_RUN_COMMANDS_ON_UNSPECIFIED",
		1: "SINGLE_NODE",
		2: "ALL_NODES",
	}
	QueryOption_RedisRunCommandsOn_value = map[string]int32{
		"REDIS_RUN_COMMANDS_ON_UNSPECIFIED": 0,
		"SINGLE_NODE":                       1,
		"ALL_NODES":                         2,
	}
)

func (x QueryOption_RedisRunCommandsOn) Enum() *QueryOption_RedisRunCommandsOn {
	p := new(QueryOption_RedisRunCommandsOn)
	*p = x
	return p
}

func (x QueryOption_RedisRunCommandsOn) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (QueryOption_RedisRunCommandsOn) Descriptor() protoreflect.EnumDescriptor {
	return file_v1_sql_service_proto_enumTypes[0].Descriptor()
}

func (QueryOption_RedisRunCommandsOn) Type() protoreflect.EnumType {
	return &file_v1_sql_service_proto_enumTypes[0]
}

func (x QueryOption_RedisRunCommandsOn) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use QueryOption_RedisRunCommandsOn.Descriptor instead.
func (QueryOption_RedisRunCommandsOn) EnumDescriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{4, 0}
}

// The output format of a query plan.
type QueryOption_ExplainFormat int32

const (
	// The engine's default: PostgreSQL EXPLAIN, SQL Server SHOWPLAN_ALL. On a
	// result, a default the server could not resolve, as when MySQL follows the
	// session's explain_format; read such a plan as text.
	QueryOption_EXPLAIN_FORMAT_UNSPECIFIED QueryOption_ExplainFormat = 0
	// The human-readable plan. PostgreSQL: EXPLAIN (FORMAT TEXT). SQL Server:
	// SHOWPLAN_ALL.
	QueryOption_TEXT QueryOption_ExplainFormat = 1
	// The plan tree as JSON. PostgreSQL: EXPLAIN (FORMAT JSON).
	QueryOption_JSON QueryOption_ExplainFormat = 2
	// The plan tree as XML. PostgreSQL: EXPLAIN (FORMAT XML). SQL Server:
	// SHOWPLAN_XML.
	QueryOption_XML QueryOption_ExplainFormat = 3
	// The plan tree as YAML. PostgreSQL: EXPLAIN (FORMAT YAML).
	QueryOption_YAML QueryOption_ExplainFormat = 4
)

// Enum value maps for QueryOption_ExplainFormat.
var (
	QueryOption_ExplainFormat_name = map[int32]string{
		0: "EXPLAIN_FORMAT_UNSPECIFIED",
		1: "TEXT",
		2: "JSON",
		3: "XML",
		4: "YAML",
	}
	QueryOption_ExplainFormat_value = map[string]int32{
		"EXPLAIN_FORMAT_UNSPECIFIED": 0,
		"TEXT":                       1,
		"JSON":                       2,
		"XML":                        3,
		"YAML":                       4,
	}
)

func (x QueryOption_ExplainFormat) Enum() *QueryOption_ExplainFormat {
	p := new(QueryOption_ExplainFormat)
	*p = x
	return p
}

func (x QueryOption_ExplainFormat) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (QueryOption_ExplainFormat) Descriptor() protoreflect.EnumDescriptor {
	return file_v1_sql_service_proto_enumTypes[1].Descriptor()
}

func (QueryOption_ExplainFormat) Type() protoreflect.EnumType {
	return &file_v1_sql_service_proto_enumTypes[1]
}

func (x QueryOption_ExplainFormat) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use QueryOption_ExplainFormat.Descriptor instead.
func (QueryOption_ExplainFormat) EnumDescriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{4, 1}
}

type QueryResult_CommandError_Type int32

const (
	QueryResult_CommandError_TYPE_UNSPECIFIED QueryResult_CommandError_Type = 0
	QueryResult_CommandError_DDL              QueryResult_CommandError_Type = 1
	QueryResult_CommandError_DML              QueryResult_CommandError_Type = 2
	QueryResult_CommandError_NON_READ_ONLY    QueryResult_CommandError_Type = 3
)

// Enum value maps for QueryResult_CommandError_Type.
var (
	QueryResult_CommandError_Type_name = map[int32]string{
		0: "TYPE_UNSPECIFIED",
		1: "DDL",
		2: "DML",
		3: "NON_READ_ONLY",
	}
	QueryResult_CommandError_Type_value = map[string]int32{
		"TYPE_UNSPECIFIED": 0,
		"DDL":              1,
		"DML":              2,
		"NON_READ_ONLY":    3,
	}
)

func (x QueryResult_CommandError_Type) Enum() *QueryResult_CommandError_Type {
	p := new(QueryResult_CommandError_Type)
	*p = x
	return p
}

func (x QueryResult_CommandError_Type) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (QueryResult_CommandError_Type) Descriptor() protoreflect.EnumDescriptor {
	return file_v1_sql_service_proto_enumTypes[2].Descriptor()
}

func (QueryResult_CommandError_Type) Type() protoreflect.EnumType {
	return &file_v1_sql_service_proto_enumTypes[2]
}

func (x QueryResult_CommandError_Type) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use QueryResult_CommandError_Type.Descriptor instead.
func (QueryResult_CommandError_Type) EnumDescriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{5, 2, 0}
}

type QueryResult_Message_Level int32

const (
	// Unspecified message level.
	QueryResult_Message_LEVEL_UNSPECIFIED QueryResult_Message_Level = 0
	// Informational message.
	QueryResult_Message_INFO QueryResult_Message_Level = 1
	// Warning message indicating potential issues.
	QueryResult_Message_WARNING QueryResult_Message_Level = 2
	// Debug message for development and troubleshooting.
	QueryResult_Message_DEBUG QueryResult_Message_Level = 3
	// General log message.
	QueryResult_Message_LOG QueryResult_Message_Level = 4
	// Notice message for important information.
	QueryResult_Message_NOTICE QueryResult_Message_Level = 5
	// Exception message indicating error conditions.
	QueryResult_Message_EXCEPTION QueryResult_Message_Level = 6
)

// Enum value maps for QueryResult_Message_Level.
var (
	QueryResult_Message_Level_name = map[int32]string{
		0: "LEVEL_UNSPECIFIED",
		1: "INFO",
		2: "WARNING",
		3: "DEBUG",
		4: "LOG",
		5: "NOTICE",
		6: "EXCEPTION",
	}
	QueryResult_Message_Level_value = map[string]int32{
		"LEVEL_UNSPECIFIED": 0,
		"INFO":              1,
		"WARNING":           2,
		"DEBUG":             3,
		"LOG":               4,
		"NOTICE":            5,
		"EXCEPTION":         6,
	}
)

func (x QueryResult_Message_Level) Enum() *QueryResult_Message_Level {
	p := new(QueryResult_Message_Level)
	*p = x
	return p
}

func (x QueryResult_Message_Level) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (QueryResult_Message_Level) Descriptor() protoreflect.EnumDescriptor {
	return file_v1_sql_service_proto_enumTypes[3].Descriptor()
}

func (QueryResult_Message_Level) Type() protoreflect.EnumType {
	return &file_v1_sql_service_proto_enumTypes[3]
}

func (x QueryResult_Message_Level) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use QueryResult_Message_Level.Descriptor instead.
func (QueryResult_Message_Level) EnumDescriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{5, 3, 0}
}

// Level represents the severity level of the advice.
type Advice_Level int32

const (
	// Unspecified advice level.
	Advice_ADVICE_LEVEL_UNSPECIFIED Advice_Level = 0
	// Success status indicating the check passed without issues.
	Advice_SUCCESS Advice_Level = 1
	// Warning status indicating potential issues that should be reviewed.
	Advice_WARNING Advice_Level = 2
	// Error status indicating critical issues that must be addressed.
	Advice_ERROR Advice_Level = 3
)

// Enum value maps for Advice_Level.
var (
	Advice_Level_name = map[int32]string{
		0: "ADVICE_LEVEL_UNSPECIFIED",
		1: "SUCCESS",
		2: "WARNING",
		3: "ERROR",
	}
	Advice_Level_value = map[string]int32{
		"ADVICE_LEVEL_UNSPECIFIED": 0,
		"SUCCESS":                  1,
		"WARNING":                  2,
		"ERROR":                    3,
	}
)

func (x Advice_Level) Enum() *Advice_Level {
	p := new(Advice_Level)
	*p = x
	return p
}

func (x Advice_Level) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (Advice_Level) Descriptor() protoreflect.EnumDescriptor {
	return file_v1_sql_service_proto_enumTypes[4].Descriptor()
}

func (Advice_Level) Type() protoreflect.EnumType {
	return &file_v1_sql_service_proto_enumTypes[4]
}

func (x Advice_Level) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use Advice_Level.Descriptor instead.
func (Advice_Level) EnumDescriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{9, 0}
}

// RuleType indicates the source of the linting rule.
type Advice_RuleType int32

const (
	// Unspecified rule type.
	Advice_RULE_TYPE_UNSPECIFIED Advice_RuleType = 0
	// Parser-based rule enforced by the built-in SQL parser.
	// These are non-configurable, mandatory checks for schema health.
	Advice_PARSER_BASED Advice_RuleType = 1
	// AI-powered rule defined by user in natural language.
	// These are custom, flexible checks powered by AI models.
	Advice_AI_POWERED Advice_RuleType = 2
)

// Enum value maps for Advice_RuleType.
var (
	Advice_RuleType_name = map[int32]string{
		0: "RULE_TYPE_UNSPECIFIED",
		1: "PARSER_BASED",
		2: "AI_POWERED",
	}
	Advice_RuleType_value = map[string]int32{
		"RULE_TYPE_UNSPECIFIED": 0,
		"PARSER_BASED":          1,
		"AI_POWERED":            2,
	}
)

func (x Advice_RuleType) Enum() *Advice_RuleType {
	p := new(Advice_RuleType)
	*p = x
	return p
}

func (x Advice_RuleType) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (Advice_RuleType) Descriptor() protoreflect.EnumDescriptor {
	return file_v1_sql_service_proto_enumTypes[5].Descriptor()
}

func (Advice_RuleType) Type() protoreflect.EnumType {
	return &file_v1_sql_service_proto_enumTypes[5]
}

func (x Advice_RuleType) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use Advice_RuleType.Descriptor instead.
func (Advice_RuleType) EnumDescriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{9, 1}
}

type AdminExecuteRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The name is the instance name to execute the query against.
	// Format: instances/{instance}/databases/{databaseName} or
	// projects/{project}/instances/{instance}/databases/{databaseName}
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The SQL statement to execute.
	Statement string `protobuf:"bytes,2,opt,name=statement,proto3" json:"statement,omitempty"`
	// The maximum number of rows to return.
	Limit int32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	// The default schema to execute the statement. Equals to the current schema
	// in Oracle and search path in Postgres.
	Schema *string `protobuf:"bytes,4,opt,name=schema,proto3,oneof" json:"schema,omitempty"`
	// Container is the container name to execute the query against, used for
	// CosmosDB only.
	Container     *string `protobuf:"bytes,5,opt,name=container,proto3,oneof" json:"container,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *AdminExecuteRequest) Reset() {
	*x = AdminExecuteRequest{}
	mi := &file_v1_sql_service_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *AdminExecuteRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*AdminExecuteRequest) ProtoMessage() {}

func (x *AdminExecuteRequest) ProtoReflect() protoreflect.Message {
	mi := &file_v1_sql_service_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use AdminExecuteRequest.ProtoReflect.Descriptor instead.
func (*AdminExecuteRequest) Descriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{0}
}

func (x *AdminExecuteRequest) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

func (x *AdminExecuteRequest) GetStatement() string {
	if x != nil {
		return x.Statement
	}
	return ""
}

func (x *AdminExecuteRequest) GetLimit() int32 {
	if x != nil {
		return x.Limit
	}
	return 0
}

func (x *AdminExecuteRequest) GetSchema() string {
	if x != nil && x.Schema != nil {
		return *x.Schema
	}
	return ""
}

func (x *AdminExecuteRequest) GetContainer() string {
	if x != nil && x.Container != nil {
		return *x.Container
	}
	return ""
}

type AdminExecuteResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The query results.
	Results       []*QueryResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *AdminExecuteResponse) Reset() {
	*x = AdminExecuteResponse{}
	mi := &file_v1_sql_service_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *AdminExecuteResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*AdminExecuteResponse) ProtoMessage() {}

func (x *AdminExecuteResponse) ProtoReflect() protoreflect.Message {
	mi := &file_v1_sql_service_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use AdminExecuteResponse.ProtoReflect.Descriptor instead.
func (*AdminExecuteResponse) Descriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{1}
}

func (x *AdminExecuteResponse) GetResults() []*QueryResult {
	if x != nil {
		return x.Results
	}
	return nil
}

type QueryRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The name is the database resource name to execute the query against.
	// Format: instances/{instance}/databases/{databaseName} or
	// projects/{project}/instances/{instance}/databases/{databaseName}
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The SQL statement to execute.
	Statement string `protobuf:"bytes,2,opt,name=statement,proto3" json:"statement,omitempty"`
	// The maximum number of rows to return.
	Limit int32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	// The id of data source.
	// If omitted, Query resolves the data source server-side by using the single
	// read-only data source when exactly one exists, or the admin data source
	// otherwise. It can also be set explicitly to query the admin data source or
	// a specific read-only data source.
	DataSourceId string `protobuf:"bytes,4,opt,name=data_source_id,json=dataSourceId,proto3" json:"data_source_id,omitempty"`
	// Explain the statement.
	Explain bool `protobuf:"varint,5,opt,name=explain,proto3" json:"explain,omitempty"`
	// The default schema to search objects. Equals to the current schema in
	// Oracle and search path in Postgres.
	Schema      *string      `protobuf:"bytes,6,opt,name=schema,proto3,oneof" json:"schema,omitempty"`
	QueryOption *QueryOption `protobuf:"bytes,7,opt,name=query_option,json=queryOption,proto3" json:"query_option,omitempty"`
	// Container is the container name to execute the query against, used for
	// CosmosDB only.
	Container     *string `protobuf:"bytes,8,opt,name=container,proto3,oneof" json:"container,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *QueryRequest) Reset() {
	*x = QueryRequest{}
	mi := &file_v1_sql_service_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *QueryRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*QueryRequest) ProtoMessage() {}

func (x *QueryRequest) ProtoReflect() protoreflect.Message {
	mi := &file_v1_sql_service_proto_msgTypes[2]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead.
func (*QueryRequest) Descriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{2}
}

func (x *QueryRequest) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

func (x *QueryRequest) GetStatement() string {
	if x != nil {
		return x.Statement
	}
	return ""
}

func (x *QueryRequest) GetLimit() int32 {
	if x != nil {
		return x.Limit
	}
	return 0
}

func (x *QueryRequest) GetDataSourceId() string {
	if x != nil {
		return x.DataSourceId
	}
	return ""
}

func (x *QueryRequest) GetExplain() bool {
	if x != nil {
		return x.Explain
	}
	return false
}

func (x *QueryRequest) GetSchema() string {
	if x != nil && x.Schema != nil {
		return *x.Schema
	}
	return ""
}

func (x *QueryRequest) GetQueryOption() *QueryOption {
	if x != nil {
		return x.QueryOption
	}
	return nil
}

func (x *QueryRequest) GetContainer() string {
	if x != nil && x.Container != nil {
		return *x.Container
	}
	return ""
}

type QueryResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The query results.
	Results []*QueryResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	// The just-in-time access grant applied to this query, if any.
	// Format: projects/{project}/accessGrants/{accessGrant}.
	// Empty when the user was authorized through normal ACL rather than a grant.
	AppliedAccessGrant string `protobuf:"bytes,2,opt,name=applied_access_grant,json=appliedAccessGrant,proto3" json:"applied_access_grant,omitempty"`
	unknownFields      protoimpl.UnknownFields
	sizeCache          protoimpl.SizeCache
}

func (x *QueryResponse) Reset() {
	*x = QueryResponse{}
	mi := &file_v1_sql_service_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *QueryResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*QueryResponse) ProtoMessage() {}

func (x *QueryResponse) ProtoReflect() protoreflect.Message {
	mi := &file_v1_sql_service_proto_msgTypes[3]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead.
func (*QueryResponse) Descriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{3}
}

func (x *QueryResponse) GetResults() []*QueryResult {
	if x != nil {
		return x.Results
	}
	return nil
}

func (x *QueryResponse) GetAppliedAccessGrant() string {
	if x != nil {
		return x.AppliedAccessGrant
	}
	return ""
}

type QueryOption struct {
	state              protoimpl.MessageState         `protogen:"open.v1"`
	RedisRunCommandsOn QueryOption_RedisRunCommandsOn `protobuf:"varint,1,opt,name=redis_run_commands_on,json=redisRunCommandsOn,proto3,enum=bytebase.v1.QueryOption_RedisRunCommandsOn" json:"redis_run_commands_on,omitempty"`
	// Which explain output the caller wants, for an explain request.
	//
	// Leave it unspecified for the engine's own default, which is the only
	// output most engines have. Naming a format an engine cannot produce is
	// INVALID_ARGUMENT rather than a silent fallback, as is any explain request
	// against an engine that has no explain at all.
	ExplainFormat QueryOption_ExplainFormat `protobuf:"varint,3,opt,name=explain_format,json=explainFormat,proto3,enum=bytebase.v1.QueryOption_ExplainFormat" json:"explain_format,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *QueryOption) Reset() {
	*x = QueryOption{}
	mi := &file_v1_sql_service_proto_msgTypes[4]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *QueryOption) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*QueryOption) ProtoMessage() {}

func (x *QueryOption) ProtoReflect() protoreflect.Message {
	mi := &file_v1_sql_service_proto_msgTypes[4]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use QueryOption.ProtoReflect.Descriptor instead.
func (*QueryOption) Descriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{4}
}

func (x *QueryOption) GetRedisRunCommandsOn() QueryOption_RedisRunCommandsOn {
	if x != nil {
		return x.RedisRunCommandsOn
	}
	return QueryOption_REDIS_RUN_COMMANDS_ON_UNSPECIFIED
}

func (x *QueryOption) GetExplainFormat() QueryOption_ExplainFormat {
	if x != nil {
		return x.ExplainFormat
	}
	return QueryOption_EXPLAIN_FORMAT_UNSPECIFIED
}

type QueryResult struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Column names of the query result.
	ColumnNames []string `protobuf:"bytes,1,rep,name=column_names,json=columnNames,proto3" json:"column_names,omitempty"`
	// Column types of the query result.
	// The types come from the Golang SQL driver.
	ColumnTypeNames []string `protobuf:"bytes,2,rep,name=column_type_names,json=columnTypeNames,proto3" json:"column_type_names,omitempty"`
	// Rows of the query result.
	Rows      []*QueryRow `protobuf:"bytes,3,rep,name=rows,proto3" json:"rows,omitempty"`
	RowsCount int64       `protobuf:"varint,4,opt,name=rows_count,json=rowsCount,proto3" json:"rows_count,omitempty"`
	// The error message if the query failed.
	Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"`
	// The time it takes to execute the query.
	Latency *durationpb.Duration `protobuf:"bytes,6,opt,name=latency,proto3" json:"latency,omitempty"`
	// The query statement for the result.
	Statement string `protobuf:"bytes,7,opt,name=statement,proto3" json:"statement,omitempty"`
	// Types that are valid to be assigned to DetailedError:
	//
	//	*QueryResult_PostgresError_
	//	*QueryResult_SyntaxError_
	//	*QueryResult_PermissionDenied
	//	*QueryResult_CommandError_
	DetailedError isQueryResult_DetailedError `protobuf_oneof:"detailed_error"`
	// Informational or debug messages returned by the database engine during query execution.
	// Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle's DBMS_OUTPUT.PUT_LINE.
	Messages []*QueryResult_Message `protobuf:"bytes,11,rep,name=messages,proto3" json:"messages,omitempty"`
	// Masking reasons for each column (empty for non-masked columns).
	Masked []*MaskingReason `protobuf:"bytes,12,rep,name=masked,proto3" json:"masked,omitempty"`
	// Set when the result is a query plan. Unset for any other result.
	QueryPlan     *QueryResult_QueryPlan `protobuf:"bytes,14,opt,name=query_plan,json=queryPlan,proto3" json:"query_plan,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *QueryResult) Reset() {
	*x = QueryResult{}
	mi := &file_v1_sql_service_proto_msgTypes[5]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *QueryResult) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*QueryResult) ProtoMessage() {}

func (x *QueryResult) ProtoReflect() protoreflect.Message {
	mi := &file_v1_sql_service_proto_msgTypes[5]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use QueryResult.ProtoReflect.Descriptor instead.
func (*QueryResult) Descriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{5}
}

func (x *QueryResult) GetColumnNames() []string {
	if x != nil {
		return x.ColumnNames
	}
	return nil
}

func (x *QueryResult) GetColumnTypeNames() []string {
	if x != nil {
		return x.ColumnTypeNames
	}
	return nil
}

func (x *QueryResult) GetRows() []*QueryRow {
	if x != nil {
		return x.Rows
	}
	return nil
}

func (x *QueryResult) GetRowsCount() int64 {
	if x != nil {
		return x.RowsCount
	}
	return 0
}

func (x *QueryResult) GetError() string {
	if x != nil {
		return x.Error
	}
	return ""
}

func (x *QueryResult) GetLatency() *durationpb.Duration {
	if x != nil {
		return x.Latency
	}
	return nil
}

func (x *QueryResult) GetStatement() string {
	if x != nil {
		return x.Statement
	}
	return ""
}

func (x *QueryResult) GetDetailedError() isQueryResult_DetailedError {
	if x != nil {
		return x.DetailedError
	}
	return nil
}

func (x *QueryResult) GetPostgresError() *QueryResult_PostgresError {
	if x != nil {
		if x, ok := x.DetailedError.(*QueryResult_PostgresError_); ok {
			return x.PostgresError
		}
	}
	return nil
}

func (x *QueryResult) GetSyntaxError() *QueryResult_SyntaxError {
	if x != nil {
		if x, ok := x.DetailedError.(*QueryResult_SyntaxError_); ok {
			return x.SyntaxError
		}
	}
	return nil
}

func (x *QueryResult) GetPermissionDenied() *PermissionDeniedDetail {
	if x != nil {
		if x, ok := x.DetailedError.(*QueryResult_PermissionDenied); ok {
			return x.PermissionDenied
		}
	}
	return nil
}

func (x *QueryResult) GetCommandError() *QueryResult_CommandError {
	if x != nil {
		if x, ok := x.DetailedError.(*QueryResult_CommandError_); ok {
			return x.CommandError
		}
	}
	return nil
}

func (x *QueryResult) GetMessages() []*QueryResult_Message {
	if x != nil {
		return x.Messages
	}
	return nil
}

func (x *QueryResult) GetMasked() []*MaskingReason {
	if x != nil {
		return x.Masked
	}
	return nil
}

func (x *QueryResult) GetQueryPlan() *QueryResult_QueryPlan {
	if x != nil {
		return x.QueryPlan
	}
	return nil
}

type isQueryResult_DetailedError interface {
	isQueryResult_DetailedError()
}

type QueryResult_PostgresError_ struct {
	PostgresError *QueryResult_PostgresError `protobuf:"bytes,8,opt,name=postgres_error,json=postgresError,proto3,oneof"`
}

type QueryResult_SyntaxError_ struct {
	SyntaxError *QueryResult_SyntaxError `protobuf:"bytes,9,opt,name=syntax_error,json=syntaxError,proto3,oneof"`
}

type QueryResult_PermissionDenied struct {
	PermissionDenied *PermissionDeniedDetail `protobuf:"bytes,10,opt,name=permission_denied,json=permissionDenied,proto3,oneof"`
}

type QueryResult_CommandError_ struct {
	CommandError *QueryResult_CommandError `protobuf:"bytes,13,opt,name=command_error,json=commandError,proto3,oneof"`
}

func (*QueryResult_PostgresError_) isQueryResult_DetailedError() {}

func (*QueryResult_SyntaxError_) isQueryResult_DetailedError() {}

func (*QueryResult_PermissionDenied) isQueryResult_DetailedError() {}

func (*QueryResult_CommandError_) isQueryResult_DetailedError() {}

type MaskingReason struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The semantic type that triggered masking (e.g., "SSN", "email", "phone").
	SemanticTypeId string `protobuf:"bytes,1,opt,name=semantic_type_id,json=semanticTypeId,proto3" json:"semantic_type_id,omitempty"`
	// Human-readable semantic type title.
	SemanticTypeTitle string `protobuf:"bytes,2,opt,name=semantic_type_title,json=semanticTypeTitle,proto3" json:"semantic_type_title,omitempty"`
	// The masking rule ID that matched (if applicable).
	MaskingRuleId string `protobuf:"bytes,3,opt,name=masking_rule_id,json=maskingRuleId,proto3" json:"masking_rule_id,omitempty"`
	// The masking algorithm used.
	Algorithm string `protobuf:"bytes,4,opt,name=algorithm,proto3" json:"algorithm,omitempty"`
	// Additional context (e.g., "Matched global rule: PII Protection").
	Context string `protobuf:"bytes,5,opt,name=context,proto3" json:"context,omitempty"`
	// The classification level that triggered masking.
	ClassificationLevel int32 `protobuf:"varint,6,opt,name=classification_level,json=classificationLevel,proto3" json:"classification_level,omitempty"`
	// Icon associated with the semantic type (if any).
	SemanticTypeIcon string `protobuf:"bytes,7,opt,name=semantic_type_icon,json=semanticTypeIcon,proto3" json:"semantic_type_icon,omitempty"`
	unknownFields    protoimpl.UnknownFields
	sizeCache        protoimpl.SizeCache
}

func (x *MaskingReason) Reset() {
	*x = MaskingReason{}
	mi := &file_v1_sql_service_proto_msgTypes[6]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *MaskingReason) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*MaskingReason) ProtoMessage() {}

func (x *MaskingReason) ProtoReflect() protoreflect.Message {
	mi := &file_v1_sql_service_proto_msgTypes[6]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use MaskingReason.ProtoReflect.Descriptor instead.
func (*MaskingReason) Descriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{6}
}

func (x *MaskingReason) GetSemanticTypeId() string {
	if x != nil {
		return x.SemanticTypeId
	}
	return ""
}

func (x *MaskingReason) GetSemanticTypeTitle() string {
	if x != nil {
		return x.SemanticTypeTitle
	}
	return ""
}

func (x *MaskingReason) GetMaskingRuleId() string {
	if x != nil {
		return x.MaskingRuleId
	}
	return ""
}

func (x *MaskingReason) GetAlgorithm() string {
	if x != nil {
		return x.Algorithm
	}
	return ""
}

func (x *MaskingReason) GetContext() string {
	if x != nil {
		return x.Context
	}
	return ""
}

func (x *MaskingReason) GetClassificationLevel() int32 {
	if x != nil {
		return x.ClassificationLevel
	}
	return 0
}

func (x *MaskingReason) GetSemanticTypeIcon() string {
	if x != nil {
		return x.SemanticTypeIcon
	}
	return ""
}

type QueryRow struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Row values of the query result.
	Values        []*RowValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *QueryRow) Reset() {
	*x = QueryRow{}
	mi := &file_v1_sql_service_proto_msgTypes[7]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *QueryRow) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*QueryRow) ProtoMessage() {}

func (x *QueryRow) ProtoReflect() protoreflect.Message {
	mi := &file_v1_sql_service_proto_msgTypes[7]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use QueryRow.ProtoReflect.Descriptor instead.
func (*QueryRow) Descriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{7}
}

func (x *QueryRow) GetValues() []*RowValue {
	if x != nil {
		return x.Values
	}
	return nil
}

type RowValue struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to Kind:
	//
	//	*RowValue_NullValue
	//	*RowValue_BoolValue
	//	*RowValue_BytesValue
	//	*RowValue_DoubleValue
	//	*RowValue_FloatValue
	//	*RowValue_Int32Value
	//	*RowValue_Int64Value
	//	*RowValue_StringValue
	//	*RowValue_Uint32Value
	//	*RowValue_Uint64Value
	//	*RowValue_ValueValue
	//	*RowValue_TimestampValue
	//	*RowValue_TimestampTzValue
	Kind          isRowValue_Kind `protobuf_oneof:"kind"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *RowValue) Reset() {
	*x = RowValue{}
	mi := &file_v1_sql_service_proto_msgTypes[8]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *RowValue) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*RowValue) ProtoMessage() {}

func (x *RowValue) ProtoReflect() protoreflect.Message {
	mi := &file_v1_sql_service_proto_msgTypes[8]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use RowValue.ProtoReflect.Descriptor instead.
func (*RowValue) Descriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{8}
}

func (x *RowValue) GetKind() isRowValue_Kind {
	if x != nil {
		return x.Kind
	}
	return nil
}

func (x *RowValue) GetNullValue() structpb.NullValue {
	if x != nil {
		if x, ok := x.Kind.(*RowValue_NullValue); ok {
			return x.NullValue
		}
	}
	return structpb.NullValue(0)
}

func (x *RowValue) GetBoolValue() bool {
	if x != nil {
		if x, ok := x.Kind.(*RowValue_BoolValue); ok {
			return x.BoolValue
		}
	}
	return false
}

func (x *RowValue) GetBytesValue() []byte {
	if x != nil {
		if x, ok := x.Kind.(*RowValue_BytesValue); ok {
			return x.BytesValue
		}
	}
	return nil
}

func (x *RowValue) GetDoubleValue() float64 {
	if x != nil {
		if x, ok := x.Kind.(*RowValue_DoubleValue); ok {
			return x.DoubleValue
		}
	}
	return 0
}

func (x *RowValue) GetFloatValue() float32 {
	if x != nil {
		if x, ok := x.Kind.(*RowValue_FloatValue); ok {
			return x.FloatValue
		}
	}
	return 0
}

func (x *RowValue) GetInt32Value() int32 {
	if x != nil {
		if x, ok := x.Kind.(*RowValue_Int32Value); ok {
			return x.Int32Value
		}
	}
	return 0
}

func (x *RowValue) GetInt64Value() int64 {
	if x != nil {
		if x, ok := x.Kind.(*RowValue_Int64Value); ok {
			return x.Int64Value
		}
	}
	return 0
}

func (x *RowValue) GetStringValue() string {
	if x != nil {
		if x, ok := x.Kind.(*RowValue_StringValue); ok {
			return x.StringValue
		}
	}
	return ""
}

func (x *RowValue) GetUint32Value() uint32 {
	if x != nil {
		if x, ok := x.Kind.(*RowValue_Uint32Value); ok {
			return x.Uint32Value
		}
	}
	return 0
}

func (x *RowValue) GetUint64Value() uint64 {
	if x != nil {
		if x, ok := x.Kind.(*RowValue_Uint64Value); ok {
			return x.Uint64Value
		}
	}
	return 0
}

func (x *RowValue) GetValueValue() *structpb.Value {
	if x != nil {
		if x, ok := x.Kind.(*RowValue_ValueValue); ok {
			return x.ValueValue
		}
	}
	return nil
}

func (x *RowValue) GetTimestampValue() *RowValue_Timestamp {
	if x != nil {
		if x, ok := x.Kind.(*RowValue_TimestampValue); ok {
			return x.TimestampValue
		}
	}
	return nil
}

func (x *RowValue) GetTimestampTzValue() *RowValue_TimestampTZ {
	if x != nil {
		if x, ok := x.Kind.(*RowValue_TimestampTzValue); ok {
			return x.TimestampTzValue
		}
	}
	return nil
}

type isRowValue_Kind interface {
	isRowValue_Kind()
}

type RowValue_NullValue struct {
	NullValue structpb.NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,enum=google.protobuf.NullValue,oneof"`
}

type RowValue_BoolValue struct {
	BoolValue bool `protobuf:"varint,2,opt,name=bool_value,json=boolValue,proto3,oneof"`
}

type RowValue_BytesValue struct {
	BytesValue []byte `protobuf:"bytes,3,opt,name=bytes_value,json=bytesValue,proto3,oneof"`
}

type RowValue_DoubleValue struct {
	DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,proto3,oneof"`
}

type RowValue_FloatValue struct {
	FloatValue float32 `protobuf:"fixed32,5,opt,name=float_value,json=floatValue,proto3,oneof"`
}

type RowValue_Int32Value struct {
	Int32Value int32 `protobuf:"varint,6,opt,name=int32_value,json=int32Value,proto3,oneof"`
}

type RowValue_Int64Value struct {
	Int64Value int64 `protobuf:"varint,7,opt,name=int64_value,json=int64Value,proto3,oneof"`
}

type RowValue_StringValue struct {
	StringValue string `protobuf:"bytes,8,opt,name=string_value,json=stringValue,proto3,oneof"`
}

type RowValue_Uint32Value struct {
	Uint32Value uint32 `protobuf:"varint,9,opt,name=uint32_value,json=uint32Value,proto3,oneof"`
}

type RowValue_Uint64Value struct {
	Uint64Value uint64 `protobuf:"varint,10,opt,name=uint64_value,json=uint64Value,proto3,oneof"`
}

type RowValue_ValueValue struct {
	// value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only.
	ValueValue *structpb.Value `protobuf:"bytes,11,opt,name=value_value,json=valueValue,proto3,oneof"`
}

type RowValue_TimestampValue struct {
	// timestamp_value is used for the timestamp without time zone data type,
	// meaning it only includes the timestamp without any time zone or location
	// info. Although it may be expressed as a UTC value, it should be seen as a
	// timestamp missing location context.
	TimestampValue *RowValue_Timestamp `protobuf:"bytes,12,opt,name=timestamp_value,json=timestampValue,proto3,oneof"`
}

type RowValue_TimestampTzValue struct {
	// timestamp_tz_value is used for the timestamptz data type, which
	// accurately represents the timestamp with location information.
	TimestampTzValue *RowValue_TimestampTZ `protobuf:"bytes,13,opt,name=timestamp_tz_value,json=timestampTzValue,proto3,oneof"`
}

func (*RowValue_NullValue) isRowValue_Kind() {}

func (*RowValue_BoolValue) isRowValue_Kind() {}

func (*RowValue_BytesValue) isRowValue_Kind() {}

func (*RowValue_DoubleValue) isRowValue_Kind() {}

func (*RowValue_FloatValue) isRowValue_Kind() {}

func (*RowValue_Int32Value) isRowValue_Kind() {}

func (*RowValue_Int64Value) isRowValue_Kind() {}

func (*RowValue_StringValue) isRowValue_Kind() {}

func (*RowValue_Uint32Value) isRowValue_Kind() {}

func (*RowValue_Uint64Value) isRowValue_Kind() {}

func (*RowValue_ValueValue) isRowValue_Kind() {}

func (*RowValue_TimestampValue) isRowValue_Kind() {}

func (*RowValue_TimestampTzValue) isRowValue_Kind() {}

type Advice struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The advice level.
	Status Advice_Level `protobuf:"varint,1,opt,name=status,proto3,enum=bytebase.v1.Advice_Level" json:"status,omitempty"`
	// The advice code.
	Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
	// The advice title.
	Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
	// The advice content.
	Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"`
	// The start_position is inclusive and the end_position is exclusive.
	// TODO: use range instead
	StartPosition *Position `protobuf:"bytes,5,opt,name=start_position,json=startPosition,proto3" json:"start_position,omitempty"`
	EndPosition   *Position `protobuf:"bytes,6,opt,name=end_position,json=endPosition,proto3" json:"end_position,omitempty"`
	// The type of linting rule that generated this advice.
	RuleType      Advice_RuleType `protobuf:"varint,7,opt,name=rule_type,json=ruleType,proto3,enum=bytebase.v1.Advice_RuleType" json:"rule_type,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Advice) Reset() {
	*x = Advice{}
	mi := &file_v1_sql_service_proto_msgTypes[9]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *Advice) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Advice) ProtoMessage() {}

func (x *Advice) ProtoReflect() protoreflect.Message {
	mi := &file_v1_sql_service_proto_msgTypes[9]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Advice.ProtoReflect.Descriptor instead.
func (*Advice) Descriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{9}
}

func (x *Advice) GetStatus() Advice_Level {
	if x != nil {
		return x.Status
	}
	return Advice_ADVICE_LEVEL_UNSPECIFIED
}

func (x *Advice) GetCode() int32 {
	if x != nil {
		return x.Code
	}
	return 0
}

func (x *Advice) GetTitle() string {
	if x != nil {
		return x.Title
	}
	return ""
}

func (x *Advice) GetContent() string {
	if x != nil {
		return x.Content
	}
	return ""
}

func (x *Advice) GetStartPosition() *Position {
	if x != nil {
		return x.StartPosition
	}
	return nil
}

func (x *Advice) GetEndPosition() *Position {
	if x != nil {
		return x.EndPosition
	}
	return nil
}

func (x *Advice) GetRuleType() Advice_RuleType {
	if x != nil {
		return x.RuleType
	}
	return Advice_RULE_TYPE_UNSPECIFIED
}

type ExportRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The name is the resource name to execute the export against.
	// Format: instances/{instance}/databases/{database} or
	// projects/{project}/instances/{instance}/databases/{database}
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The SQL statement to execute.
	Statement string `protobuf:"bytes,2,opt,name=statement,proto3" json:"statement,omitempty"`
	// The maximum number of rows to return.
	Limit int32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	// The export format.
	Format ExportFormat `protobuf:"varint,4,opt,name=format,proto3,enum=bytebase.v1.ExportFormat" json:"format,omitempty"`
	// The admin is used for workspace owner and DBA for exporting data from SQL
	// Editor Admin mode. The exported data is not masked.
	Admin bool `protobuf:"varint,5,opt,name=admin,proto3" json:"admin,omitempty"`
	// The zip password provide by users.
	Password string `protobuf:"bytes,6,opt,name=password,proto3" json:"password,omitempty"`
	// The id of data source.
	// If omitted, Export resolves the data source server-side by using the
	// single read-only data source when exactly one exists, or the admin data
	// source otherwise. It can also be set explicitly to export from the admin
	// data source or a specific read-only data source.
	DataSourceId string `protobuf:"bytes,7,opt,name=data_source_id,json=dataSourceId,proto3" json:"data_source_id,omitempty"`
	// The default schema to search objects. Equals to the current schema in
	// Oracle and search path in Postgres.
	Schema *string `protobuf:"bytes,8,opt,name=schema,proto3,oneof" json:"schema,omitempty"`
	// Container is the container name to execute the query against, used for
	// CosmosDB only.
	Container *string `protobuf:"bytes,9,opt,name=container,proto3,oneof" json:"container,omitempty"`
	// Where the export goes. A destination the workspace query data policy
	// does not allow is rejected with FAILED_PRECONDITION.
	Destination   ExportDestination `protobuf:"varint,10,opt,name=destination,proto3,enum=bytebase.v1.ExportDestination" json:"destination,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *ExportRequest) Reset() {
	*x = ExportRequest{}
	mi := &file_v1_sql_service_proto_msgTypes[10]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *ExportRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ExportRequest) ProtoMessage() {}

func (x *ExportRequest) ProtoReflect() protoreflect.Message {
	mi := &file_v1_sql_service_proto_msgTypes[10]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ExportRequest.ProtoReflect.Descriptor instead.
func (*ExportRequest) Descriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{10}
}

func (x *ExportRequest) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

func (x *ExportRequest) GetStatement() string {
	if x != nil {
		return x.Statement
	}
	return ""
}

func (x *ExportRequest) GetLimit() int32 {
	if x != nil {
		return x.Limit
	}
	return 0
}

func (x *ExportRequest) GetFormat() ExportFormat {
	if x != nil {
		return x.Format
	}
	return ExportFormat_FORMAT_UNSPECIFIED
}

func (x *ExportRequest) GetAdmin() bool {
	if x != nil {
		return x.Admin
	}
	return false
}

func (x *ExportRequest) GetPassword() string {
	if x != nil {
		return x.Password
	}
	return ""
}

func (x *ExportRequest) GetDataSourceId() string {
	if x != nil {
		return x.DataSourceId
	}
	return ""
}

func (x *ExportRequest) GetSchema() string {
	if x != nil && x.Schema != nil {
		return *x.Schema
	}
	return ""
}

func (x *ExportRequest) GetContainer() string {
	if x != nil && x.Container != nil {
		return *x.Container
	}
	return ""
}

func (x *ExportRequest) GetDestination() ExportDestination {
	if x != nil {
		return x.Destination
	}
	return ExportDestination_EXPORT_DESTINATION_UNSPECIFIED
}

type ExportResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The export file content.
	Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	// The just-in-time access grant applied to this export, if any.
	// Format: projects/{project}/accessGrants/{accessGrant}.
	// Empty when the user was authorized through normal ACL rather than a grant.
	AppliedAccessGrant string `protobuf:"bytes,2,opt,name=applied_access_grant,json=appliedAccessGrant,proto3" json:"applied_access_grant,omitempty"`
	// Set when the export was sent to an export destination: the absolute
	// location of the folder or key prefix created for this export, for example
	// https://… for SharePoint or s3://bucket/prefix for S3. content is then empty.
	Uri           string `protobuf:"bytes,3,opt,name=uri,proto3" json:"uri,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *ExportResponse) Reset() {
	*x = ExportResponse{}
	mi := &file_v1_sql_service_proto_msgTypes[11]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *ExportResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ExportResponse) ProtoMessage() {}

func (x *ExportResponse) ProtoReflect() protoreflect.Message {
	mi := &file_v1_sql_service_proto_msgTypes[11]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ExportResponse.ProtoReflect.Descriptor instead.
func (*ExportResponse) Descriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{11}
}

func (x *ExportResponse) GetContent() []byte {
	if x != nil {
		return x.Content
	}
	return nil
}

func (x *ExportResponse) GetAppliedAccessGrant() string {
	if x != nil {
		return x.AppliedAccessGrant
	}
	return ""
}

func (x *ExportResponse) GetUri() string {
	if x != nil {
		return x.Uri
	}
	return ""
}

// refer https://www.postgresql.org/docs/11/protocol-error-fields.html
// for field description.
type QueryResult_PostgresError struct {
	state            protoimpl.MessageState `protogen:"open.v1"`
	Severity         string                 `protobuf:"bytes,1,opt,name=severity,proto3" json:"severity,omitempty"`
	Code             string                 `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
	Message          string                 `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	Detail           string                 `protobuf:"bytes,4,opt,name=detail,proto3" json:"detail,omitempty"`
	Hint             string                 `protobuf:"bytes,5,opt,name=hint,proto3" json:"hint,omitempty"`
	Position         int32                  `protobuf:"varint,6,opt,name=position,proto3" json:"position,omitempty"`
	InternalPosition int32                  `protobuf:"varint,7,opt,name=internal_position,json=internalPosition,proto3" json:"internal_position,omitempty"`
	InternalQuery    string                 `protobuf:"bytes,8,opt,name=internal_query,json=internalQuery,proto3" json:"internal_query,omitempty"`
	Where            string                 `protobuf:"bytes,9,opt,name=where,proto3" json:"where,omitempty"`
	SchemaName       string                 `protobuf:"bytes,10,opt,name=schema_name,json=schemaName,proto3" json:"schema_name,omitempty"`
	TableName        string                 `protobuf:"bytes,11,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"`
	ColumnName       string                 `protobuf:"bytes,12,opt,name=column_name,json=columnName,proto3" json:"column_name,omitempty"`
	DataTypeName     string                 `protobuf:"bytes,13,opt,name=data_type_name,json=dataTypeName,proto3" json:"data_type_name,omitempty"`
	ConstraintName   string                 `protobuf:"bytes,14,opt,name=constraint_name,json=constraintName,proto3" json:"constraint_name,omitempty"`
	File             string                 `protobuf:"bytes,15,opt,name=file,proto3" json:"file,omitempty"`
	Line             int32                  `protobuf:"varint,16,opt,name=line,proto3" json:"line,omitempty"`
	Routine          string                 `protobuf:"bytes,17,opt,name=routine,proto3" json:"routine,omitempty"`
	unknownFields    protoimpl.UnknownFields
	sizeCache        protoimpl.SizeCache
}

func (x *QueryResult_PostgresError) Reset() {
	*x = QueryResult_PostgresError{}
	mi := &file_v1_sql_service_proto_msgTypes[12]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *QueryResult_PostgresError) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*QueryResult_PostgresError) ProtoMessage() {}

func (x *QueryResult_PostgresError) ProtoReflect() protoreflect.Message {
	mi := &file_v1_sql_service_proto_msgTypes[12]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use QueryResult_PostgresError.ProtoReflect.Descriptor instead.
func (*QueryResult_PostgresError) Descriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{5, 0}
}

func (x *QueryResult_PostgresError) GetSeverity() string {
	if x != nil {
		return x.Severity
	}
	return ""
}

func (x *QueryResult_PostgresError) GetCode() string {
	if x != nil {
		return x.Code
	}
	return ""
}

func (x *QueryResult_PostgresError) GetMessage() string {
	if x != nil {
		return x.Message
	}
	return ""
}

func (x *QueryResult_PostgresError) GetDetail() string {
	if x != nil {
		return x.Detail
	}
	return ""
}

func (x *QueryResult_PostgresError) GetHint() string {
	if x != nil {
		return x.Hint
	}
	return ""
}

func (x *QueryResult_PostgresError) GetPosition() int32 {
	if x != nil {
		return x.Position
	}
	return 0
}

func (x *QueryResult_PostgresError) GetInternalPosition() int32 {
	if x != nil {
		return x.InternalPosition
	}
	return 0
}

func (x *QueryResult_PostgresError) GetInternalQuery() string {
	if x != nil {
		return x.InternalQuery
	}
	return ""
}

func (x *QueryResult_PostgresError) GetWhere() string {
	if x != nil {
		return x.Where
	}
	return ""
}

func (x *QueryResult_PostgresError) GetSchemaName() string {
	if x != nil {
		return x.SchemaName
	}
	return ""
}

func (x *QueryResult_PostgresError) GetTableName() string {
	if x != nil {
		return x.TableName
	}
	return ""
}

func (x *QueryResult_PostgresError) GetColumnName() string {
	if x != nil {
		return x.ColumnName
	}
	return ""
}

func (x *QueryResult_PostgresError) GetDataTypeName() string {
	if x != nil {
		return x.DataTypeName
	}
	return ""
}

func (x *QueryResult_PostgresError) GetConstraintName() string {
	if x != nil {
		return x.ConstraintName
	}
	return ""
}

func (x *QueryResult_PostgresError) GetFile() string {
	if x != nil {
		return x.File
	}
	return ""
}

func (x *QueryResult_PostgresError) GetLine() int32 {
	if x != nil {
		return x.Line
	}
	return 0
}

func (x *QueryResult_PostgresError) GetRoutine() string {
	if x != nil {
		return x.Routine
	}
	return ""
}

// Syntax error with position information for editor highlighting
type QueryResult_SyntaxError struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Position information for highlighting in editor
	StartPosition *Position `protobuf:"bytes,1,opt,name=start_position,json=startPosition,proto3" json:"start_position,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *QueryResult_SyntaxError) Reset() {
	*x = QueryResult_SyntaxError{}
	mi := &file_v1_sql_service_proto_msgTypes[13]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *QueryResult_SyntaxError) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*QueryResult_SyntaxError) ProtoMessage() {}

func (x *QueryResult_SyntaxError) ProtoReflect() protoreflect.Message {
	mi := &file_v1_sql_service_proto_msgTypes[13]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use QueryResult_SyntaxError.ProtoReflect.Descriptor instead.
func (*QueryResult_SyntaxError) Descriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{5, 1}
}

func (x *QueryResult_SyntaxError) GetStartPosition() *Position {
	if x != nil {
		return x.StartPosition
	}
	return nil
}

// Permission denied with resource information or disallowed command_type.
// Either resources or command_type is available.
type QueryResult_CommandError struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Disallowed command_type.
	CommandType   QueryResult_CommandError_Type `protobuf:"varint,1,opt,name=command_type,json=commandType,proto3,enum=bytebase.v1.QueryResult_CommandError_Type" json:"command_type,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *QueryResult_CommandError) Reset() {
	*x = QueryResult_CommandError{}
	mi := &file_v1_sql_service_proto_msgTypes[14]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *QueryResult_CommandError) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*QueryResult_CommandError) ProtoMessage() {}

func (x *QueryResult_CommandError) ProtoReflect() protoreflect.Message {
	mi := &file_v1_sql_service_proto_msgTypes[14]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use QueryResult_CommandError.ProtoReflect.Descriptor instead.
func (*QueryResult_CommandError) Descriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{5, 2}
}

func (x *QueryResult_CommandError) GetCommandType() QueryResult_CommandError_Type {
	if x != nil {
		return x.CommandType
	}
	return QueryResult_CommandError_TYPE_UNSPECIFIED
}

type QueryResult_Message struct {
	state         protoimpl.MessageState    `protogen:"open.v1"`
	Level         QueryResult_Message_Level `protobuf:"varint,1,opt,name=level,proto3,enum=bytebase.v1.QueryResult_Message_Level" json:"level,omitempty"`
	Content       string                    `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *QueryResult_Message) Reset() {
	*x = QueryResult_Message{}
	mi := &file_v1_sql_service_proto_msgTypes[15]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *QueryResult_Message) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*QueryResult_Message) ProtoMessage() {}

func (x *QueryResult_Message) ProtoReflect() protoreflect.Message {
	mi := &file_v1_sql_service_proto_msgTypes[15]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use QueryResult_Message.ProtoReflect.Descriptor instead.
func (*QueryResult_Message) Descriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{5, 3}
}

func (x *QueryResult_Message) GetLevel() QueryResult_Message_Level {
	if x != nil {
		return x.Level
	}
	return QueryResult_Message_LEVEL_UNSPECIFIED
}

func (x *QueryResult_Message) GetContent() string {
	if x != nil {
		return x.Content
	}
	return ""
}

// A query plan the result carries: in its rows, or beside them.
type QueryResult_QueryPlan struct {
	state  protoimpl.MessageState    `protogen:"open.v1"`
	Format QueryOption_ExplainFormat `protobuf:"varint,1,opt,name=format,proto3,enum=bytebase.v1.QueryOption_ExplainFormat" json:"format,omitempty"`
	// Whether producing the plan executed the statement, as EXPLAIN ANALYZE
	// does.
	Executed bool `protobuf:"varint,2,opt,name=executed,proto3" json:"executed,omitempty"`
	// The plan itself, where the engine states it beside the result rather
	// than in the result's rows. BigQuery reports the stages its job ran in
	// the job's own statistics, so one result carries the query's data and
	// the plan of the run that produced it. Empty when the plan is the rows,
	// which is every other engine. Omitted from the audit log, as the rows
	// are: the statement is what an audit reads.
	Content       string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *QueryResult_QueryPlan) Reset() {
	*x = QueryResult_QueryPlan{}
	mi := &file_v1_sql_service_proto_msgTypes[16]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *QueryResult_QueryPlan) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*QueryResult_QueryPlan) ProtoMessage() {}

func (x *QueryResult_QueryPlan) ProtoReflect() protoreflect.Message {
	mi := &file_v1_sql_service_proto_msgTypes[16]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use QueryResult_QueryPlan.ProtoReflect.Descriptor instead.
func (*QueryResult_QueryPlan) Descriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{5, 4}
}

func (x *QueryResult_QueryPlan) GetFormat() QueryOption_ExplainFormat {
	if x != nil {
		return x.Format
	}
	return QueryOption_EXPLAIN_FORMAT_UNSPECIFIED
}

func (x *QueryResult_QueryPlan) GetExecuted() bool {
	if x != nil {
		return x.Executed
	}
	return false
}

func (x *QueryResult_QueryPlan) GetContent() string {
	if x != nil {
		return x.Content
	}
	return ""
}

type RowValue_Timestamp struct {
	state           protoimpl.MessageState `protogen:"open.v1"`
	GoogleTimestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=google_timestamp,json=googleTimestamp,proto3" json:"google_timestamp,omitempty"`
	// The accuracy is the number of digits after the decimal point.
	Accuracy      int32 `protobuf:"varint,2,opt,name=accuracy,proto3" json:"accuracy,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *RowValue_Timestamp) Reset() {
	*x = RowValue_Timestamp{}
	mi := &file_v1_sql_service_proto_msgTypes[17]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *RowValue_Timestamp) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*RowValue_Timestamp) ProtoMessage() {}

func (x *RowValue_Timestamp) ProtoReflect() protoreflect.Message {
	mi := &file_v1_sql_service_proto_msgTypes[17]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use RowValue_Timestamp.ProtoReflect.Descriptor instead.
func (*RowValue_Timestamp) Descriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{8, 0}
}

func (x *RowValue_Timestamp) GetGoogleTimestamp() *timestamppb.Timestamp {
	if x != nil {
		return x.GoogleTimestamp
	}
	return nil
}

func (x *RowValue_Timestamp) GetAccuracy() int32 {
	if x != nil {
		return x.Accuracy
	}
	return 0
}

type RowValue_TimestampTZ struct {
	state           protoimpl.MessageState `protogen:"open.v1"`
	GoogleTimestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=google_timestamp,json=googleTimestamp,proto3" json:"google_timestamp,omitempty"`
	// Zone is the time zone abbreviations in timezone database such as "PDT",
	// "PST". https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We
	// retrieve the time zone information from the timestamptz field in the
	// database. A timestamp is in UTC or epoch time, and with zone info, we can
	// convert it to a local time string. Zone and offset are returned by
	// time.Time.Zone()
	Zone string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"`
	// The offset is in seconds east of UTC
	Offset        int32 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
	Accuracy      int32 `protobuf:"varint,4,opt,name=accuracy,proto3" json:"accuracy,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *RowValue_TimestampTZ) Reset() {
	*x = RowValue_TimestampTZ{}
	mi := &file_v1_sql_service_proto_msgTypes[18]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *RowValue_TimestampTZ) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*RowValue_TimestampTZ) ProtoMessage() {}

func (x *RowValue_TimestampTZ) ProtoReflect() protoreflect.Message {
	mi := &file_v1_sql_service_proto_msgTypes[18]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use RowValue_TimestampTZ.ProtoReflect.Descriptor instead.
func (*RowValue_TimestampTZ) Descriptor() ([]byte, []int) {
	return file_v1_sql_service_proto_rawDescGZIP(), []int{8, 1}
}

func (x *RowValue_TimestampTZ) GetGoogleTimestamp() *timestamppb.Timestamp {
	if x != nil {
		return x.GoogleTimestamp
	}
	return nil
}

func (x *RowValue_TimestampTZ) GetZone() string {
	if x != nil {
		return x.Zone
	}
	return ""
}

func (x *RowValue_TimestampTZ) GetOffset() int32 {
	if x != nil {
		return x.Offset
	}
	return 0
}

func (x *RowValue_TimestampTZ) GetAccuracy() int32 {
	if x != nil {
		return x.Accuracy
	}
	return 0
}

var File_v1_sql_service_proto protoreflect.FileDescriptor

const file_v1_sql_service_proto_rawDesc = "" +
	"\n" +
	"\x14v1/sql_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\x1a\x0fv1/common.proto\x1a\x1ev1/query_history_service.proto\"\xd5\x01\n" +
	"\x13AdminExecuteRequest\x121\n" +
	"\x04name\x18\x01 \x01(\tB\x1d\xe0A\x02\xfaA\x17\n" +
	"\x15bytebase.com/DatabaseR\x04name\x12\x1c\n" +
	"\tstatement\x18\x02 \x01(\tR\tstatement\x12\x14\n" +
	"\x05limit\x18\x03 \x01(\x05R\x05limit\x12\x1b\n" +
	"\x06schema\x18\x04 \x01(\tH\x00R\x06schema\x88\x01\x01\x12!\n" +
	"\tcontainer\x18\x05 \x01(\tH\x01R\tcontainer\x88\x01\x01B\t\n" +
	"\a_schemaB\f\n" +
	"\n" +
	"_container\"J\n" +
	"\x14AdminExecuteResponse\x122\n" +
	"\aresults\x18\x01 \x03(\v2\x18.bytebase.v1.QueryResultR\aresults\"\xcb\x02\n" +
	"\fQueryRequest\x121\n" +
	"\x04name\x18\x01 \x01(\tB\x1d\xe0A\x02\xfaA\x17\n" +
	"\x15bytebase.com/DatabaseR\x04name\x12\x1c\n" +
	"\tstatement\x18\x02 \x01(\tR\tstatement\x12\x14\n" +
	"\x05limit\x18\x03 \x01(\x05R\x05limit\x12$\n" +
	"\x0edata_source_id\x18\x04 \x01(\tR\fdataSourceId\x12\x18\n" +
	"\aexplain\x18\x05 \x01(\bR\aexplain\x12\x1b\n" +
	"\x06schema\x18\x06 \x01(\tH\x00R\x06schema\x88\x01\x01\x12;\n" +
	"\fquery_option\x18\a \x01(\v2\x18.bytebase.v1.QueryOptionR\vqueryOption\x12!\n" +
	"\tcontainer\x18\b \x01(\tH\x01R\tcontainer\x88\x01\x01B\t\n" +
	"\a_schemaB\f\n" +
	"\n" +
	"_container\"u\n" +
	"\rQueryResponse\x122\n" +
	"\aresults\x18\x01 \x03(\v2\x18.bytebase.v1.QueryResultR\aresults\x120\n" +
	"\x14applied_access_grant\x18\x02 \x01(\tR\x12appliedAccessGrant\"\x8d\x03\n" +
	"\vQueryOption\x12^\n" +
	"\x15redis_run_commands_on\x18\x01 \x01(\x0e2+.bytebase.v1.QueryOption.RedisRunCommandsOnR\x12redisRunCommandsOn\x12M\n" +
	"\x0eexplain_format\x18\x03 \x01(\x0e2&.bytebase.v1.QueryOption.ExplainFormatR\rexplainFormat\"[\n" +
	"\x12RedisRunCommandsOn\x12%\n" +
	"!REDIS_RUN_COMMANDS_ON_UNSPECIFIED\x10\x00\x12\x0f\n" +
	"\vSINGLE_NODE\x10\x01\x12\r\n" +
	"\tALL_NODES\x10\x02\"V\n" +
	"\rExplainFormat\x12\x1e\n" +
	"\x1aEXPLAIN_FORMAT_UNSPECIFIED\x10\x00\x12\b\n" +
	"\x04TEXT\x10\x01\x12\b\n" +
	"\x04JSON\x10\x02\x12\a\n" +
	"\x03XML\x10\x03\x12\b\n" +
	"\x04YAML\x10\x04J\x04\b\x02\x10\x03R\x14mssql_explain_format\"\xe4\x0e\n" +
	"\vQueryResult\x12!\n" +
	"\fcolumn_names\x18\x01 \x03(\tR\vcolumnNames\x12*\n" +
	"\x11column_type_names\x18\x02 \x03(\tR\x0fcolumnTypeNames\x12/\n" +
	"\x04rows\x18\x03 \x03(\v2\x15.bytebase.v1.QueryRowB\x04\xd0\xea0\x02R\x04rows\x12\x1d\n" +
	"\n" +
	"rows_count\x18\x04 \x01(\x03R\trowsCount\x12\x14\n" +
	"\x05error\x18\x05 \x01(\tR\x05error\x123\n" +
	"\alatency\x18\x06 \x01(\v2\x19.google.protobuf.DurationR\alatency\x12\x1c\n" +
	"\tstatement\x18\a \x01(\tR\tstatement\x12O\n" +
	"\x0epostgres_error\x18\b \x01(\v2&.bytebase.v1.QueryResult.PostgresErrorH\x00R\rpostgresError\x12I\n" +
	"\fsyntax_error\x18\t \x01(\v2$.bytebase.v1.QueryResult.SyntaxErrorH\x00R\vsyntaxError\x12R\n" +
	"\x11permission_denied\x18\n" +
	" \x01(\v2#.bytebase.v1.PermissionDeniedDetailH\x00R\x10permissionDenied\x12L\n" +
	"\rcommand_error\x18\r \x01(\v2%.bytebase.v1.QueryResult.CommandErrorH\x00R\fcommandError\x12B\n" +
	"\bmessages\x18\v \x03(\v2 .bytebase.v1.QueryResult.MessageB\x04\xd0\xea0\x02R\bmessages\x122\n" +
	"\x06masked\x18\f \x03(\v2\x1a.bytebase.v1.MaskingReasonR\x06masked\x12A\n" +
	"\n" +
	"query_plan\x18\x0e \x01(\v2\".bytebase.v1.QueryResult.QueryPlanR\tqueryPlan\x1a\xfd\x03\n" +
	"\rPostgresError\x12\x1a\n" +
	"\bseverity\x18\x01 \x01(\tR\bseverity\x12\x12\n" +
	"\x04code\x18\x02 \x01(\tR\x04code\x12\x18\n" +
	"\amessage\x18\x03 \x01(\tR\amessage\x12\x16\n" +
	"\x06detail\x18\x04 \x01(\tR\x06detail\x12\x12\n" +
	"\x04hint\x18\x05 \x01(\tR\x04hint\x12\x1a\n" +
	"\bposition\x18\x06 \x01(\x05R\bposition\x12+\n" +
	"\x11internal_position\x18\a \x01(\x05R\x10internalPosition\x12%\n" +
	"\x0einternal_query\x18\b \x01(\tR\rinternalQuery\x12\x14\n" +
	"\x05where\x18\t \x01(\tR\x05where\x12\x1f\n" +
	"\vschema_name\x18\n" +
	" \x01(\tR\n" +
	"schemaName\x12\x1d\n" +
	"\n" +
	"table_name\x18\v \x01(\tR\ttableName\x12\x1f\n" +
	"\vcolumn_name\x18\f \x01(\tR\n" +
	"columnName\x12$\n" +
	"\x0edata_type_name\x18\r \x01(\tR\fdataTypeName\x12'\n" +
	"\x0fconstraint_name\x18\x0e \x01(\tR\x0econstraintName\x12\x12\n" +
	"\x04file\x18\x0f \x01(\tR\x04file\x12\x12\n" +
	"\x04line\x18\x10 \x01(\x05R\x04line\x12\x18\n" +
	"\aroutine\x18\x11 \x01(\tR\aroutine\x1aK\n" +
	"\vSyntaxError\x12<\n" +
	"\x0estart_position\x18\x01 \x01(\v2\x15.bytebase.v1.PositionR\rstartPosition\x1a\xa0\x01\n" +
	"\fCommandError\x12M\n" +
	"\fcommand_type\x18\x01 \x01(\x0e2*.bytebase.v1.QueryResult.CommandError.TypeR\vcommandType\"A\n" +
	"\x04Type\x12\x14\n" +
	"\x10TYPE_UNSPECIFIED\x10\x00\x12\a\n" +
	"\x03DDL\x10\x01\x12\a\n" +
	"\x03DML\x10\x02\x12\x11\n" +
	"\rNON_READ_ONLY\x10\x03\x1a\xc7\x01\n" +
	"\aMessage\x12<\n" +
	"\x05level\x18\x01 \x01(\x0e2&.bytebase.v1.QueryResult.Message.LevelR\x05level\x12\x18\n" +
	"\acontent\x18\x02 \x01(\tR\acontent\"d\n" +
	"\x05Level\x12\x15\n" +
	"\x11LEVEL_UNSPECIFIED\x10\x00\x12\b\n" +
	"\x04INFO\x10\x01\x12\v\n" +
	"\aWARNING\x10\x02\x12\t\n" +
	"\x05DEBUG\x10\x03\x12\a\n" +
	"\x03LOG\x10\x04\x12\n" +
	"\n" +
	"\x06NOTICE\x10\x05\x12\r\n" +
	"\tEXCEPTION\x10\x06\x1a\x87\x01\n" +
	"\tQueryPlan\x12>\n" +
	"\x06format\x18\x01 \x01(\x0e2&.bytebase.v1.QueryOption.ExplainFormatR\x06format\x12\x1a\n" +
	"\bexecuted\x18\x02 \x01(\bR\bexecuted\x12\x1e\n" +
	"\acontent\x18\x03 \x01(\tB\x04\xd0\xea0\x02R\acontentB\x10\n" +
	"\x0edetailed_error\"\xb0\x02\n" +
	"\rMaskingReason\x12(\n" +
	"\x10semantic_type_id\x18\x01 \x01(\tR\x0esemanticTypeId\x12.\n" +
	"\x13semantic_type_title\x18\x02 \x01(\tR\x11semanticTypeTitle\x12&\n" +
	"\x0fmasking_rule_id\x18\x03 \x01(\tR\rmaskingRuleId\x12\x1c\n" +
	"\talgorithm\x18\x04 \x01(\tR\talgorithm\x12\x18\n" +
	"\acontext\x18\x05 \x01(\tR\acontext\x121\n" +
	"\x14classification_level\x18\x06 \x01(\x05R\x13classificationLevel\x122\n" +
	"\x12semantic_type_icon\x18\a \x01(\tB\x04\xd0\xea0\x02R\x10semanticTypeIcon\"9\n" +
	"\bQueryRow\x12-\n" +
	"\x06values\x18\x01 \x03(\v2\x15.bytebase.v1.RowValueR\x06values\"\xf9\x06\n" +
	"\bRowValue\x12;\n" +
	"\n" +
	"null_value\x18\x01 \x01(\x0e2\x1a.google.protobuf.NullValueH\x00R\tnullValue\x12\x1f\n" +
	"\n" +
	"bool_value\x18\x02 \x01(\bH\x00R\tboolValue\x12!\n" +
	"\vbytes_value\x18\x03 \x01(\fH\x00R\n" +
	"bytesValue\x12#\n" +
	"\fdouble_value\x18\x04 \x01(\x01H\x00R\vdoubleValue\x12!\n" +
	"\vfloat_value\x18\x05 \x01(\x02H\x00R\n" +
	"floatValue\x12!\n" +
	"\vint32_value\x18\x06 \x01(\x05H\x00R\n" +
	"int32Value\x12!\n" +
	"\vint64_value\x18\a \x01(\x03H\x00R\n" +
	"int64Value\x12#\n" +
	"\fstring_value\x18\b \x01(\tH\x00R\vstringValue\x12#\n" +
	"\fuint32_value\x18\t \x01(\rH\x00R\vuint32Value\x12#\n" +
	"\fuint64_value\x18\n" +
	" \x01(\x04H\x00R\vuint64Value\x129\n" +
	"\vvalue_value\x18\v \x01(\v2\x16.google.protobuf.ValueH\x00R\n" +
	"valueValue\x12J\n" +
	"\x0ftimestamp_value\x18\f \x01(\v2\x1f.bytebase.v1.RowValue.TimestampH\x00R\x0etimestampValue\x12Q\n" +
	"\x12timestamp_tz_value\x18\r \x01(\v2!.bytebase.v1.RowValue.TimestampTZH\x00R\x10timestampTzValue\x1an\n" +
	"\tTimestamp\x12E\n" +
	"\x10google_timestamp\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x0fgoogleTimestamp\x12\x1a\n" +
	"\baccuracy\x18\x02 \x01(\x05R\baccuracy\x1a\x9c\x01\n" +
	"\vTimestampTZ\x12E\n" +
	"\x10google_timestamp\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x0fgoogleTimestamp\x12\x12\n" +
	"\x04zone\x18\x02 \x01(\tR\x04zone\x12\x16\n" +
	"\x06offset\x18\x03 \x01(\x05R\x06offset\x12\x1a\n" +
	"\baccuracy\x18\x04 \x01(\x05R\baccuracyB\x06\n" +
	"\x04kind\"\xc7\x03\n" +
	"\x06Advice\x121\n" +
	"\x06status\x18\x01 \x01(\x0e2\x19.bytebase.v1.Advice.LevelR\x06status\x12\x12\n" +
	"\x04code\x18\x02 \x01(\x05R\x04code\x12\x14\n" +
	"\x05title\x18\x03 \x01(\tR\x05title\x12\x18\n" +
	"\acontent\x18\x04 \x01(\tR\acontent\x12<\n" +
	"\x0estart_position\x18\x05 \x01(\v2\x15.bytebase.v1.PositionR\rstartPosition\x128\n" +
	"\fend_position\x18\x06 \x01(\v2\x15.bytebase.v1.PositionR\vendPosition\x129\n" +
	"\trule_type\x18\a \x01(\x0e2\x1c.bytebase.v1.Advice.RuleTypeR\bruleType\"J\n" +
	"\x05Level\x12\x1c\n" +
	"\x18ADVICE_LEVEL_UNSPECIFIED\x10\x00\x12\v\n" +
	"\aSUCCESS\x10\x01\x12\v\n" +
	"\aWARNING\x10\x02\x12\t\n" +
	"\x05ERROR\x10\x03\"G\n" +
	"\bRuleType\x12\x19\n" +
	"\x15RULE_TYPE_UNSPECIFIED\x10\x00\x12\x10\n" +
	"\fPARSER_BASED\x10\x01\x12\x0e\n" +
	"\n" +
	"AI_POWERED\x10\x02\"\xa2\x03\n" +
	"\rExportRequest\x121\n" +
	"\x04name\x18\x01 \x01(\tB\x1d\xe0A\x02\xfaA\x17\n" +
	"\x15bytebase.com/DatabaseR\x04name\x12\x1c\n" +
	"\tstatement\x18\x02 \x01(\tR\tstatement\x12\x14\n" +
	"\x05limit\x18\x03 \x01(\x05R\x05limit\x121\n" +
	"\x06format\x18\x04 \x01(\x0e2\x19.bytebase.v1.ExportFormatR\x06format\x12\x14\n" +
	"\x05admin\x18\x05 \x01(\bR\x05admin\x12 \n" +
	"\bpassword\x18\x06 \x01(\tB\x04\xd0\xea0\x01R\bpassword\x12$\n" +
	"\x0edata_source_id\x18\a \x01(\tR\fdataSourceId\x12\x1b\n" +
	"\x06schema\x18\b \x01(\tH\x00R\x06schema\x88\x01\x01\x12!\n" +
	"\tcontainer\x18\t \x01(\tH\x01R\tcontainer\x88\x01\x01\x12@\n" +
	"\vdestination\x18\n" +
	" \x01(\x0e2\x1e.bytebase.v1.ExportDestinationR\vdestinationB\t\n" +
	"\a_schemaB\f\n" +
	"\n" +
	"_container\"t\n" +
	"\x0eExportResponse\x12\x1e\n" +
	"\acontent\x18\x01 \x01(\fB\x04\xd0\xea0\x02R\acontent\x120\n" +
	"\x14applied_access_grant\x18\x02 \x01(\tR\x12appliedAccessGrant\x12\x10\n" +
	"\x03uri\x18\x03 \x01(\tR\x03uri2\xb4\a\n" +
	"\n" +
	"SQLService\x12\xce\x01\n" +
	"\x05Query\x12\x19.bytebase.v1.QueryRequest\x1a\x1a.bytebase.v1.QueryResponse\"\x8d\x01\x8a\xea0\x10bb.databases.get\x90\xea0\x01\x98\xea0\x01\xa0\xea0\x01\x82\xd3\xe4\x93\x02g:\x01*Z8:\x01*\"3/v1/{name=projects/*/instances/*/databases/*}:query\"(/v1/{name=instances/*/databases/*}:query\x12\x91\x01\n" +
	"\fAdminExecute\x12 .bytebase.v1.AdminExecuteRequest\x1a!.bytebase.v1.AdminExecuteResponse\"8\x8a\xea0\fbb.sql.admin\x90\xea0\x01\x98\xea0\x01\xa0\xea0\x04\xa8\xea0\v\x82\xd3\xe4\x93\x02\x12\x12\x10/v1:adminExecute(\x010\x01\x12x\n" +
	"\x14SearchQueryHistories\x12(.bytebase.v1.SearchQueryHistoriesRequest\x1a).bytebase.v1.SearchQueryHistoriesResponse\"\v\x90\xea0\x02\xa0\xea0\x01\x88\x02\x01\x12\x90\x01\n" +
	"\x12ListQueryHistories\x12&.bytebase.v1.ListQueryHistoriesRequest\x1a'.bytebase.v1.ListQueryHistoriesResponse\")\x8a\xea0\x16bb.queryHistories.list\x90\xea0\x01\xa0\xea0\x04\xa8\xea0\n" +
	"\x88\x02\x01\x12^\n" +
	"\x0fGetQueryHistory\x12#.bytebase.v1.GetQueryHistoryRequest\x1a\x19.bytebase.v1.QueryHistory\"\v\x90\xea0\x02\xa0\xea0\x01\x88\x02\x01\x12\xd3\x01\n" +
	"\x06Export\x12\x1a.bytebase.v1.ExportRequest\x1a\x1b.bytebase.v1.ExportResponse\"\x8f\x01\x8a\xea0\x10bb.databases.get\x90\xea0\x01\x98\xea0\x01\xa0\xea0\x02\x82\xd3\xe4\x93\x02i:\x01*Z9:\x01*\"4/v1/{name=projects/*/instances/*/databases/*}:export\")/v1/{name=instances/*/databases/*}:exportB\xa5\x01\n" +
	"\x0fcom.bytebase.v1B\x0fSqlServiceProtoP\x01Z4github.com/bytebase/bytebase/backend/generated-go/v1\xa2\x02\x03BXX\xaa\x02\vBytebase.V1\xca\x02\vBytebase\\V1\xe2\x02\x17Bytebase\\V1\\GPBMetadata\xea\x02\fBytebase::V1b\x06proto3"

var (
	file_v1_sql_service_proto_rawDescOnce sync.Once
	file_v1_sql_service_proto_rawDescData []byte
)

func file_v1_sql_service_proto_rawDescGZIP() []byte {
	file_v1_sql_service_proto_rawDescOnce.Do(func() {
		file_v1_sql_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_v1_sql_service_proto_rawDesc), len(file_v1_sql_service_proto_rawDesc)))
	})
	return file_v1_sql_service_proto_rawDescData
}

var file_v1_sql_service_proto_enumTypes = make([]protoimpl.EnumInfo, 6)
var file_v1_sql_service_proto_msgTypes = make([]protoimpl.MessageInfo, 19)
var file_v1_sql_service_proto_goTypes = []any{
	(QueryOption_RedisRunCommandsOn)(0),  // 0: bytebase.v1.QueryOption.RedisRunCommandsOn
	(QueryOption_ExplainFormat)(0),       // 1: bytebase.v1.QueryOption.ExplainFormat
	(QueryResult_CommandError_Type)(0),   // 2: bytebase.v1.QueryResult.CommandError.Type
	(QueryResult_Message_Level)(0),       // 3: bytebase.v1.QueryResult.Message.Level
	(Advice_Level)(0),                    // 4: bytebase.v1.Advice.Level
	(Advice_RuleType)(0),                 // 5: bytebase.v1.Advice.RuleType
	(*AdminExecuteRequest)(nil),          // 6: bytebase.v1.AdminExecuteRequest
	(*AdminExecuteResponse)(nil),         // 7: bytebase.v1.AdminExecuteResponse
	(*QueryRequest)(nil),                 // 8: bytebase.v1.QueryRequest
	(*QueryResponse)(nil),                // 9: bytebase.v1.QueryResponse
	(*QueryOption)(nil),                  // 10: bytebase.v1.QueryOption
	(*QueryResult)(nil),                  // 11: bytebase.v1.QueryResult
	(*MaskingReason)(nil),                // 12: bytebase.v1.MaskingReason
	(*QueryRow)(nil),                     // 13: bytebase.v1.QueryRow
	(*RowValue)(nil),                     // 14: bytebase.v1.RowValue
	(*Advice)(nil),                       // 15: bytebase.v1.Advice
	(*ExportRequest)(nil),                // 16: bytebase.v1.ExportRequest
	(*ExportResponse)(nil),               // 17: bytebase.v1.ExportResponse
	(*QueryResult_PostgresError)(nil),    // 18: bytebase.v1.QueryResult.PostgresError
	(*QueryResult_SyntaxError)(nil),      // 19: bytebase.v1.QueryResult.SyntaxError
	(*QueryResult_CommandError)(nil),     // 20: bytebase.v1.QueryResult.CommandError
	(*QueryResult_Message)(nil),          // 21: bytebase.v1.QueryResult.Message
	(*QueryResult_QueryPlan)(nil),        // 22: bytebase.v1.QueryResult.QueryPlan
	(*RowValue_Timestamp)(nil),           // 23: bytebase.v1.RowValue.Timestamp
	(*RowValue_TimestampTZ)(nil),         // 24: bytebase.v1.RowValue.TimestampTZ
	(*durationpb.Duration)(nil),          // 25: google.protobuf.Duration
	(*PermissionDeniedDetail)(nil),       // 26: bytebase.v1.PermissionDeniedDetail
	(structpb.NullValue)(0),              // 27: google.protobuf.NullValue
	(*structpb.Value)(nil),               // 28: google.protobuf.Value
	(*Position)(nil),                     // 29: bytebase.v1.Position
	(ExportFormat)(0),                    // 30: bytebase.v1.ExportFormat
	(ExportDestination)(0),               // 31: bytebase.v1.ExportDestination
	(*timestamppb.Timestamp)(nil),        // 32: google.protobuf.Timestamp
	(*SearchQueryHistoriesRequest)(nil),  // 33: bytebase.v1.SearchQueryHistoriesRequest
	(*ListQueryHistoriesRequest)(nil),    // 34: bytebase.v1.ListQueryHistoriesRequest
	(*GetQueryHistoryRequest)(nil),       // 35: bytebase.v1.GetQueryHistoryRequest
	(*SearchQueryHistoriesResponse)(nil), // 36: bytebase.v1.SearchQueryHistoriesResponse
	(*ListQueryHistoriesResponse)(nil),   // 37: bytebase.v1.ListQueryHistoriesResponse
	(*QueryHistory)(nil),                 // 38: bytebase.v1.QueryHistory
}
var file_v1_sql_service_proto_depIdxs = []int32{
	11, // 0: bytebase.v1.AdminExecuteResponse.results:type_name -> bytebase.v1.QueryResult
	10, // 1: bytebase.v1.QueryRequest.query_option:type_name -> bytebase.v1.QueryOption
	11, // 2: bytebase.v1.QueryResponse.results:type_name -> bytebase.v1.QueryResult
	0,  // 3: bytebase.v1.QueryOption.redis_run_commands_on:type_name -> bytebase.v1.QueryOption.RedisRunCommandsOn
	1,  // 4: bytebase.v1.QueryOption.explain_format:type_name -> bytebase.v1.QueryOption.ExplainFormat
	13, // 5: bytebase.v1.QueryResult.rows:type_name -> bytebase.v1.QueryRow
	25, // 6: bytebase.v1.QueryResult.latency:type_name -> google.protobuf.Duration
	18, // 7: bytebase.v1.QueryResult.postgres_error:type_name -> bytebase.v1.QueryResult.PostgresError
	19, // 8: bytebase.v1.QueryResult.syntax_error:type_name -> bytebase.v1.QueryResult.SyntaxError
	26, // 9: bytebase.v1.QueryResult.permission_denied:type_name -> bytebase.v1.PermissionDeniedDetail
	20, // 10: bytebase.v1.QueryResult.command_error:type_name -> bytebase.v1.QueryResult.CommandError
	21, // 11: bytebase.v1.QueryResult.messages:type_name -> bytebase.v1.QueryResult.Message
	12, // 12: bytebase.v1.QueryResult.masked:type_name -> bytebase.v1.MaskingReason
	22, // 13: bytebase.v1.QueryResult.query_plan:type_name -> bytebase.v1.QueryResult.QueryPlan
	14, // 14: bytebase.v1.QueryRow.values:type_name -> bytebase.v1.RowValue
	27, // 15: bytebase.v1.RowValue.null_value:type_name -> google.protobuf.NullValue
	28, // 16: bytebase.v1.RowValue.value_value:type_name -> google.protobuf.Value
	23, // 17: bytebase.v1.RowValue.timestamp_value:type_name -> bytebase.v1.RowValue.Timestamp
	24, // 18: bytebase.v1.RowValue.timestamp_tz_value:type_name -> bytebase.v1.RowValue.TimestampTZ
	4,  // 19: bytebase.v1.Advice.status:type_name -> bytebase.v1.Advice.Level
	29, // 20: bytebase.v1.Advice.start_position:type_name -> bytebase.v1.Position
	29, // 21: bytebase.v1.Advice.end_position:type_name -> bytebase.v1.Position
	5,  // 22: bytebase.v1.Advice.rule_type:type_name -> bytebase.v1.Advice.RuleType
	30, // 23: bytebase.v1.ExportRequest.format:type_name -> bytebase.v1.ExportFormat
	31, // 24: bytebase.v1.ExportRequest.destination:type_name -> bytebase.v1.ExportDestination
	29, // 25: bytebase.v1.QueryResult.SyntaxError.start_position:type_name -> bytebase.v1.Position
	2,  // 26: bytebase.v1.QueryResult.CommandError.command_type:type_name -> bytebase.v1.QueryResult.CommandError.Type
	3,  // 27: bytebase.v1.QueryResult.Message.level:type_name -> bytebase.v1.QueryResult.Message.Level
	1,  // 28: bytebase.v1.QueryResult.QueryPlan.format:type_name -> bytebase.v1.QueryOption.ExplainFormat
	32, // 29: bytebase.v1.RowValue.Timestamp.google_timestamp:type_name -> google.protobuf.Timestamp
	32, // 30: bytebase.v1.RowValue.TimestampTZ.google_timestamp:type_name -> google.protobuf.Timestamp
	8,  // 31: bytebase.v1.SQLService.Query:input_type -> bytebase.v1.QueryRequest
	6,  // 32: bytebase.v1.SQLService.AdminExecute:input_type -> bytebase.v1.AdminExecuteRequest
	33, // 33: bytebase.v1.SQLService.SearchQueryHistories:input_type -> bytebase.v1.SearchQueryHistoriesRequest
	34, // 34: bytebase.v1.SQLService.ListQueryHistories:input_type -> bytebase.v1.ListQueryHistoriesRequest
	35, // 35: bytebase.v1.SQLService.GetQueryHistory:input_type -> bytebase.v1.GetQueryHistoryRequest
	16, // 36: bytebase.v1.SQLService.Export:input_type -> bytebase.v1.ExportRequest
	9,  // 37: bytebase.v1.SQLService.Query:output_type -> bytebase.v1.QueryResponse
	7,  // 38: bytebase.v1.SQLService.AdminExecute:output_type -> bytebase.v1.AdminExecuteResponse
	36, // 39: bytebase.v1.SQLService.SearchQueryHistories:output_type -> bytebase.v1.SearchQueryHistoriesResponse
	37, // 40: bytebase.v1.SQLService.ListQueryHistories:output_type -> bytebase.v1.ListQueryHistoriesResponse
	38, // 41: bytebase.v1.SQLService.GetQueryHistory:output_type -> bytebase.v1.QueryHistory
	17, // 42: bytebase.v1.SQLService.Export:output_type -> bytebase.v1.ExportResponse
	37, // [37:43] is the sub-list for method output_type
	31, // [31:37] is the sub-list for method input_type
	31, // [31:31] is the sub-list for extension type_name
	31, // [31:31] is the sub-list for extension extendee
	0,  // [0:31] is the sub-list for field type_name
}

func init() { file_v1_sql_service_proto_init() }
func file_v1_sql_service_proto_init() {
	if File_v1_sql_service_proto != nil {
		return
	}
	file_v1_annotation_proto_init()
	file_v1_common_proto_init()
	file_v1_query_history_service_proto_init()
	file_v1_sql_service_proto_msgTypes[0].OneofWrappers = []any{}
	file_v1_sql_service_proto_msgTypes[2].OneofWrappers = []any{}
	file_v1_sql_service_proto_msgTypes[5].OneofWrappers = []any{
		(*QueryResult_PostgresError_)(nil),
		(*QueryResult_SyntaxError_)(nil),
		(*QueryResult_PermissionDenied)(nil),
		(*QueryResult_CommandError_)(nil),
	}
	file_v1_sql_service_proto_msgTypes[8].OneofWrappers = []any{
		(*RowValue_NullValue)(nil),
		(*RowValue_BoolValue)(nil),
		(*RowValue_BytesValue)(nil),
		(*RowValue_DoubleValue)(nil),
		(*RowValue_FloatValue)(nil),
		(*RowValue_Int32Value)(nil),
		(*RowValue_Int64Value)(nil),
		(*RowValue_StringValue)(nil),
		(*RowValue_Uint32Value)(nil),
		(*RowValue_Uint64Value)(nil),
		(*RowValue_ValueValue)(nil),
		(*RowValue_TimestampValue)(nil),
		(*RowValue_TimestampTzValue)(nil),
	}
	file_v1_sql_service_proto_msgTypes[10].OneofWrappers = []any{}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_sql_service_proto_rawDesc), len(file_v1_sql_service_proto_rawDesc)),
			NumEnums:      6,
			NumMessages:   19,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_v1_sql_service_proto_goTypes,
		DependencyIndexes: file_v1_sql_service_proto_depIdxs,
		EnumInfos:         file_v1_sql_service_proto_enumTypes,
		MessageInfos:      file_v1_sql_service_proto_msgTypes,
	}.Build()
	File_v1_sql_service_proto = out.File
	file_v1_sql_service_proto_goTypes = nil
	file_v1_sql_service_proto_depIdxs = nil
}