Documentation
¶
Index ¶
- Variables
- func RegisterDriverServer(s grpc.ServiceRegistrar, srv DriverServer)
- type Column
- type DriverClient
- type DriverServer
- type NamedValue
- func (*NamedValue) Descriptor() ([]byte, []int)deprecated
- func (x *NamedValue) GetName() string
- func (x *NamedValue) GetOrdinal() int64
- func (x *NamedValue) GetValue() *Value
- func (*NamedValue) ProtoMessage()
- func (x *NamedValue) ProtoReflect() protoreflect.Message
- func (x *NamedValue) Reset()
- func (x *NamedValue) String() string
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetArgs() []*NamedValue
- func (x *Request) GetQuery() string
- func (x *Request) GetReturnsRows() bool
- func (x *Request) GetStartTs() uint64
- func (x *Request) GetTxn() *TxnContext
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type Response
- func (*Response) Descriptor() ([]byte, []int)deprecated
- func (x *Response) GetColumns() []string
- func (x *Response) GetLastInsertId() int64
- func (x *Response) GetRows() []*Row
- func (x *Response) GetRowsAffected() int64
- func (x *Response) GetTxn() *TxnContext
- func (*Response) ProtoMessage()
- func (x *Response) ProtoReflect() protoreflect.Message
- func (x *Response) Reset()
- func (x *Response) String() string
- type Row
- type TxnContext
- func (*TxnContext) Descriptor() ([]byte, []int)deprecated
- func (x *TxnContext) GetAborted() bool
- func (x *TxnContext) GetCommitTs() int64
- func (x *TxnContext) GetCommitted() bool
- func (x *TxnContext) GetIsolation() int64
- func (x *TxnContext) GetReadOnly() bool
- func (x *TxnContext) GetStartTs() int64
- func (*TxnContext) ProtoMessage()
- func (x *TxnContext) ProtoReflect() protoreflect.Message
- func (x *TxnContext) Reset()
- func (x *TxnContext) String() string
- type UnimplementedDriverServer
- type UnsafeDriverServer
- type Value
- func (*Value) Descriptor() ([]byte, []int)deprecated
- func (x *Value) GetBool() bool
- func (x *Value) GetBytes() []byte
- func (x *Value) GetFloat64() float64
- func (x *Value) GetInt64() int64
- func (x *Value) GetNull() bool
- func (x *Value) GetString_() string
- func (x *Value) GetTime() *timestamppb.Timestamp
- func (m *Value) GetValue() isValue_Value
- func (*Value) ProtoMessage()
- func (x *Value) ProtoReflect() protoreflect.Message
- func (x *Value) Reset()
- func (x *Value) String() string
- type Value_Bool
- type Value_Bytes
- type Value_Float64
- type Value_Int64
- type Value_Null
- type Value_String_
- type Value_Time
Constants ¶
This section is empty.
Variables ¶
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)
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) ProtoMessage ¶
func (*Column) ProtoMessage()
func (*Column) ProtoReflect ¶
func (x *Column) ProtoReflect() protoreflect.Message
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) GetArgs ¶
func (x *Request) GetArgs() []*NamedValue
func (*Request) GetReturnsRows ¶
func (*Request) GetStartTs ¶
func (*Request) GetTxn ¶
func (x *Request) GetTxn() *TxnContext
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
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) GetColumns ¶
func (*Response) GetLastInsertId ¶
func (*Response) GetRowsAffected ¶
func (*Response) GetTxn ¶
func (x *Response) GetTxn() *TxnContext
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
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) GetColumns ¶
func (*Row) ProtoMessage ¶
func (*Row) ProtoMessage()
func (*Row) ProtoReflect ¶
func (x *Row) ProtoReflect() protoreflect.Message
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) CommitOrRollback(context.Context, *TxnContext) (*TxnContext, error)
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) GetFloat64 ¶
func (*Value) GetString_ ¶
func (*Value) GetTime ¶
func (x *Value) GetTime() *timestamppb.Timestamp
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
func (*Value) ProtoReflect ¶
func (x *Value) ProtoReflect() protoreflect.Message
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"`
}