proto

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2022 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Driver_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Driver",
	HandlerType: (*DriverServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Query",
			Handler:    _Driver_Query_Handler,
		},
		{
			MethodName: "CommitOrRollback",
			Handler:    _Driver_CommitOrRollback_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "plugin.proto",
}

Driver_ServiceDesc is the grpc.ServiceDesc for Driver service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_plugin_proto protoreflect.FileDescriptor

Functions

func RegisterDriverServer

func RegisterDriverServer(s grpc.ServiceRegistrar, srv DriverServer)

Types

type Column

type Column struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value *Value `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Column) Descriptor deprecated

func (*Column) Descriptor() ([]byte, []int)

Deprecated: Use Column.ProtoReflect.Descriptor instead.

func (*Column) GetName

func (x *Column) GetName() string

func (*Column) GetValue

func (x *Column) GetValue() *Value

func (*Column) ProtoMessage

func (*Column) ProtoMessage()

func (*Column) ProtoReflect

func (x *Column) ProtoReflect() protoreflect.Message

func (*Column) Reset

func (x *Column) Reset()

func (*Column) String

func (x *Column) String() string

type DriverClient

type DriverClient interface {
	// Abstracts reading and writing SQL queries into one API.
	Query(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
	CommitOrRollback(ctx context.Context, in *TxnContext, opts ...grpc.CallOption) (*TxnContext, error)
}

DriverClient is the client API for Driver service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewDriverClient

func NewDriverClient(cc grpc.ClientConnInterface) DriverClient

type DriverServer

type DriverServer interface {
	// Abstracts reading and writing SQL queries into one API.
	Query(context.Context, *Request) (*Response, error)
	CommitOrRollback(context.Context, *TxnContext) (*TxnContext, error)
	// contains filtered or unexported methods
}

DriverServer is the server API for Driver service. All implementations must embed UnimplementedDriverServer for forward compatibility

type NamedValue

type NamedValue struct {

	// If the Name is not empty it should be used for the parameter identifier and
	// not the ordinal position.
	//
	// Name will not have a symbol prefix.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Ordinal position of the parameter starting from one and is always set.
	Ordinal int64 `protobuf:"varint,2,opt,name=ordinal,proto3" json:"ordinal,omitempty"`
	// Value is the parameter value.
	Value *Value `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*NamedValue) Descriptor deprecated

func (*NamedValue) Descriptor() ([]byte, []int)

Deprecated: Use NamedValue.ProtoReflect.Descriptor instead.

func (*NamedValue) GetName

func (x *NamedValue) GetName() string

func (*NamedValue) GetOrdinal

func (x *NamedValue) GetOrdinal() int64

func (*NamedValue) GetValue

func (x *NamedValue) GetValue() *Value

func (*NamedValue) ProtoMessage

func (*NamedValue) ProtoMessage()

func (*NamedValue) ProtoReflect

func (x *NamedValue) ProtoReflect() protoreflect.Message

func (*NamedValue) Reset

func (x *NamedValue) Reset()

func (*NamedValue) String

func (x *NamedValue) String() string

type Request

type Request struct {
	StartTs     uint64        `protobuf:"varint,1,opt,name=start_ts,json=startTs,proto3" json:"start_ts,omitempty"`
	Query       string        `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"`
	Args        []*NamedValue `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
	ReturnsRows bool          `protobuf:"varint,4,opt,name=returns_rows,json=returnsRows,proto3" json:"returns_rows,omitempty"`
	Txn         *TxnContext   `protobuf:"bytes,5,opt,name=txn,proto3" json:"txn,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

func (*Request) Descriptor() ([]byte, []int)

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetArgs

func (x *Request) GetArgs() []*NamedValue

func (*Request) GetQuery

func (x *Request) GetQuery() string

func (*Request) GetReturnsRows

func (x *Request) GetReturnsRows() bool

func (*Request) GetStartTs

func (x *Request) GetStartTs() uint64

func (*Request) GetTxn

func (x *Request) GetTxn() *TxnContext

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	LastInsertId int64       `protobuf:"varint,1,opt,name=last_insert_id,json=lastInsertId,proto3" json:"last_insert_id,omitempty"`
	RowsAffected int64       `protobuf:"varint,2,opt,name=rows_affected,json=rowsAffected,proto3" json:"rows_affected,omitempty"`
	Columns      []string    `protobuf:"bytes,3,rep,name=columns,proto3" json:"columns,omitempty"`
	Rows         []*Row      `protobuf:"bytes,4,rep,name=rows,proto3" json:"rows,omitempty"`
	Txn          *TxnContext `protobuf:"bytes,5,opt,name=txn,proto3" json:"txn,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

func (*Response) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetColumns

func (x *Response) GetColumns() []string

func (*Response) GetLastInsertId

func (x *Response) GetLastInsertId() int64

func (*Response) GetRows

func (x *Response) GetRows() []*Row

func (*Response) GetRowsAffected

func (x *Response) GetRowsAffected() int64

func (*Response) GetTxn

func (x *Response) GetTxn() *TxnContext

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type Row

type Row struct {
	Columns []*Column `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"`
	// contains filtered or unexported fields
}

func (*Row) Descriptor deprecated

func (*Row) Descriptor() ([]byte, []int)

Deprecated: Use Row.ProtoReflect.Descriptor instead.

func (*Row) GetColumns

func (x *Row) GetColumns() []*Column

func (*Row) ProtoMessage

func (*Row) ProtoMessage()

func (*Row) ProtoReflect

func (x *Row) ProtoReflect() protoreflect.Message

func (*Row) Reset

func (x *Row) Reset()

func (*Row) String

func (x *Row) String() string

type TxnContext

type TxnContext struct {
	StartTs   int64 `protobuf:"varint,1,opt,name=start_ts,json=startTs,proto3" json:"start_ts,omitempty"`
	CommitTs  int64 `protobuf:"varint,2,opt,name=commit_ts,json=commitTs,proto3" json:"commit_ts,omitempty"`
	Committed bool  `protobuf:"varint,3,opt,name=committed,proto3" json:"committed,omitempty"`
	Aborted   bool  `protobuf:"varint,4,opt,name=aborted,proto3" json:"aborted,omitempty"`
	Isolation int64 `protobuf:"varint,5,opt,name=isolation,proto3" json:"isolation,omitempty"`
	ReadOnly  bool  `protobuf:"varint,6,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
	// contains filtered or unexported fields
}

func (*TxnContext) Descriptor deprecated

func (*TxnContext) Descriptor() ([]byte, []int)

Deprecated: Use TxnContext.ProtoReflect.Descriptor instead.

func (*TxnContext) GetAborted

func (x *TxnContext) GetAborted() bool

func (*TxnContext) GetCommitTs

func (x *TxnContext) GetCommitTs() int64

func (*TxnContext) GetCommitted

func (x *TxnContext) GetCommitted() bool

func (*TxnContext) GetIsolation

func (x *TxnContext) GetIsolation() int64

func (*TxnContext) GetReadOnly

func (x *TxnContext) GetReadOnly() bool

func (*TxnContext) GetStartTs

func (x *TxnContext) GetStartTs() int64

func (*TxnContext) ProtoMessage

func (*TxnContext) ProtoMessage()

func (*TxnContext) ProtoReflect

func (x *TxnContext) ProtoReflect() protoreflect.Message

func (*TxnContext) Reset

func (x *TxnContext) Reset()

func (*TxnContext) String

func (x *TxnContext) String() string

type UnimplementedDriverServer

type UnimplementedDriverServer struct {
}

UnimplementedDriverServer must be embedded to have forward compatible implementations.

func (UnimplementedDriverServer) CommitOrRollback

func (UnimplementedDriverServer) Query

type UnsafeDriverServer

type UnsafeDriverServer interface {
	// contains filtered or unexported methods
}

UnsafeDriverServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DriverServer will result in compilation errors.

type Value

type Value struct {

	// Types that are assignable to Value:
	//	*Value_Null
	//	*Value_Int64
	//	*Value_Float64
	//	*Value_Bool
	//	*Value_Bytes
	//	*Value_String_
	//	*Value_Time
	Value isValue_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

func (*Value) Descriptor deprecated

func (*Value) Descriptor() ([]byte, []int)

Deprecated: Use Value.ProtoReflect.Descriptor instead.

func (*Value) GetBool

func (x *Value) GetBool() bool

func (*Value) GetBytes

func (x *Value) GetBytes() []byte

func (*Value) GetFloat64

func (x *Value) GetFloat64() float64

func (*Value) GetInt64

func (x *Value) GetInt64() int64

func (*Value) GetNull

func (x *Value) GetNull() bool

func (*Value) GetString_

func (x *Value) GetString_() string

func (*Value) GetTime

func (x *Value) GetTime() *timestamppb.Timestamp

func (*Value) GetValue

func (m *Value) GetValue() isValue_Value

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) ProtoReflect

func (x *Value) ProtoReflect() protoreflect.Message

func (*Value) Reset

func (x *Value) Reset()

func (*Value) String

func (x *Value) String() string

type Value_Bool

type Value_Bool struct {
	Bool bool `protobuf:"varint,4,opt,name=bool,proto3,oneof"`
}

type Value_Bytes

type Value_Bytes struct {
	Bytes []byte `protobuf:"bytes,5,opt,name=bytes,proto3,oneof"`
}

type Value_Float64

type Value_Float64 struct {
	Float64 float64 `protobuf:"fixed64,3,opt,name=float64,proto3,oneof"`
}

type Value_Int64

type Value_Int64 struct {
	Int64 int64 `protobuf:"varint,2,opt,name=int64,proto3,oneof"`
}

type Value_Null

type Value_Null struct {
	Null bool `protobuf:"varint,1,opt,name=null,proto3,oneof"`
}

type Value_String_

type Value_String_ struct {
	String_ string `protobuf:"bytes,6,opt,name=string,proto3,oneof"`
}

type Value_Time

type Value_Time struct {
	Time *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=time,proto3,oneof"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL