Documentation ¶
Overview ¶
Package proto contains protobuf files and functions for MicroDB protocol
Index ¶
- Variables
- func UnmarshalValues(vs []*Value) []interface{}
- type DriverResult
- func (*DriverResult) Descriptor() ([]byte, []int)deprecated
- func (x *DriverResult) GetResultLastInsertId() int64
- func (x *DriverResult) GetResultRowsAffected() int64
- func (x *DriverResult) LastInsertId() (int64, error)
- func (*DriverResult) ProtoMessage()
- func (x *DriverResult) ProtoReflect() protoreflect.Message
- func (x *DriverResult) Reset()
- func (x *DriverResult) RowsAffected() (int64, error)
- func (x *DriverResult) String() string
- type NullValue
- type QueryRequest
- func (*QueryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryRequest) GetArgs() []*Value
- func (x *QueryRequest) GetQuery() string
- func (*QueryRequest) ProtoMessage()
- func (x *QueryRequest) ProtoReflect() protoreflect.Message
- func (x *QueryRequest) Reset()
- func (x *QueryRequest) String() string
- type RowUpdate
- type Value
- func (*Value) Descriptor() ([]byte, []int)deprecated
- func (x *Value) GetBoolean() bool
- func (x *Value) GetDecimal() float32
- func (x *Value) GetInteger() int64
- func (x *Value) GetInterface() interface{}
- func (x *Value) GetNull() *NullValue
- func (x *Value) GetTimestamp() *timestamppb.Timestamp
- func (m *Value) GetTypedValue() isValue_TypedValue
- func (x *Value) GetVarchar() string
- func (*Value) ProtoMessage()
- func (x *Value) ProtoReflect() protoreflect.Message
- func (x *Value) Reset()
- func (x *Value) String() string
- type Value_Boolean
- type Value_Decimal
- type Value_Integer
- type Value_Null
- type Value_Timestamp
- type Value_Varchar
- type WriteQueryReply
- func (*WriteQueryReply) Descriptor() ([]byte, []int)deprecated
- func (x *WriteQueryReply) GetMsg() string
- func (x *WriteQueryReply) GetOk() bool
- func (x *WriteQueryReply) GetResult() *DriverResult
- func (*WriteQueryReply) ProtoMessage()
- func (x *WriteQueryReply) ProtoReflect() protoreflect.Message
- func (x *WriteQueryReply) Reset()
- func (x *WriteQueryReply) String() string
Constants ¶
This section is empty.
Variables ¶
var File_microdb_proto protoreflect.FileDescriptor
Functions ¶
func UnmarshalValues ¶
func UnmarshalValues(vs []*Value) []interface{}
UnmarshalValues unmarshals an array of MicroDB value types into Go types.
Types ¶
type DriverResult ¶
type DriverResult struct { ResultLastInsertId int64 `protobuf:"varint,1,opt,name=resultLastInsertId,proto3" json:"resultLastInsertId,omitempty"` ResultRowsAffected int64 `protobuf:"varint,2,opt,name=resultRowsAffected,proto3" json:"resultRowsAffected,omitempty"` // contains filtered or unexported fields }
func (*DriverResult) Descriptor
deprecated
func (*DriverResult) Descriptor() ([]byte, []int)
Deprecated: Use DriverResult.ProtoReflect.Descriptor instead.
func (*DriverResult) GetResultLastInsertId ¶
func (x *DriverResult) GetResultLastInsertId() int64
func (*DriverResult) GetResultRowsAffected ¶
func (x *DriverResult) GetResultRowsAffected() int64
func (*DriverResult) LastInsertId ¶
func (x *DriverResult) LastInsertId() (int64, error)
LastInsertId returns the database's auto-generated ID after, for example, an INSERT into a table with primary key.
func (*DriverResult) ProtoMessage ¶
func (*DriverResult) ProtoMessage()
func (*DriverResult) ProtoReflect ¶
func (x *DriverResult) ProtoReflect() protoreflect.Message
func (*DriverResult) Reset ¶
func (x *DriverResult) Reset()
func (*DriverResult) RowsAffected ¶
func (x *DriverResult) RowsAffected() (int64, error)
RowsAffected returns the number of rows affected by the query.
func (*DriverResult) String ¶
func (x *DriverResult) String() string
type NullValue ¶
type NullValue struct {
// contains filtered or unexported fields
}
func (*NullValue) Descriptor
deprecated
func (*NullValue) ProtoMessage ¶
func (*NullValue) ProtoMessage()
func (*NullValue) ProtoReflect ¶
func (x *NullValue) ProtoReflect() protoreflect.Message
type QueryRequest ¶
type QueryRequest struct { Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` Args []*Value `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"` // contains filtered or unexported fields }
func (*QueryRequest) Descriptor
deprecated
func (*QueryRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead.
func (*QueryRequest) GetArgs ¶
func (x *QueryRequest) GetArgs() []*Value
func (*QueryRequest) GetQuery ¶
func (x *QueryRequest) GetQuery() string
func (*QueryRequest) ProtoMessage ¶
func (*QueryRequest) ProtoMessage()
func (*QueryRequest) ProtoReflect ¶
func (x *QueryRequest) ProtoReflect() protoreflect.Message
func (*QueryRequest) Reset ¶
func (x *QueryRequest) Reset()
func (*QueryRequest) String ¶
func (x *QueryRequest) String() string
type RowUpdate ¶
type RowUpdate struct { Row []*Value `protobuf:"bytes,1,rep,name=row,proto3" json:"row,omitempty"` // contains filtered or unexported fields }
func (*RowUpdate) Descriptor
deprecated
func (*RowUpdate) ProtoMessage ¶
func (*RowUpdate) ProtoMessage()
func (*RowUpdate) ProtoReflect ¶
func (x *RowUpdate) ProtoReflect() protoreflect.Message
type Value ¶
type Value struct { // Types that are assignable to TypedValue: // *Value_Varchar // *Value_Integer // *Value_Decimal // *Value_Boolean // *Value_Null // *Value_Timestamp TypedValue isValue_TypedValue `protobuf_oneof:"typed_value"` // contains filtered or unexported fields }
func MarshalCanalValue ¶ added in v0.1.7
MarshalCanalValue marshals a canal values into a MicroDB value type.
func MarshalCanalValues ¶ added in v0.1.7
MarshalCanalValues marshals an array of canal values into MicroDB value types.
func MarshalDriverValues ¶
func MarshalDriverValues(args []driver.NamedValue) []*Value
MarshalDriverValues marshals an array of database driver values into MicroDB value types.
func MarshalValue ¶
func MarshalValue(i interface{}) *Value
MarshalValue marshals any Go type into a MicroDB value type. nolint // Allow longer method accounts for all data types.
func MarshalValues ¶
func MarshalValues(is []interface{}) []*Value
MarshalValues marshals an array of any Go types into MicroDB value types.
func (*Value) Descriptor
deprecated
func (*Value) GetBoolean ¶
func (*Value) GetDecimal ¶
func (*Value) GetInteger ¶
func (*Value) GetInterface ¶
func (x *Value) GetInterface() interface{}
GetInterface unmarshals a MicroDB value type into a Go type.
func (*Value) GetTimestamp ¶
func (x *Value) GetTimestamp() *timestamppb.Timestamp
func (*Value) GetTypedValue ¶
func (m *Value) GetTypedValue() isValue_TypedValue
func (*Value) GetVarchar ¶
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
func (*Value) ProtoReflect ¶
func (x *Value) ProtoReflect() protoreflect.Message
type Value_Boolean ¶
type Value_Boolean struct {
Boolean bool `protobuf:"varint,4,opt,name=boolean,proto3,oneof"`
}
type Value_Decimal ¶
type Value_Decimal struct {
Decimal float32 `protobuf:"fixed32,3,opt,name=decimal,proto3,oneof"`
}
type Value_Integer ¶
type Value_Integer struct {
Integer int64 `protobuf:"varint,2,opt,name=integer,proto3,oneof"`
}
type Value_Null ¶
type Value_Null struct {
Null *NullValue `protobuf:"bytes,5,opt,name=null,proto3,oneof"`
}
type Value_Timestamp ¶
type Value_Timestamp struct {
Timestamp *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=timestamp,proto3,oneof"`
}
type Value_Varchar ¶
type Value_Varchar struct {
Varchar string `protobuf:"bytes,1,opt,name=varchar,proto3,oneof"`
}
type WriteQueryReply ¶
type WriteQueryReply struct { Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` Result *DriverResult `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*WriteQueryReply) Descriptor
deprecated
func (*WriteQueryReply) Descriptor() ([]byte, []int)
Deprecated: Use WriteQueryReply.ProtoReflect.Descriptor instead.
func (*WriteQueryReply) GetMsg ¶
func (x *WriteQueryReply) GetMsg() string
func (*WriteQueryReply) GetOk ¶
func (x *WriteQueryReply) GetOk() bool
func (*WriteQueryReply) GetResult ¶
func (x *WriteQueryReply) GetResult() *DriverResult
func (*WriteQueryReply) ProtoMessage ¶
func (*WriteQueryReply) ProtoMessage()
func (*WriteQueryReply) ProtoReflect ¶
func (x *WriteQueryReply) ProtoReflect() protoreflect.Message
func (*WriteQueryReply) Reset ¶
func (x *WriteQueryReply) Reset()
func (*WriteQueryReply) String ¶
func (x *WriteQueryReply) String() string