// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        (unknown)
// source: xyz/block/ftl/query/v1/query.proto

package querypb

import (
	v1 "github.com/block/ftl/backend/protos/xyz/block/ftl/v1"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	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 TransactionStatus int32

const (
	TransactionStatus_TRANSACTION_STATUS_UNSPECIFIED TransactionStatus = 0
	TransactionStatus_TRANSACTION_STATUS_SUCCESS     TransactionStatus = 1
	TransactionStatus_TRANSACTION_STATUS_FAILED      TransactionStatus = 2
)

// Enum value maps for TransactionStatus.
var (
	TransactionStatus_name = map[int32]string{
		0: "TRANSACTION_STATUS_UNSPECIFIED",
		1: "TRANSACTION_STATUS_SUCCESS",
		2: "TRANSACTION_STATUS_FAILED",
	}
	TransactionStatus_value = map[string]int32{
		"TRANSACTION_STATUS_UNSPECIFIED": 0,
		"TRANSACTION_STATUS_SUCCESS":     1,
		"TRANSACTION_STATUS_FAILED":      2,
	}
)

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

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

func (TransactionStatus) Descriptor() protoreflect.EnumDescriptor {
	return file_xyz_block_ftl_query_v1_query_proto_enumTypes[0].Descriptor()
}

func (TransactionStatus) Type() protoreflect.EnumType {
	return &file_xyz_block_ftl_query_v1_query_proto_enumTypes[0]
}

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

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

type CommandType int32

const (
	CommandType_COMMAND_TYPE_UNSPECIFIED CommandType = 0
	CommandType_COMMAND_TYPE_EXEC        CommandType = 1
	CommandType_COMMAND_TYPE_EXECRESULT  CommandType = 2
	CommandType_COMMAND_TYPE_ONE         CommandType = 3
	CommandType_COMMAND_TYPE_MANY        CommandType = 4
)

// Enum value maps for CommandType.
var (
	CommandType_name = map[int32]string{
		0: "COMMAND_TYPE_UNSPECIFIED",
		1: "COMMAND_TYPE_EXEC",
		2: "COMMAND_TYPE_EXECRESULT",
		3: "COMMAND_TYPE_ONE",
		4: "COMMAND_TYPE_MANY",
	}
	CommandType_value = map[string]int32{
		"COMMAND_TYPE_UNSPECIFIED": 0,
		"COMMAND_TYPE_EXEC":        1,
		"COMMAND_TYPE_EXECRESULT":  2,
		"COMMAND_TYPE_ONE":         3,
		"COMMAND_TYPE_MANY":        4,
	}
)

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

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

func (CommandType) Descriptor() protoreflect.EnumDescriptor {
	return file_xyz_block_ftl_query_v1_query_proto_enumTypes[1].Descriptor()
}

func (CommandType) Type() protoreflect.EnumType {
	return &file_xyz_block_ftl_query_v1_query_proto_enumTypes[1]
}

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

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

type BeginTransactionRequest struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	DatabaseName  string                 `protobuf:"bytes,1,opt,name=database_name,json=databaseName,proto3" json:"database_name,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*BeginTransactionRequest) ProtoMessage() {}

func (x *BeginTransactionRequest) ProtoReflect() protoreflect.Message {
	mi := &file_xyz_block_ftl_query_v1_query_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 BeginTransactionRequest.ProtoReflect.Descriptor instead.
func (*BeginTransactionRequest) Descriptor() ([]byte, []int) {
	return file_xyz_block_ftl_query_v1_query_proto_rawDescGZIP(), []int{0}
}

func (x *BeginTransactionRequest) GetDatabaseName() string {
	if x != nil {
		return x.DatabaseName
	}
	return ""
}

type BeginTransactionResponse struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	TransactionId string                 `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
	Status        TransactionStatus      `protobuf:"varint,2,opt,name=status,proto3,enum=xyz.block.ftl.query.v1.TransactionStatus" json:"status,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*BeginTransactionResponse) ProtoMessage() {}

func (x *BeginTransactionResponse) ProtoReflect() protoreflect.Message {
	mi := &file_xyz_block_ftl_query_v1_query_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 BeginTransactionResponse.ProtoReflect.Descriptor instead.
func (*BeginTransactionResponse) Descriptor() ([]byte, []int) {
	return file_xyz_block_ftl_query_v1_query_proto_rawDescGZIP(), []int{1}
}

func (x *BeginTransactionResponse) GetTransactionId() string {
	if x != nil {
		return x.TransactionId
	}
	return ""
}

func (x *BeginTransactionResponse) GetStatus() TransactionStatus {
	if x != nil {
		return x.Status
	}
	return TransactionStatus_TRANSACTION_STATUS_UNSPECIFIED
}

type CommitTransactionRequest struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	DatabaseName  string                 `protobuf:"bytes,1,opt,name=database_name,json=databaseName,proto3" json:"database_name,omitempty"`
	TransactionId string                 `protobuf:"bytes,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*CommitTransactionRequest) ProtoMessage() {}

func (x *CommitTransactionRequest) ProtoReflect() protoreflect.Message {
	mi := &file_xyz_block_ftl_query_v1_query_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 CommitTransactionRequest.ProtoReflect.Descriptor instead.
func (*CommitTransactionRequest) Descriptor() ([]byte, []int) {
	return file_xyz_block_ftl_query_v1_query_proto_rawDescGZIP(), []int{2}
}

func (x *CommitTransactionRequest) GetDatabaseName() string {
	if x != nil {
		return x.DatabaseName
	}
	return ""
}

func (x *CommitTransactionRequest) GetTransactionId() string {
	if x != nil {
		return x.TransactionId
	}
	return ""
}

type CommitTransactionResponse struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Status        TransactionStatus      `protobuf:"varint,1,opt,name=status,proto3,enum=xyz.block.ftl.query.v1.TransactionStatus" json:"status,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*CommitTransactionResponse) ProtoMessage() {}

func (x *CommitTransactionResponse) ProtoReflect() protoreflect.Message {
	mi := &file_xyz_block_ftl_query_v1_query_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 CommitTransactionResponse.ProtoReflect.Descriptor instead.
func (*CommitTransactionResponse) Descriptor() ([]byte, []int) {
	return file_xyz_block_ftl_query_v1_query_proto_rawDescGZIP(), []int{3}
}

func (x *CommitTransactionResponse) GetStatus() TransactionStatus {
	if x != nil {
		return x.Status
	}
	return TransactionStatus_TRANSACTION_STATUS_UNSPECIFIED
}

type RollbackTransactionRequest struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	DatabaseName  string                 `protobuf:"bytes,1,opt,name=database_name,json=databaseName,proto3" json:"database_name,omitempty"`
	TransactionId string                 `protobuf:"bytes,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*RollbackTransactionRequest) ProtoMessage() {}

func (x *RollbackTransactionRequest) ProtoReflect() protoreflect.Message {
	mi := &file_xyz_block_ftl_query_v1_query_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 RollbackTransactionRequest.ProtoReflect.Descriptor instead.
func (*RollbackTransactionRequest) Descriptor() ([]byte, []int) {
	return file_xyz_block_ftl_query_v1_query_proto_rawDescGZIP(), []int{4}
}

func (x *RollbackTransactionRequest) GetDatabaseName() string {
	if x != nil {
		return x.DatabaseName
	}
	return ""
}

func (x *RollbackTransactionRequest) GetTransactionId() string {
	if x != nil {
		return x.TransactionId
	}
	return ""
}

type RollbackTransactionResponse struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Status        TransactionStatus      `protobuf:"varint,1,opt,name=status,proto3,enum=xyz.block.ftl.query.v1.TransactionStatus" json:"status,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*RollbackTransactionResponse) ProtoMessage() {}

func (x *RollbackTransactionResponse) ProtoReflect() protoreflect.Message {
	mi := &file_xyz_block_ftl_query_v1_query_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 RollbackTransactionResponse.ProtoReflect.Descriptor instead.
func (*RollbackTransactionResponse) Descriptor() ([]byte, []int) {
	return file_xyz_block_ftl_query_v1_query_proto_rawDescGZIP(), []int{5}
}

func (x *RollbackTransactionResponse) GetStatus() TransactionStatus {
	if x != nil {
		return x.Status
	}
	return TransactionStatus_TRANSACTION_STATUS_UNSPECIFIED
}

type ResultColumn struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	TypeName      string                 `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"` // The name in the FTL-generated type
	SqlName       string                 `protobuf:"bytes,2,opt,name=sql_name,json=sqlName,proto3" json:"sql_name,omitempty"`    // The database column name
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ResultColumn) ProtoMessage() {}

func (x *ResultColumn) ProtoReflect() protoreflect.Message {
	mi := &file_xyz_block_ftl_query_v1_query_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 ResultColumn.ProtoReflect.Descriptor instead.
func (*ResultColumn) Descriptor() ([]byte, []int) {
	return file_xyz_block_ftl_query_v1_query_proto_rawDescGZIP(), []int{6}
}

func (x *ResultColumn) GetTypeName() string {
	if x != nil {
		return x.TypeName
	}
	return ""
}

func (x *ResultColumn) GetSqlName() string {
	if x != nil {
		return x.SqlName
	}
	return ""
}

type ExecuteQueryRequest struct {
	state          protoimpl.MessageState `protogen:"open.v1"`
	DatabaseName   string                 `protobuf:"bytes,1,opt,name=database_name,json=databaseName,proto3" json:"database_name,omitempty"` // Name of the database to query
	RawSql         string                 `protobuf:"bytes,2,opt,name=raw_sql,json=rawSql,proto3" json:"raw_sql,omitempty"`
	CommandType    CommandType            `protobuf:"varint,3,opt,name=command_type,json=commandType,proto3,enum=xyz.block.ftl.query.v1.CommandType" json:"command_type,omitempty"`
	ParametersJson string                 `protobuf:"bytes,4,opt,name=parameters_json,json=parametersJson,proto3" json:"parameters_json,omitempty"` // JSON array of parameter values in order
	ResultColumns  []*ResultColumn        `protobuf:"bytes,5,rep,name=result_columns,json=resultColumns,proto3" json:"result_columns,omitempty"`    // Column names to scan for the result type
	TransactionId  *string                `protobuf:"bytes,6,opt,name=transaction_id,json=transactionId,proto3,oneof" json:"transaction_id,omitempty"`
	BatchSize      *int32                 `protobuf:"varint,7,opt,name=batch_size,json=batchSize,proto3,oneof" json:"batch_size,omitempty"` // Default 100 if not set
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

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

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

func (*ExecuteQueryRequest) ProtoMessage() {}

func (x *ExecuteQueryRequest) ProtoReflect() protoreflect.Message {
	mi := &file_xyz_block_ftl_query_v1_query_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 ExecuteQueryRequest.ProtoReflect.Descriptor instead.
func (*ExecuteQueryRequest) Descriptor() ([]byte, []int) {
	return file_xyz_block_ftl_query_v1_query_proto_rawDescGZIP(), []int{7}
}

func (x *ExecuteQueryRequest) GetDatabaseName() string {
	if x != nil {
		return x.DatabaseName
	}
	return ""
}

func (x *ExecuteQueryRequest) GetRawSql() string {
	if x != nil {
		return x.RawSql
	}
	return ""
}

func (x *ExecuteQueryRequest) GetCommandType() CommandType {
	if x != nil {
		return x.CommandType
	}
	return CommandType_COMMAND_TYPE_UNSPECIFIED
}

func (x *ExecuteQueryRequest) GetParametersJson() string {
	if x != nil {
		return x.ParametersJson
	}
	return ""
}

func (x *ExecuteQueryRequest) GetResultColumns() []*ResultColumn {
	if x != nil {
		return x.ResultColumns
	}
	return nil
}

func (x *ExecuteQueryRequest) GetTransactionId() string {
	if x != nil && x.TransactionId != nil {
		return *x.TransactionId
	}
	return ""
}

func (x *ExecuteQueryRequest) GetBatchSize() int32 {
	if x != nil && x.BatchSize != nil {
		return *x.BatchSize
	}
	return 0
}

type ExecuteQueryResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to Result:
	//
	//	*ExecuteQueryResponse_ExecResult
	//	*ExecuteQueryResponse_RowResults
	Result        isExecuteQueryResponse_Result `protobuf_oneof:"result"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ExecuteQueryResponse) ProtoMessage() {}

func (x *ExecuteQueryResponse) ProtoReflect() protoreflect.Message {
	mi := &file_xyz_block_ftl_query_v1_query_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 ExecuteQueryResponse.ProtoReflect.Descriptor instead.
func (*ExecuteQueryResponse) Descriptor() ([]byte, []int) {
	return file_xyz_block_ftl_query_v1_query_proto_rawDescGZIP(), []int{8}
}

func (x *ExecuteQueryResponse) GetResult() isExecuteQueryResponse_Result {
	if x != nil {
		return x.Result
	}
	return nil
}

func (x *ExecuteQueryResponse) GetExecResult() *ExecResult {
	if x != nil {
		if x, ok := x.Result.(*ExecuteQueryResponse_ExecResult); ok {
			return x.ExecResult
		}
	}
	return nil
}

func (x *ExecuteQueryResponse) GetRowResults() *RowResults {
	if x != nil {
		if x, ok := x.Result.(*ExecuteQueryResponse_RowResults); ok {
			return x.RowResults
		}
	}
	return nil
}

type isExecuteQueryResponse_Result interface {
	isExecuteQueryResponse_Result()
}

type ExecuteQueryResponse_ExecResult struct {
	// For EXEC commands
	ExecResult *ExecResult `protobuf:"bytes,1,opt,name=exec_result,json=execResult,proto3,oneof"`
}

type ExecuteQueryResponse_RowResults struct {
	// For ONE/MANY commands
	RowResults *RowResults `protobuf:"bytes,2,opt,name=row_results,json=rowResults,proto3,oneof"`
}

func (*ExecuteQueryResponse_ExecResult) isExecuteQueryResponse_Result() {}

func (*ExecuteQueryResponse_RowResults) isExecuteQueryResponse_Result() {}

type ExecResult struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	RowsAffected  int64                  `protobuf:"varint,1,opt,name=rows_affected,json=rowsAffected,proto3" json:"rows_affected,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ExecResult) ProtoMessage() {}

func (x *ExecResult) ProtoReflect() protoreflect.Message {
	mi := &file_xyz_block_ftl_query_v1_query_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 ExecResult.ProtoReflect.Descriptor instead.
func (*ExecResult) Descriptor() ([]byte, []int) {
	return file_xyz_block_ftl_query_v1_query_proto_rawDescGZIP(), []int{9}
}

func (x *ExecResult) GetRowsAffected() int64 {
	if x != nil {
		return x.RowsAffected
	}
	return 0
}

type RowResults struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	JsonRows      string                 `protobuf:"bytes,1,opt,name=json_rows,json=jsonRows,proto3" json:"json_rows,omitempty"` // JSON object mapping column names to values
	HasMore       bool                   `protobuf:"varint,2,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"`   // Indicates if there are more rows to fetch
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*RowResults) ProtoMessage() {}

func (x *RowResults) ProtoReflect() protoreflect.Message {
	mi := &file_xyz_block_ftl_query_v1_query_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 RowResults.ProtoReflect.Descriptor instead.
func (*RowResults) Descriptor() ([]byte, []int) {
	return file_xyz_block_ftl_query_v1_query_proto_rawDescGZIP(), []int{10}
}

func (x *RowResults) GetJsonRows() string {
	if x != nil {
		return x.JsonRows
	}
	return ""
}

func (x *RowResults) GetHasMore() bool {
	if x != nil {
		return x.HasMore
	}
	return false
}

var File_xyz_block_ftl_query_v1_query_proto protoreflect.FileDescriptor

const file_xyz_block_ftl_query_v1_query_proto_rawDesc = "" +
	"\n" +
	"\"xyz/block/ftl/query/v1/query.proto\x12\x16xyz.block.ftl.query.v1\x1a\x1axyz/block/ftl/v1/ftl.proto\">\n" +
	"\x17BeginTransactionRequest\x12#\n" +
	"\rdatabase_name\x18\x01 \x01(\tR\fdatabaseName\"\x84\x01\n" +
	"\x18BeginTransactionResponse\x12%\n" +
	"\x0etransaction_id\x18\x01 \x01(\tR\rtransactionId\x12A\n" +
	"\x06status\x18\x02 \x01(\x0e2).xyz.block.ftl.query.v1.TransactionStatusR\x06status\"f\n" +
	"\x18CommitTransactionRequest\x12#\n" +
	"\rdatabase_name\x18\x01 \x01(\tR\fdatabaseName\x12%\n" +
	"\x0etransaction_id\x18\x02 \x01(\tR\rtransactionId\"^\n" +
	"\x19CommitTransactionResponse\x12A\n" +
	"\x06status\x18\x01 \x01(\x0e2).xyz.block.ftl.query.v1.TransactionStatusR\x06status\"h\n" +
	"\x1aRollbackTransactionRequest\x12#\n" +
	"\rdatabase_name\x18\x01 \x01(\tR\fdatabaseName\x12%\n" +
	"\x0etransaction_id\x18\x02 \x01(\tR\rtransactionId\"`\n" +
	"\x1bRollbackTransactionResponse\x12A\n" +
	"\x06status\x18\x01 \x01(\x0e2).xyz.block.ftl.query.v1.TransactionStatusR\x06status\"F\n" +
	"\fResultColumn\x12\x1b\n" +
	"\ttype_name\x18\x01 \x01(\tR\btypeName\x12\x19\n" +
	"\bsql_name\x18\x02 \x01(\tR\asqlName\"\x83\x03\n" +
	"\x13ExecuteQueryRequest\x12#\n" +
	"\rdatabase_name\x18\x01 \x01(\tR\fdatabaseName\x12\x17\n" +
	"\araw_sql\x18\x02 \x01(\tR\x06rawSql\x12F\n" +
	"\fcommand_type\x18\x03 \x01(\x0e2#.xyz.block.ftl.query.v1.CommandTypeR\vcommandType\x12'\n" +
	"\x0fparameters_json\x18\x04 \x01(\tR\x0eparametersJson\x12K\n" +
	"\x0eresult_columns\x18\x05 \x03(\v2$.xyz.block.ftl.query.v1.ResultColumnR\rresultColumns\x12*\n" +
	"\x0etransaction_id\x18\x06 \x01(\tH\x00R\rtransactionId\x88\x01\x01\x12\"\n" +
	"\n" +
	"batch_size\x18\a \x01(\x05H\x01R\tbatchSize\x88\x01\x01B\x11\n" +
	"\x0f_transaction_idB\r\n" +
	"\v_batch_size\"\xae\x01\n" +
	"\x14ExecuteQueryResponse\x12E\n" +
	"\vexec_result\x18\x01 \x01(\v2\".xyz.block.ftl.query.v1.ExecResultH\x00R\n" +
	"execResult\x12E\n" +
	"\vrow_results\x18\x02 \x01(\v2\".xyz.block.ftl.query.v1.RowResultsH\x00R\n" +
	"rowResultsB\b\n" +
	"\x06result\"1\n" +
	"\n" +
	"ExecResult\x12#\n" +
	"\rrows_affected\x18\x01 \x01(\x03R\frowsAffected\"D\n" +
	"\n" +
	"RowResults\x12\x1b\n" +
	"\tjson_rows\x18\x01 \x01(\tR\bjsonRows\x12\x19\n" +
	"\bhas_more\x18\x02 \x01(\bR\ahasMore*v\n" +
	"\x11TransactionStatus\x12\"\n" +
	"\x1eTRANSACTION_STATUS_UNSPECIFIED\x10\x00\x12\x1e\n" +
	"\x1aTRANSACTION_STATUS_SUCCESS\x10\x01\x12\x1d\n" +
	"\x19TRANSACTION_STATUS_FAILED\x10\x02*\x8c\x01\n" +
	"\vCommandType\x12\x1c\n" +
	"\x18COMMAND_TYPE_UNSPECIFIED\x10\x00\x12\x15\n" +
	"\x11COMMAND_TYPE_EXEC\x10\x01\x12\x1b\n" +
	"\x17COMMAND_TYPE_EXECRESULT\x10\x02\x12\x14\n" +
	"\x10COMMAND_TYPE_ONE\x10\x03\x12\x15\n" +
	"\x11COMMAND_TYPE_MANY\x10\x042\xb8\x04\n" +
	"\fQueryService\x12J\n" +
	"\x04Ping\x12\x1d.xyz.block.ftl.v1.PingRequest\x1a\x1e.xyz.block.ftl.v1.PingResponse\"\x03\x90\x02\x01\x12u\n" +
	"\x10BeginTransaction\x12/.xyz.block.ftl.query.v1.BeginTransactionRequest\x1a0.xyz.block.ftl.query.v1.BeginTransactionResponse\x12x\n" +
	"\x11CommitTransaction\x120.xyz.block.ftl.query.v1.CommitTransactionRequest\x1a1.xyz.block.ftl.query.v1.CommitTransactionResponse\x12~\n" +
	"\x13RollbackTransaction\x122.xyz.block.ftl.query.v1.RollbackTransactionRequest\x1a3.xyz.block.ftl.query.v1.RollbackTransactionResponse\x12k\n" +
	"\fExecuteQuery\x12+.xyz.block.ftl.query.v1.ExecuteQueryRequest\x1a,.xyz.block.ftl.query.v1.ExecuteQueryResponse0\x01BFP\x01ZBgithub.com/block/ftl/backend/protos/xyz/block/ftl/query/v1;querypbb\x06proto3"

var (
	file_xyz_block_ftl_query_v1_query_proto_rawDescOnce sync.Once
	file_xyz_block_ftl_query_v1_query_proto_rawDescData []byte
)

func file_xyz_block_ftl_query_v1_query_proto_rawDescGZIP() []byte {
	file_xyz_block_ftl_query_v1_query_proto_rawDescOnce.Do(func() {
		file_xyz_block_ftl_query_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_xyz_block_ftl_query_v1_query_proto_rawDesc), len(file_xyz_block_ftl_query_v1_query_proto_rawDesc)))
	})
	return file_xyz_block_ftl_query_v1_query_proto_rawDescData
}

var file_xyz_block_ftl_query_v1_query_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_xyz_block_ftl_query_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_xyz_block_ftl_query_v1_query_proto_goTypes = []any{
	(TransactionStatus)(0),              // 0: xyz.block.ftl.query.v1.TransactionStatus
	(CommandType)(0),                    // 1: xyz.block.ftl.query.v1.CommandType
	(*BeginTransactionRequest)(nil),     // 2: xyz.block.ftl.query.v1.BeginTransactionRequest
	(*BeginTransactionResponse)(nil),    // 3: xyz.block.ftl.query.v1.BeginTransactionResponse
	(*CommitTransactionRequest)(nil),    // 4: xyz.block.ftl.query.v1.CommitTransactionRequest
	(*CommitTransactionResponse)(nil),   // 5: xyz.block.ftl.query.v1.CommitTransactionResponse
	(*RollbackTransactionRequest)(nil),  // 6: xyz.block.ftl.query.v1.RollbackTransactionRequest
	(*RollbackTransactionResponse)(nil), // 7: xyz.block.ftl.query.v1.RollbackTransactionResponse
	(*ResultColumn)(nil),                // 8: xyz.block.ftl.query.v1.ResultColumn
	(*ExecuteQueryRequest)(nil),         // 9: xyz.block.ftl.query.v1.ExecuteQueryRequest
	(*ExecuteQueryResponse)(nil),        // 10: xyz.block.ftl.query.v1.ExecuteQueryResponse
	(*ExecResult)(nil),                  // 11: xyz.block.ftl.query.v1.ExecResult
	(*RowResults)(nil),                  // 12: xyz.block.ftl.query.v1.RowResults
	(*v1.PingRequest)(nil),              // 13: xyz.block.ftl.v1.PingRequest
	(*v1.PingResponse)(nil),             // 14: xyz.block.ftl.v1.PingResponse
}
var file_xyz_block_ftl_query_v1_query_proto_depIdxs = []int32{
	0,  // 0: xyz.block.ftl.query.v1.BeginTransactionResponse.status:type_name -> xyz.block.ftl.query.v1.TransactionStatus
	0,  // 1: xyz.block.ftl.query.v1.CommitTransactionResponse.status:type_name -> xyz.block.ftl.query.v1.TransactionStatus
	0,  // 2: xyz.block.ftl.query.v1.RollbackTransactionResponse.status:type_name -> xyz.block.ftl.query.v1.TransactionStatus
	1,  // 3: xyz.block.ftl.query.v1.ExecuteQueryRequest.command_type:type_name -> xyz.block.ftl.query.v1.CommandType
	8,  // 4: xyz.block.ftl.query.v1.ExecuteQueryRequest.result_columns:type_name -> xyz.block.ftl.query.v1.ResultColumn
	11, // 5: xyz.block.ftl.query.v1.ExecuteQueryResponse.exec_result:type_name -> xyz.block.ftl.query.v1.ExecResult
	12, // 6: xyz.block.ftl.query.v1.ExecuteQueryResponse.row_results:type_name -> xyz.block.ftl.query.v1.RowResults
	13, // 7: xyz.block.ftl.query.v1.QueryService.Ping:input_type -> xyz.block.ftl.v1.PingRequest
	2,  // 8: xyz.block.ftl.query.v1.QueryService.BeginTransaction:input_type -> xyz.block.ftl.query.v1.BeginTransactionRequest
	4,  // 9: xyz.block.ftl.query.v1.QueryService.CommitTransaction:input_type -> xyz.block.ftl.query.v1.CommitTransactionRequest
	6,  // 10: xyz.block.ftl.query.v1.QueryService.RollbackTransaction:input_type -> xyz.block.ftl.query.v1.RollbackTransactionRequest
	9,  // 11: xyz.block.ftl.query.v1.QueryService.ExecuteQuery:input_type -> xyz.block.ftl.query.v1.ExecuteQueryRequest
	14, // 12: xyz.block.ftl.query.v1.QueryService.Ping:output_type -> xyz.block.ftl.v1.PingResponse
	3,  // 13: xyz.block.ftl.query.v1.QueryService.BeginTransaction:output_type -> xyz.block.ftl.query.v1.BeginTransactionResponse
	5,  // 14: xyz.block.ftl.query.v1.QueryService.CommitTransaction:output_type -> xyz.block.ftl.query.v1.CommitTransactionResponse
	7,  // 15: xyz.block.ftl.query.v1.QueryService.RollbackTransaction:output_type -> xyz.block.ftl.query.v1.RollbackTransactionResponse
	10, // 16: xyz.block.ftl.query.v1.QueryService.ExecuteQuery:output_type -> xyz.block.ftl.query.v1.ExecuteQueryResponse
	12, // [12:17] is the sub-list for method output_type
	7,  // [7:12] is the sub-list for method input_type
	7,  // [7:7] is the sub-list for extension type_name
	7,  // [7:7] is the sub-list for extension extendee
	0,  // [0:7] is the sub-list for field type_name
}

func init() { file_xyz_block_ftl_query_v1_query_proto_init() }
func file_xyz_block_ftl_query_v1_query_proto_init() {
	if File_xyz_block_ftl_query_v1_query_proto != nil {
		return
	}
	file_xyz_block_ftl_query_v1_query_proto_msgTypes[7].OneofWrappers = []any{}
	file_xyz_block_ftl_query_v1_query_proto_msgTypes[8].OneofWrappers = []any{
		(*ExecuteQueryResponse_ExecResult)(nil),
		(*ExecuteQueryResponse_RowResults)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_xyz_block_ftl_query_v1_query_proto_rawDesc), len(file_xyz_block_ftl_query_v1_query_proto_rawDesc)),
			NumEnums:      2,
			NumMessages:   11,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_xyz_block_ftl_query_v1_query_proto_goTypes,
		DependencyIndexes: file_xyz_block_ftl_query_v1_query_proto_depIdxs,
		EnumInfos:         file_xyz_block_ftl_query_v1_query_proto_enumTypes,
		MessageInfos:      file_xyz_block_ftl_query_v1_query_proto_msgTypes,
	}.Build()
	File_xyz_block_ftl_query_v1_query_proto = out.File
	file_xyz_block_ftl_query_v1_query_proto_goTypes = nil
	file_xyz_block_ftl_query_v1_query_proto_depIdxs = nil
}
