Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterKvdbServer(s grpc.ServiceRegistrar, srv KvdbServer)
- func ScanRecord(dst record.Record, src *Record) error
- func ToCondition(c *Condition) (condition.Condition, error)
- func ToConditionAndReplacement(cr *ConditionAndReplacement) (condition.Condition, record.Record, error)
- func ToConditionTemplateAndOrder(cto *ConditionTemplateAndOrder) (condition.Condition, record.Record, sort.OrderBy, error)
- func ToConditionTemplateOrderAndLimit(ctol *ConditionTemplateOrderAndLimit) (condition.Condition, record.Record, sort.OrderBy, int64, error)
- func ToConditions(mc *ManyConditions) ([]condition.Condition, error)
- func ToDatabaseNames(dn *DatabaseNames) ([]string, error)
- func ToDirection(d *Direction) sort.Direction
- func ToHasRecord(hr *HasRecord) (record.Record, error)
- func ToIndex(idx *Index) string
- func ToIndices(il *IndexList) []string
- func ToInt64(nr *NumberOfRecords) int64
- func ToKey(key *Key) string
- func ToKeys(kl *KeyList) []string
- func ToLHSBool(m *LhsBool) (string, bool, error)
- func ToLHSLowerUpper(ul *LhsLowerUpper) (lhs string, lower interface{}, upper interface{}, err error)
- func ToLHSValues(m *LhsManyValues) (string, []interface{}, error)
- func ToLeafOp(op *LeafOperator) (*condition.LeafOp, error)
- func ToName(n *Name) string
- func ToNameAndTemplate(nt *NameAndTemplate) (string, record.Record, error)
- func ToOrder(s *Order) sort.Order
- func ToOrderBy(S *OrderBy) sort.OrderBy
- func ToRecord(r *Record) (record.Record, error)
- func ToSrcAndDst(sd *SrcAndDstNames) (string, string)
- func ToTableNames(tn *TableNames) ([]string, error)
- type Condition
- func (*Condition) Descriptor() ([]byte, []int)deprecated
- func (x *Condition) GetBoolValue() bool
- func (x *Condition) GetLeafValue() *LeafOperator
- func (x *Condition) GetLhsBoolValue() *LhsBool
- func (x *Condition) GetLhsLowerUpperValue() *LhsLowerUpper
- func (x *Condition) GetLhsManyValuesValue() *LhsManyValues
- func (x *Condition) GetManyConditionsValue() *ManyConditions
- func (x *Condition) GetType() Condition_CondType
- func (m *Condition) GetValue() isCondition_Value
- func (*Condition) ProtoMessage()
- func (x *Condition) ProtoReflect() protoreflect.Message
- func (x *Condition) Reset()
- func (x *Condition) String() string
- type ConditionAndReplacement
- func (*ConditionAndReplacement) Descriptor() ([]byte, []int)deprecated
- func (x *ConditionAndReplacement) GetCondition() *Condition
- func (x *ConditionAndReplacement) GetReplacement() *Record
- func (*ConditionAndReplacement) ProtoMessage()
- func (x *ConditionAndReplacement) ProtoReflect() protoreflect.Message
- func (x *ConditionAndReplacement) Reset()
- func (x *ConditionAndReplacement) String() string
- type ConditionTemplateAndOrder
- func (*ConditionTemplateAndOrder) Descriptor() ([]byte, []int)deprecated
- func (x *ConditionTemplateAndOrder) GetCondition() *Condition
- func (x *ConditionTemplateAndOrder) GetOrder() *OrderBy
- func (x *ConditionTemplateAndOrder) GetTemplate() *Record
- func (*ConditionTemplateAndOrder) ProtoMessage()
- func (x *ConditionTemplateAndOrder) ProtoReflect() protoreflect.Message
- func (x *ConditionTemplateAndOrder) Reset()
- func (x *ConditionTemplateAndOrder) String() string
- type ConditionTemplateOrderAndLimit
- func (*ConditionTemplateOrderAndLimit) Descriptor() ([]byte, []int)deprecated
- func (x *ConditionTemplateOrderAndLimit) GetCondition() *Condition
- func (x *ConditionTemplateOrderAndLimit) GetLimit() int64
- func (x *ConditionTemplateOrderAndLimit) GetOrder() *OrderBy
- func (x *ConditionTemplateOrderAndLimit) GetTemplate() *Record
- func (*ConditionTemplateOrderAndLimit) ProtoMessage()
- func (x *ConditionTemplateOrderAndLimit) ProtoReflect() protoreflect.Message
- func (x *ConditionTemplateOrderAndLimit) Reset()
- func (x *ConditionTemplateOrderAndLimit) String() string
- type Condition_BoolValue
- type Condition_CondType
- func (Condition_CondType) Descriptor() protoreflect.EnumDescriptor
- func (x Condition_CondType) Enum() *Condition_CondType
- func (Condition_CondType) EnumDescriptor() ([]byte, []int)deprecated
- func (x Condition_CondType) Number() protoreflect.EnumNumber
- func (x Condition_CondType) String() string
- func (Condition_CondType) Type() protoreflect.EnumType
- type Condition_LeafValue
- type Condition_LhsBoolValue
- type Condition_LhsLowerUpperValue
- type Condition_LhsManyValuesValue
- type Condition_ManyConditionsValue
- type DatabaseNames
- type Direction
- type HasRecord
- type Index
- type IndexList
- type Key
- type KeyList
- type KvdbClient
- type KvdbServer
- type Kvdb_InsertClient
- type Kvdb_InsertServer
- type Kvdb_SelectWhereLimitClient
- type Kvdb_SelectWhereLimitServer
- type LeafOperator
- func (*LeafOperator) Descriptor() ([]byte, []int)deprecated
- func (x *LeafOperator) GetLhs() string
- func (x *LeafOperator) GetOpcode() LeafOperator_LeafType
- func (x *LeafOperator) GetRhs() *Value
- func (*LeafOperator) ProtoMessage()
- func (x *LeafOperator) ProtoReflect() protoreflect.Message
- func (x *LeafOperator) Reset()
- func (x *LeafOperator) String() string
- type LeafOperator_LeafType
- func (LeafOperator_LeafType) Descriptor() protoreflect.EnumDescriptor
- func (x LeafOperator_LeafType) Enum() *LeafOperator_LeafType
- func (LeafOperator_LeafType) EnumDescriptor() ([]byte, []int)deprecated
- func (x LeafOperator_LeafType) Number() protoreflect.EnumNumber
- func (x LeafOperator_LeafType) String() string
- func (LeafOperator_LeafType) Type() protoreflect.EnumType
- type LhsBool
- type LhsLowerUpper
- func (*LhsLowerUpper) Descriptor() ([]byte, []int)deprecated
- func (x *LhsLowerUpper) GetLhs() string
- func (x *LhsLowerUpper) GetLower() *Value
- func (x *LhsLowerUpper) GetUpper() *Value
- func (*LhsLowerUpper) ProtoMessage()
- func (x *LhsLowerUpper) ProtoReflect() protoreflect.Message
- func (x *LhsLowerUpper) Reset()
- func (x *LhsLowerUpper) String() string
- type LhsManyValues
- func (*LhsManyValues) Descriptor() ([]byte, []int)deprecated
- func (x *LhsManyValues) GetLhs() string
- func (x *LhsManyValues) GetValue() []*Value
- func (*LhsManyValues) ProtoMessage()
- func (x *LhsManyValues) ProtoReflect() protoreflect.Message
- func (x *LhsManyValues) Reset()
- func (x *LhsManyValues) String() string
- type ManyConditions
- type Name
- type NameAndTemplate
- func (*NameAndTemplate) Descriptor() ([]byte, []int)deprecated
- func (x *NameAndTemplate) GetName() string
- func (x *NameAndTemplate) GetTemplate() *Record
- func (*NameAndTemplate) ProtoMessage()
- func (x *NameAndTemplate) ProtoReflect() protoreflect.Message
- func (x *NameAndTemplate) Reset()
- func (x *NameAndTemplate) String() string
- type NumberOfRecords
- type Order
- type OrderBy
- type Record
- type SrcAndDstNames
- func (*SrcAndDstNames) Descriptor() ([]byte, []int)deprecated
- func (x *SrcAndDstNames) GetDst() string
- func (x *SrcAndDstNames) GetSrc() string
- func (*SrcAndDstNames) ProtoMessage()
- func (x *SrcAndDstNames) ProtoReflect() protoreflect.Message
- func (x *SrcAndDstNames) Reset()
- func (x *SrcAndDstNames) String() string
- type TableNames
- type UnimplementedKvdbServer
- func (UnimplementedKvdbServer) AddIndex(context.Context, *Index) (*emptypb.Empty, error)
- func (UnimplementedKvdbServer) AddKeys(context.Context, *Record) (*emptypb.Empty, error)
- func (UnimplementedKvdbServer) CountWhere(context.Context, *Condition) (*NumberOfRecords, error)
- func (UnimplementedKvdbServer) CreateDatabase(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (UnimplementedKvdbServer) CreateTable(context.Context, *NameAndTemplate) (*emptypb.Empty, error)
- func (UnimplementedKvdbServer) DeleteDatabase(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (UnimplementedKvdbServer) DeleteIndex(context.Context, *Index) (*emptypb.Empty, error)
- func (UnimplementedKvdbServer) DeleteKeys(context.Context, *KeyList) (*emptypb.Empty, error)
- func (UnimplementedKvdbServer) DeleteTable(context.Context, *Name) (*emptypb.Empty, error)
- func (UnimplementedKvdbServer) DeleteWhere(context.Context, *Condition) (*NumberOfRecords, error)
- func (UnimplementedKvdbServer) DescribeTable(context.Context, *emptypb.Empty) (*Record, error)
- func (UnimplementedKvdbServer) Insert(Kvdb_InsertServer) error
- func (UnimplementedKvdbServer) ListDatabases(context.Context, *emptypb.Empty) (*DatabaseNames, error)
- func (UnimplementedKvdbServer) ListIndices(context.Context, *emptypb.Empty) (*IndexList, error)
- func (UnimplementedKvdbServer) ListTables(context.Context, *emptypb.Empty) (*TableNames, error)
- func (UnimplementedKvdbServer) RenameTable(context.Context, *SrcAndDstNames) (*emptypb.Empty, error)
- func (UnimplementedKvdbServer) SelectOneWhere(context.Context, *ConditionTemplateAndOrder) (*HasRecord, error)
- func (UnimplementedKvdbServer) SelectWhereLimit(*ConditionTemplateOrderAndLimit, Kvdb_SelectWhereLimitServer) error
- func (UnimplementedKvdbServer) UpdateWhere(context.Context, *ConditionAndReplacement) (*NumberOfRecords, error)
- type UnsafeKvdbServer
- type Value
- func (*Value) Descriptor() ([]byte, []int)deprecated
- func (x *Value) GetBoolValue() bool
- func (x *Value) GetBytesValue() []byte
- func (x *Value) GetDoubleValue() float64
- func (x *Value) GetInt32Value() int32
- func (x *Value) GetInt64Value() int64
- func (x *Value) GetStringValue() string
- func (x *Value) GetType() Value_Type
- func (x *Value) GetUint32Value() uint32
- func (x *Value) GetUint64Value() uint64
- 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_BoolValue
- type Value_BytesValue
- type Value_DoubleValue
- type Value_Int32Value
- type Value_Int64Value
- type Value_StringValue
- type Value_Type
- type Value_Uint32Value
- type Value_Uint64Value
Constants ¶
const ( Kvdb_ListDatabases_FullMethodName = "/kvdb.Kvdb/ListDatabases" Kvdb_ListTables_FullMethodName = "/kvdb.Kvdb/ListTables" Kvdb_CreateTable_FullMethodName = "/kvdb.Kvdb/CreateTable" Kvdb_DeleteTable_FullMethodName = "/kvdb.Kvdb/DeleteTable" Kvdb_RenameTable_FullMethodName = "/kvdb.Kvdb/RenameTable" Kvdb_DescribeTable_FullMethodName = "/kvdb.Kvdb/DescribeTable" Kvdb_CountWhere_FullMethodName = "/kvdb.Kvdb/CountWhere" Kvdb_Insert_FullMethodName = "/kvdb.Kvdb/Insert" Kvdb_UpdateWhere_FullMethodName = "/kvdb.Kvdb/UpdateWhere" Kvdb_SelectWhereLimit_FullMethodName = "/kvdb.Kvdb/SelectWhereLimit" Kvdb_SelectOneWhere_FullMethodName = "/kvdb.Kvdb/SelectOneWhere" Kvdb_DeleteWhere_FullMethodName = "/kvdb.Kvdb/DeleteWhere" Kvdb_AddIndex_FullMethodName = "/kvdb.Kvdb/AddIndex" Kvdb_DeleteIndex_FullMethodName = "/kvdb.Kvdb/DeleteIndex" Kvdb_ListIndices_FullMethodName = "/kvdb.Kvdb/ListIndices" Kvdb_AddKeys_FullMethodName = "/kvdb.Kvdb/AddKeys" Kvdb_DeleteKeys_FullMethodName = "/kvdb.Kvdb/DeleteKeys" Kvdb_DeleteDatabase_FullMethodName = "/kvdb.Kvdb/DeleteDatabase" Kvdb_CreateDatabase_FullMethodName = "/kvdb.Kvdb/CreateDatabase" )
Variables ¶
var ( LeafOperator_LeafType_name = map[int32]string{ 0: "UNDEFINED", 1: "EQ", 2: "NE", 3: "GT", 4: "LT", 5: "GE", 6: "LE", } LeafOperator_LeafType_value = map[string]int32{ "UNDEFINED": 0, "EQ": 1, "NE": 2, "GT": 3, "LT": 4, "GE": 5, "LE": 6, } )
Enum value maps for LeafOperator_LeafType.
var ( Condition_CondType_name = map[int32]string{ 0: "UNDEFINED", 1: "AND", 2: "BETWEEN", 3: "BOOL", 4: "IN", 5: "LEAF", 6: "NOTBETWEEN", 7: "NOTIN", 8: "OR", 9: "IS", } Condition_CondType_value = map[string]int32{ "UNDEFINED": 0, "AND": 1, "BETWEEN": 2, "BOOL": 3, "IN": 4, "LEAF": 5, "NOTBETWEEN": 6, "NOTIN": 7, "OR": 8, "IS": 9, } )
Enum value maps for Condition_CondType.
var ( Value_Type_name = map[int32]string{ 0: "UNDEFINED", 1: "INT", 2: "INT8", 3: "INT16", 4: "INT32", 5: "INT64", 6: "UINT", 7: "UINT8", 8: "UINT16", 9: "UINT32", 10: "UINT64", 11: "BOOL", 12: "FLOAT64", 13: "STRING", 14: "BYTESLICE", } Value_Type_value = map[string]int32{ "UNDEFINED": 0, "INT": 1, "INT8": 2, "INT16": 3, "INT32": 4, "INT64": 5, "UINT": 6, "UINT8": 7, "UINT16": 8, "UINT32": 9, "UINT64": 10, "BOOL": 11, "FLOAT64": 12, "STRING": 13, "BYTESLICE": 14, } )
Enum value maps for Value_Type.
var File_condition_proto protoreflect.FileDescriptor
var File_kvdb_proto protoreflect.FileDescriptor
var File_sort_proto protoreflect.FileDescriptor
var File_value_proto protoreflect.FileDescriptor
var Kvdb_ServiceDesc = grpc.ServiceDesc{ ServiceName: "kvdb.Kvdb", HandlerType: (*KvdbServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListDatabases", Handler: _Kvdb_ListDatabases_Handler, }, { MethodName: "ListTables", Handler: _Kvdb_ListTables_Handler, }, { MethodName: "CreateTable", Handler: _Kvdb_CreateTable_Handler, }, { MethodName: "DeleteTable", Handler: _Kvdb_DeleteTable_Handler, }, { MethodName: "RenameTable", Handler: _Kvdb_RenameTable_Handler, }, { MethodName: "DescribeTable", Handler: _Kvdb_DescribeTable_Handler, }, { MethodName: "CountWhere", Handler: _Kvdb_CountWhere_Handler, }, { MethodName: "UpdateWhere", Handler: _Kvdb_UpdateWhere_Handler, }, { MethodName: "SelectOneWhere", Handler: _Kvdb_SelectOneWhere_Handler, }, { MethodName: "DeleteWhere", Handler: _Kvdb_DeleteWhere_Handler, }, { MethodName: "AddIndex", Handler: _Kvdb_AddIndex_Handler, }, { MethodName: "DeleteIndex", Handler: _Kvdb_DeleteIndex_Handler, }, { MethodName: "ListIndices", Handler: _Kvdb_ListIndices_Handler, }, { MethodName: "AddKeys", Handler: _Kvdb_AddKeys_Handler, }, { MethodName: "DeleteKeys", Handler: _Kvdb_DeleteKeys_Handler, }, { MethodName: "DeleteDatabase", Handler: _Kvdb_DeleteDatabase_Handler, }, { MethodName: "CreateDatabase", Handler: _Kvdb_CreateDatabase_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Insert", Handler: _Kvdb_Insert_Handler, ClientStreams: true, }, { StreamName: "SelectWhereLimit", Handler: _Kvdb_SelectWhereLimit_Handler, ServerStreams: true, }, }, Metadata: "kvdb.proto", }
Kvdb_ServiceDesc is the grpc.ServiceDesc for Kvdb service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterKvdbServer ¶
func RegisterKvdbServer(s grpc.ServiceRegistrar, srv KvdbServer)
func ScanRecord ¶
ScanRecord scans the contents of "src" into "dst". Any previously set keys or values in "dst" will be deleted or overwritten.
func ToCondition ¶
ToCondition converts a *Condition to a condition.Condition
func ToConditionAndReplacement ¶
func ToConditionAndReplacement(cr *ConditionAndReplacement) (condition.Condition, record.Record, error)
ToConditionAndReplacement converts a *ConditionAndReplacement to a condition.Condition and a record.Record.
func ToConditionTemplateAndOrder ¶ added in v0.2.10
func ToConditionTemplateAndOrder(cto *ConditionTemplateAndOrder) (condition.Condition, record.Record, sort.OrderBy, error)
ToConditionTemplateAndOrder converts a *ConditionTemplateAndOrder to a condition.Condition, a record.Record, and a sort.Order.
func ToConditionTemplateOrderAndLimit ¶
func ToConditionTemplateOrderAndLimit(ctol *ConditionTemplateOrderAndLimit) (condition.Condition, record.Record, sort.OrderBy, int64, error)
ToConditionTemplateOrderAndLimit converts a *ConditionTemplateOrderAndLimit to a condition.Condition, a record.Record, a sort.Order, and an int64.
func ToConditions ¶
func ToConditions(mc *ManyConditions) ([]condition.Condition, error)
ToConditions converts a *ManyConditions to a slice of condition.Conditions
func ToDatabaseNames ¶ added in v0.1.37
func ToDatabaseNames(dn *DatabaseNames) ([]string, error)
ToDatabaseNames converts a *DatabaseNames to a slice of strings.
func ToDirection ¶
ToDirection converts a *Direction to a sort.Direction
func ToHasRecord ¶ added in v0.2.10
ToHasRecord converts a *HasRecord to a record.Record.
func ToInt64 ¶
func ToInt64(nr *NumberOfRecords) int64
ToInt64 converts a *NumberOfRecords to an int64.
func ToLHSLowerUpper ¶
func ToLHSLowerUpper(ul *LhsLowerUpper) (lhs string, lower interface{}, upper interface{}, err error)
ToLHSLowerUpper converts a *LhsLowerUpper to a string and a pair of interface{}s.
func ToLHSValues ¶
func ToLHSValues(m *LhsManyValues) (string, []interface{}, error)
ToLHSValues converts a *LhsManyValues to a string and a slice of interface{}s.
func ToLeafOp ¶
func ToLeafOp(op *LeafOperator) (*condition.LeafOp, error)
ToLeafOp converts a *LeafOperator to a *condition.LeafOp
func ToNameAndTemplate ¶
func ToNameAndTemplate(nt *NameAndTemplate) (string, record.Record, error)
ToNameAndTemplate converts a *NameAndTemplate to a string and a record.Record.
func ToSrcAndDst ¶ added in v0.1.29
func ToSrcAndDst(sd *SrcAndDstNames) (string, string)
ToSrcAndDst converts a *SrcAndDstNames to a pair of strings.
func ToTableNames ¶
func ToTableNames(tn *TableNames) ([]string, error)
ToTableNames converts a *TableNames to a slice of strings.
Types ¶
type Condition ¶
type Condition struct { Type Condition_CondType `protobuf:"varint,1,opt,name=type,proto3,enum=kvdb.Condition_CondType" json:"type,omitempty"` // The condition type // Types that are assignable to Value: // // *Condition_ManyConditionsValue // *Condition_LhsLowerUpperValue // *Condition_BoolValue // *Condition_LhsManyValuesValue // *Condition_LeafValue // *Condition_LhsBoolValue Value isCondition_Value `protobuf_oneof:"value"` // contains filtered or unexported fields }
Condition describes a condition
func FromCondition ¶
FromCondition converts a condition.Condition to a *Condition
func (*Condition) Descriptor
deprecated
func (*Condition) GetBoolValue ¶
func (*Condition) GetLeafValue ¶
func (x *Condition) GetLeafValue() *LeafOperator
func (*Condition) GetLhsBoolValue ¶
func (*Condition) GetLhsLowerUpperValue ¶
func (x *Condition) GetLhsLowerUpperValue() *LhsLowerUpper
func (*Condition) GetLhsManyValuesValue ¶
func (x *Condition) GetLhsManyValuesValue() *LhsManyValues
func (*Condition) GetManyConditionsValue ¶
func (x *Condition) GetManyConditionsValue() *ManyConditions
func (*Condition) GetType ¶
func (x *Condition) GetType() Condition_CondType
func (*Condition) ProtoMessage ¶
func (*Condition) ProtoMessage()
func (*Condition) ProtoReflect ¶ added in v0.1.31
func (x *Condition) ProtoReflect() protoreflect.Message
type ConditionAndReplacement ¶
type ConditionAndReplacement struct { Condition *Condition `protobuf:"bytes,1,opt,name=condition,proto3" json:"condition,omitempty"` // The condition to match against Replacement *Record `protobuf:"bytes,2,opt,name=replacement,proto3" json:"replacement,omitempty"` // The replacement values // contains filtered or unexported fields }
ConditionAndReplacement describes the condition to match against and the replacement values.
func FromConditionAndReplacement ¶
func FromConditionAndReplacement(cond condition.Condition, replacement record.Record) (*ConditionAndReplacement, error)
FromConditionAndReplacement converts a condition.Condition and a record.Record to a *ConditionAndReplacement
func (*ConditionAndReplacement) Descriptor
deprecated
func (*ConditionAndReplacement) Descriptor() ([]byte, []int)
Deprecated: Use ConditionAndReplacement.ProtoReflect.Descriptor instead.
func (*ConditionAndReplacement) GetCondition ¶
func (x *ConditionAndReplacement) GetCondition() *Condition
func (*ConditionAndReplacement) GetReplacement ¶
func (x *ConditionAndReplacement) GetReplacement() *Record
func (*ConditionAndReplacement) ProtoMessage ¶
func (*ConditionAndReplacement) ProtoMessage()
func (*ConditionAndReplacement) ProtoReflect ¶ added in v0.1.31
func (x *ConditionAndReplacement) ProtoReflect() protoreflect.Message
func (*ConditionAndReplacement) Reset ¶
func (x *ConditionAndReplacement) Reset()
func (*ConditionAndReplacement) String ¶
func (x *ConditionAndReplacement) String() string
type ConditionTemplateAndOrder ¶ added in v0.2.10
type ConditionTemplateAndOrder struct { Condition *Condition `protobuf:"bytes,1,opt,name=condition,proto3" json:"condition,omitempty"` // The condition to match against Template *Record `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"` // A template for the returned records Order *OrderBy `protobuf:"bytes,3,opt,name=order,proto3" json:"order,omitempty"` // The sort order // contains filtered or unexported fields }
ConditionTemplateAndOrder is the argument for a SelectOneWhere task.
func FromConditionTemplateAndOrder ¶ added in v0.2.10
func FromConditionTemplateAndOrder(cond condition.Condition, template record.Record, order sort.OrderBy) (*ConditionTemplateAndOrder, error)
FromConditionTemplateAndOrder converts a condition.Condition, a record.Record, and a sort.Order to a *ConditionTemplateAndOrder.
func (*ConditionTemplateAndOrder) Descriptor
deprecated
added in
v0.2.10
func (*ConditionTemplateAndOrder) Descriptor() ([]byte, []int)
Deprecated: Use ConditionTemplateAndOrder.ProtoReflect.Descriptor instead.
func (*ConditionTemplateAndOrder) GetCondition ¶ added in v0.2.10
func (x *ConditionTemplateAndOrder) GetCondition() *Condition
func (*ConditionTemplateAndOrder) GetOrder ¶ added in v0.2.10
func (x *ConditionTemplateAndOrder) GetOrder() *OrderBy
func (*ConditionTemplateAndOrder) GetTemplate ¶ added in v0.2.10
func (x *ConditionTemplateAndOrder) GetTemplate() *Record
func (*ConditionTemplateAndOrder) ProtoMessage ¶ added in v0.2.10
func (*ConditionTemplateAndOrder) ProtoMessage()
func (*ConditionTemplateAndOrder) ProtoReflect ¶ added in v0.2.10
func (x *ConditionTemplateAndOrder) ProtoReflect() protoreflect.Message
func (*ConditionTemplateAndOrder) Reset ¶ added in v0.2.10
func (x *ConditionTemplateAndOrder) Reset()
func (*ConditionTemplateAndOrder) String ¶ added in v0.2.10
func (x *ConditionTemplateAndOrder) String() string
type ConditionTemplateOrderAndLimit ¶
type ConditionTemplateOrderAndLimit struct { Condition *Condition `protobuf:"bytes,1,opt,name=condition,proto3" json:"condition,omitempty"` // The condition to match against Template *Record `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"` // A template for the returned records Order *OrderBy `protobuf:"bytes,3,opt,name=order,proto3" json:"order,omitempty"` // The sort order Limit int64 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` // Limit the number of records to return (a // contains filtered or unexported fields }
ConditionTemplateOrderAndLimit is the argument for a SelectWhereLimit task.
func FromConditionTemplateOrderAndLimit ¶
func FromConditionTemplateOrderAndLimit(cond condition.Condition, template record.Record, order sort.OrderBy, limit int64) (*ConditionTemplateOrderAndLimit, error)
FromConditionTemplateOrderAndLimit converts a condition.Condition, a record.Record, a sort.Order, and an int64 to a *ConditionTemplateOrderAndLimit.
func (*ConditionTemplateOrderAndLimit) Descriptor
deprecated
func (*ConditionTemplateOrderAndLimit) Descriptor() ([]byte, []int)
Deprecated: Use ConditionTemplateOrderAndLimit.ProtoReflect.Descriptor instead.
func (*ConditionTemplateOrderAndLimit) GetCondition ¶
func (x *ConditionTemplateOrderAndLimit) GetCondition() *Condition
func (*ConditionTemplateOrderAndLimit) GetLimit ¶
func (x *ConditionTemplateOrderAndLimit) GetLimit() int64
func (*ConditionTemplateOrderAndLimit) GetOrder ¶
func (x *ConditionTemplateOrderAndLimit) GetOrder() *OrderBy
func (*ConditionTemplateOrderAndLimit) GetTemplate ¶
func (x *ConditionTemplateOrderAndLimit) GetTemplate() *Record
func (*ConditionTemplateOrderAndLimit) ProtoMessage ¶
func (*ConditionTemplateOrderAndLimit) ProtoMessage()
func (*ConditionTemplateOrderAndLimit) ProtoReflect ¶ added in v0.1.31
func (x *ConditionTemplateOrderAndLimit) ProtoReflect() protoreflect.Message
func (*ConditionTemplateOrderAndLimit) Reset ¶
func (x *ConditionTemplateOrderAndLimit) Reset()
func (*ConditionTemplateOrderAndLimit) String ¶
func (x *ConditionTemplateOrderAndLimit) String() string
type Condition_BoolValue ¶
type Condition_BoolValue struct {
BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof"`
}
type Condition_CondType ¶
type Condition_CondType int32
CondType enumerates the possible condition types
const ( Condition_UNDEFINED Condition_CondType = 0 // Illegal value Condition_AND Condition_CondType = 1 // An AND operator Condition_BETWEEN Condition_CondType = 2 // A BETWEEN operator Condition_BOOL Condition_CondType = 3 // True or False Condition_IN Condition_CondType = 4 // An IN operator Condition_LEAF Condition_CondType = 5 // An operator of the form "lhs op rhs"; see below Condition_NOTBETWEEN Condition_CondType = 6 // A NOT BETWEEN operator Condition_NOTIN Condition_CondType = 7 // A NOT IN operator Condition_OR Condition_CondType = 8 // An OR operator Condition_IS Condition_CondType = 9 // An IS operator )
func (Condition_CondType) Descriptor ¶ added in v0.1.31
func (Condition_CondType) Descriptor() protoreflect.EnumDescriptor
func (Condition_CondType) Enum ¶ added in v0.1.31
func (x Condition_CondType) Enum() *Condition_CondType
func (Condition_CondType) EnumDescriptor
deprecated
func (Condition_CondType) EnumDescriptor() ([]byte, []int)
Deprecated: Use Condition_CondType.Descriptor instead.
func (Condition_CondType) Number ¶ added in v0.1.31
func (x Condition_CondType) Number() protoreflect.EnumNumber
func (Condition_CondType) String ¶
func (x Condition_CondType) String() string
func (Condition_CondType) Type ¶ added in v0.1.31
func (Condition_CondType) Type() protoreflect.EnumType
type Condition_LeafValue ¶
type Condition_LeafValue struct {
LeafValue *LeafOperator `protobuf:"bytes,6,opt,name=leaf_value,json=leafValue,proto3,oneof"`
}
type Condition_LhsBoolValue ¶
type Condition_LhsBoolValue struct {
LhsBoolValue *LhsBool `protobuf:"bytes,7,opt,name=lhs_bool_value,json=lhsBoolValue,proto3,oneof"`
}
type Condition_LhsLowerUpperValue ¶
type Condition_LhsLowerUpperValue struct {
LhsLowerUpperValue *LhsLowerUpper `protobuf:"bytes,3,opt,name=lhs_lower_upper_value,json=lhsLowerUpperValue,proto3,oneof"`
}
type Condition_LhsManyValuesValue ¶
type Condition_LhsManyValuesValue struct {
LhsManyValuesValue *LhsManyValues `protobuf:"bytes,5,opt,name=lhs_many_values_value,json=lhsManyValuesValue,proto3,oneof"`
}
type Condition_ManyConditionsValue ¶
type Condition_ManyConditionsValue struct {
ManyConditionsValue *ManyConditions `protobuf:"bytes,2,opt,name=many_conditions_value,json=manyConditionsValue,proto3,oneof"`
}
type DatabaseNames ¶ added in v0.1.37
type DatabaseNames struct { Name []string `protobuf:"bytes,1,rep,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
DatabaseNames encodes a list of database names.
func (*DatabaseNames) Descriptor
deprecated
added in
v0.1.37
func (*DatabaseNames) Descriptor() ([]byte, []int)
Deprecated: Use DatabaseNames.ProtoReflect.Descriptor instead.
func (*DatabaseNames) GetName ¶ added in v0.1.37
func (x *DatabaseNames) GetName() []string
func (*DatabaseNames) ProtoMessage ¶ added in v0.1.37
func (*DatabaseNames) ProtoMessage()
func (*DatabaseNames) ProtoReflect ¶ added in v0.1.37
func (x *DatabaseNames) ProtoReflect() protoreflect.Message
func (*DatabaseNames) Reset ¶ added in v0.1.37
func (x *DatabaseNames) Reset()
func (*DatabaseNames) String ¶ added in v0.1.37
func (x *DatabaseNames) String() string
type Direction ¶
type Direction struct { Direction bool `protobuf:"varint,1,opt,name=direction,proto3" json:"direction,omitempty"` // contains filtered or unexported fields }
Direction represents a direction for a sort order
func FromDirection ¶
FromDirection converts a sort.Direction to a *Direction
func (*Direction) Descriptor
deprecated
func (*Direction) GetDirection ¶
func (*Direction) ProtoMessage ¶
func (*Direction) ProtoMessage()
func (*Direction) ProtoReflect ¶ added in v0.1.31
func (x *Direction) ProtoReflect() protoreflect.Message
type HasRecord ¶ added in v0.2.10
type HasRecord struct { HasRecord bool `protobuf:"varint,1,opt,name=has_record,json=hasRecord,proto3" json:"has_record,omitempty"` // Is there a record? Record *Record `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` // The associated record // contains filtered or unexported fields }
HasRecord allows for the possibility of no record to return, for example after performing a SelectOne query.
func FromHasRecord ¶ added in v0.2.10
FromHasRecord converts a record.Record to a *HasRecord
func (*HasRecord) Descriptor
deprecated
added in
v0.2.10
func (*HasRecord) GetHasRecord ¶ added in v0.2.10
func (*HasRecord) ProtoMessage ¶ added in v0.2.10
func (*HasRecord) ProtoMessage()
func (*HasRecord) ProtoReflect ¶ added in v0.2.10
func (x *HasRecord) ProtoReflect() protoreflect.Message
type Index ¶
type Index struct { Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` // contains filtered or unexported fields }
Index describes the name of an index.
func (*Index) Descriptor
deprecated
func (*Index) ProtoMessage ¶
func (*Index) ProtoMessage()
func (*Index) ProtoReflect ¶ added in v0.1.31
func (x *Index) ProtoReflect() protoreflect.Message
type IndexList ¶
type IndexList struct { List []*Index `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` // contains filtered or unexported fields }
IndexList is a list of indices.
func FromIndices ¶
FromIndices converts a slice of strings to a *IndexList.
func (*IndexList) Descriptor
deprecated
func (*IndexList) ProtoMessage ¶
func (*IndexList) ProtoMessage()
func (*IndexList) ProtoReflect ¶ added in v0.1.31
func (x *IndexList) ProtoReflect() protoreflect.Message
type Key ¶ added in v0.1.29
type Key struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
Key describes a key.
func (*Key) Descriptor
deprecated
added in
v0.1.29
func (*Key) ProtoMessage ¶ added in v0.1.29
func (*Key) ProtoMessage()
func (*Key) ProtoReflect ¶ added in v0.1.31
func (x *Key) ProtoReflect() protoreflect.Message
type KeyList ¶ added in v0.1.29
type KeyList struct { List []*Key `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` // contains filtered or unexported fields }
KeyList is a list of keys.
func (*KeyList) Descriptor
deprecated
added in
v0.1.29
func (*KeyList) ProtoMessage ¶ added in v0.1.29
func (*KeyList) ProtoMessage()
func (*KeyList) ProtoReflect ¶ added in v0.1.31
func (x *KeyList) ProtoReflect() protoreflect.Message
type KvdbClient ¶
type KvdbClient interface { // ListDatabases returns the available databases. ListDatabases(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*DatabaseNames, error) // ListTables returns the tables in the database. // Note that 'db_name' must be set. ListTables(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TableNames, error) // CreateTable creates a table with the given name and template. // Note that 'db_name' must be set. CreateTable(ctx context.Context, in *NameAndTemplate, opts ...grpc.CallOption) (*emptypb.Empty, error) // DeleteTable deletes the table with the given name. // Note that 'db_name' must be set. DeleteTable(ctx context.Context, in *Name, opts ...grpc.CallOption) (*emptypb.Empty, error) // RenameTable changes the name of a table in the database. // Note that 'db_name' must be set. RenameTable(ctx context.Context, in *SrcAndDstNames, opts ...grpc.CallOption) (*emptypb.Empty, error) // DescribeTable returns a best-guess template for the data in the table. // Note that 'db_name' and 'table_name' must be set. DescribeTable(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Record, error) // CountWhere returns the number of records in the table that match the // given condition. // Note that 'db_name' and 'table_name' must be set. CountWhere(ctx context.Context, in *Condition, opts ...grpc.CallOption) (*NumberOfRecords, error) // Insert inserts the records from stream into the table. // Note that 'db_name' and 'table_name' must be set. Insert(ctx context.Context, opts ...grpc.CallOption) (Kvdb_InsertClient, error) // UpdateWhere updates all records in the table that match the given // condition by setting all keys present in the given record to the // corresponding values. Returns the number of records updated. // Note that 'db_name' and 'table_name' must be set. UpdateWhere(ctx context.Context, in *ConditionAndReplacement, opts ...grpc.CallOption) (*NumberOfRecords, error) // SelectWhereLimit returns a stream of records matching the given // condition. The returned records will be in the form specified by the // given template. If the given limit is non-negative then at most that // many records will be returned. // Note that 'db_name' and 'table_name' must be set. SelectWhereLimit(ctx context.Context, in *ConditionTemplateOrderAndLimit, opts ...grpc.CallOption) (Kvdb_SelectWhereLimitClient, error) // SelectOneWhere returns zero or one records, encoded in a HasRecord, // matching the given condition. The returned record will be in the form // specified by the given template. // Note that 'db_name' and 'table_name' must be set. SelectOneWhere(ctx context.Context, in *ConditionTemplateAndOrder, opts ...grpc.CallOption) (*HasRecord, error) // DeleteWhere deletes those records in the table that match the given // condition. Returns the number of records deleted. // Note that 'db_name' and 'table_name' must be set. DeleteWhere(ctx context.Context, in *Condition, opts ...grpc.CallOption) (*NumberOfRecords, error) // AddIndex adds an index on the given key. // Note that 'db_name' and 'table_name' must be set. AddIndex(ctx context.Context, in *Index, opts ...grpc.CallOption) (*emptypb.Empty, error) // DeleteIndex deletes the index on the given key. // Note that 'db_name' and 'table_name' must be set. DeleteIndex(ctx context.Context, in *Index, opts ...grpc.CallOption) (*emptypb.Empty, error) // ListIndices lists the keys for which indices are present. // Note that 'db_name' and 'table_name' must be set. ListIndices(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*IndexList, error) // AddKeys updates each record r in the table, adding any keys in the given // record that are not already present along with the corresponding values. // Any keys that are already present in r will be left unmodified. // Note that 'db_name' and 'table_name' must be set. AddKeys(ctx context.Context, in *Record, opts ...grpc.CallOption) (*emptypb.Empty, error) // DeleteKeys updates all records in the table, deleting the specified keys // if present. // Note that 'db_name' and 'table_name' must be set. DeleteKeys(ctx context.Context, in *KeyList, opts ...grpc.CallOption) (*emptypb.Empty, error) // DeleteDatabase deletes the database 'db_name' DeleteDatabase(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) // CreateDatabase creates the database 'db_name' CreateDatabase(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) }
KvdbClient is the client API for Kvdb 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 NewKvdbClient ¶
func NewKvdbClient(cc grpc.ClientConnInterface) KvdbClient
type KvdbServer ¶
type KvdbServer interface { // ListDatabases returns the available databases. ListDatabases(context.Context, *emptypb.Empty) (*DatabaseNames, error) // ListTables returns the tables in the database. // Note that 'db_name' must be set. ListTables(context.Context, *emptypb.Empty) (*TableNames, error) // CreateTable creates a table with the given name and template. // Note that 'db_name' must be set. CreateTable(context.Context, *NameAndTemplate) (*emptypb.Empty, error) // DeleteTable deletes the table with the given name. // Note that 'db_name' must be set. DeleteTable(context.Context, *Name) (*emptypb.Empty, error) // RenameTable changes the name of a table in the database. // Note that 'db_name' must be set. RenameTable(context.Context, *SrcAndDstNames) (*emptypb.Empty, error) // DescribeTable returns a best-guess template for the data in the table. // Note that 'db_name' and 'table_name' must be set. DescribeTable(context.Context, *emptypb.Empty) (*Record, error) // CountWhere returns the number of records in the table that match the // given condition. // Note that 'db_name' and 'table_name' must be set. CountWhere(context.Context, *Condition) (*NumberOfRecords, error) // Insert inserts the records from stream into the table. // Note that 'db_name' and 'table_name' must be set. Insert(Kvdb_InsertServer) error // UpdateWhere updates all records in the table that match the given // condition by setting all keys present in the given record to the // corresponding values. Returns the number of records updated. // Note that 'db_name' and 'table_name' must be set. UpdateWhere(context.Context, *ConditionAndReplacement) (*NumberOfRecords, error) // SelectWhereLimit returns a stream of records matching the given // condition. The returned records will be in the form specified by the // given template. If the given limit is non-negative then at most that // many records will be returned. // Note that 'db_name' and 'table_name' must be set. SelectWhereLimit(*ConditionTemplateOrderAndLimit, Kvdb_SelectWhereLimitServer) error // SelectOneWhere returns zero or one records, encoded in a HasRecord, // matching the given condition. The returned record will be in the form // specified by the given template. // Note that 'db_name' and 'table_name' must be set. SelectOneWhere(context.Context, *ConditionTemplateAndOrder) (*HasRecord, error) // DeleteWhere deletes those records in the table that match the given // condition. Returns the number of records deleted. // Note that 'db_name' and 'table_name' must be set. DeleteWhere(context.Context, *Condition) (*NumberOfRecords, error) // AddIndex adds an index on the given key. // Note that 'db_name' and 'table_name' must be set. AddIndex(context.Context, *Index) (*emptypb.Empty, error) // DeleteIndex deletes the index on the given key. // Note that 'db_name' and 'table_name' must be set. DeleteIndex(context.Context, *Index) (*emptypb.Empty, error) // ListIndices lists the keys for which indices are present. // Note that 'db_name' and 'table_name' must be set. ListIndices(context.Context, *emptypb.Empty) (*IndexList, error) // AddKeys updates each record r in the table, adding any keys in the given // record that are not already present along with the corresponding values. // Any keys that are already present in r will be left unmodified. // Note that 'db_name' and 'table_name' must be set. AddKeys(context.Context, *Record) (*emptypb.Empty, error) // DeleteKeys updates all records in the table, deleting the specified keys // if present. // Note that 'db_name' and 'table_name' must be set. DeleteKeys(context.Context, *KeyList) (*emptypb.Empty, error) // DeleteDatabase deletes the database 'db_name' DeleteDatabase(context.Context, *emptypb.Empty) (*emptypb.Empty, error) // CreateDatabase creates the database 'db_name' CreateDatabase(context.Context, *emptypb.Empty) (*emptypb.Empty, error) // contains filtered or unexported methods }
KvdbServer is the server API for Kvdb service. All implementations must embed UnimplementedKvdbServer for forward compatibility
type Kvdb_InsertClient ¶
type Kvdb_InsertServer ¶
type Kvdb_SelectWhereLimitClient ¶
type Kvdb_SelectWhereLimitClient interface { Recv() (*Record, error) grpc.ClientStream }
type Kvdb_SelectWhereLimitServer ¶
type Kvdb_SelectWhereLimitServer interface { Send(*Record) error grpc.ServerStream }
type LeafOperator ¶
type LeafOperator struct { Lhs string `protobuf:"bytes,1,opt,name=lhs,proto3" json:"lhs,omitempty"` Opcode LeafOperator_LeafType `protobuf:"varint,2,opt,name=opcode,proto3,enum=kvdb.LeafOperator_LeafType" json:"opcode,omitempty"` Rhs *Value `protobuf:"bytes,3,opt,name=rhs,proto3" json:"rhs,omitempty"` // contains filtered or unexported fields }
LeafOperator represents an operator of the form "lhs op rhs" where lhs is a key and rhs is a value.
func FromLeafOp ¶
func FromLeafOp(c *condition.LeafOp) (*LeafOperator, error)
FromLeafOp converts a *condition.LeafOp to a *LeafOperator
func (*LeafOperator) Descriptor
deprecated
func (*LeafOperator) Descriptor() ([]byte, []int)
Deprecated: Use LeafOperator.ProtoReflect.Descriptor instead.
func (*LeafOperator) GetLhs ¶
func (x *LeafOperator) GetLhs() string
func (*LeafOperator) GetOpcode ¶
func (x *LeafOperator) GetOpcode() LeafOperator_LeafType
func (*LeafOperator) GetRhs ¶
func (x *LeafOperator) GetRhs() *Value
func (*LeafOperator) ProtoMessage ¶
func (*LeafOperator) ProtoMessage()
func (*LeafOperator) ProtoReflect ¶ added in v0.1.31
func (x *LeafOperator) ProtoReflect() protoreflect.Message
func (*LeafOperator) Reset ¶
func (x *LeafOperator) Reset()
func (*LeafOperator) String ¶
func (x *LeafOperator) String() string
type LeafOperator_LeafType ¶
type LeafOperator_LeafType int32
LeafType enumerates the possible leaf operators
const ( LeafOperator_UNDEFINED LeafOperator_LeafType = 0 LeafOperator_EQ LeafOperator_LeafType = 1 // equality LeafOperator_NE LeafOperator_LeafType = 2 // not equal to LeafOperator_GT LeafOperator_LeafType = 3 // greater than LeafOperator_LT LeafOperator_LeafType = 4 // less than LeafOperator_GE LeafOperator_LeafType = 5 // greater than or equal to LeafOperator_LE LeafOperator_LeafType = 6 // less than or equal to )
func (LeafOperator_LeafType) Descriptor ¶ added in v0.1.31
func (LeafOperator_LeafType) Descriptor() protoreflect.EnumDescriptor
func (LeafOperator_LeafType) Enum ¶ added in v0.1.31
func (x LeafOperator_LeafType) Enum() *LeafOperator_LeafType
func (LeafOperator_LeafType) EnumDescriptor
deprecated
func (LeafOperator_LeafType) EnumDescriptor() ([]byte, []int)
Deprecated: Use LeafOperator_LeafType.Descriptor instead.
func (LeafOperator_LeafType) Number ¶ added in v0.1.31
func (x LeafOperator_LeafType) Number() protoreflect.EnumNumber
func (LeafOperator_LeafType) String ¶
func (x LeafOperator_LeafType) String() string
func (LeafOperator_LeafType) Type ¶ added in v0.1.31
func (LeafOperator_LeafType) Type() protoreflect.EnumType
type LhsBool ¶
type LhsBool struct { Lhs string `protobuf:"bytes,1,opt,name=lhs,proto3" json:"lhs,omitempty"` BoolValue bool `protobuf:"varint,2,opt,name=bool_value,json=boolValue,proto3" json:"bool_value,omitempty"` // contains filtered or unexported fields }
LhsBool represents an IS condition
func FromLHSBool ¶
FromLHSBool converts a string and a slice of interface{} to a *LhsBool
func (*LhsBool) Descriptor
deprecated
func (*LhsBool) GetBoolValue ¶
func (*LhsBool) ProtoMessage ¶
func (*LhsBool) ProtoMessage()
func (*LhsBool) ProtoReflect ¶ added in v0.1.31
func (x *LhsBool) ProtoReflect() protoreflect.Message
type LhsLowerUpper ¶
type LhsLowerUpper struct { Lhs string `protobuf:"bytes,1,opt,name=lhs,proto3" json:"lhs,omitempty"` Lower *Value `protobuf:"bytes,2,opt,name=lower,proto3" json:"lower,omitempty"` Upper *Value `protobuf:"bytes,3,opt,name=upper,proto3" json:"upper,omitempty"` // contains filtered or unexported fields }
LhsLowerUpper represents a BETWEEN or NOT BETWEEN condition
func FromLHSLowerUpper ¶
func FromLHSLowerUpper(lhs string, lower interface{}, upper interface{}) (*LhsLowerUpper, error)
FromLHSLowerUpper converts a string and a pair of interface{}s to a *LhsLowerUpper
func (*LhsLowerUpper) Descriptor
deprecated
func (*LhsLowerUpper) Descriptor() ([]byte, []int)
Deprecated: Use LhsLowerUpper.ProtoReflect.Descriptor instead.
func (*LhsLowerUpper) GetLhs ¶
func (x *LhsLowerUpper) GetLhs() string
func (*LhsLowerUpper) GetLower ¶
func (x *LhsLowerUpper) GetLower() *Value
func (*LhsLowerUpper) GetUpper ¶
func (x *LhsLowerUpper) GetUpper() *Value
func (*LhsLowerUpper) ProtoMessage ¶
func (*LhsLowerUpper) ProtoMessage()
func (*LhsLowerUpper) ProtoReflect ¶ added in v0.1.31
func (x *LhsLowerUpper) ProtoReflect() protoreflect.Message
func (*LhsLowerUpper) Reset ¶
func (x *LhsLowerUpper) Reset()
func (*LhsLowerUpper) String ¶
func (x *LhsLowerUpper) String() string
type LhsManyValues ¶
type LhsManyValues struct { Lhs string `protobuf:"bytes,1,opt,name=lhs,proto3" json:"lhs,omitempty"` Value []*Value `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
LhsManyValues represents an IN or NOT IN condition
func FromLHSValues ¶
func FromLHSValues(lhs string, vs []interface{}) (*LhsManyValues, error)
FromLHSValues converts a string and a slice of interface{} to a *LhsManyValues
func (*LhsManyValues) Descriptor
deprecated
func (*LhsManyValues) Descriptor() ([]byte, []int)
Deprecated: Use LhsManyValues.ProtoReflect.Descriptor instead.
func (*LhsManyValues) GetLhs ¶
func (x *LhsManyValues) GetLhs() string
func (*LhsManyValues) GetValue ¶
func (x *LhsManyValues) GetValue() []*Value
func (*LhsManyValues) ProtoMessage ¶
func (*LhsManyValues) ProtoMessage()
func (*LhsManyValues) ProtoReflect ¶ added in v0.1.31
func (x *LhsManyValues) ProtoReflect() protoreflect.Message
func (*LhsManyValues) Reset ¶
func (x *LhsManyValues) Reset()
func (*LhsManyValues) String ¶
func (x *LhsManyValues) String() string
type ManyConditions ¶
type ManyConditions struct { Cond []*Condition `protobuf:"bytes,1,rep,name=cond,proto3" json:"cond,omitempty"` // contains filtered or unexported fields }
ManyConditions represents a sequence of conditions
func FromConditions ¶
func FromConditions(cs []condition.Condition) (*ManyConditions, error)
FromConditions converts a slice of condition.Conditions to a *ManyConditions
func (*ManyConditions) Descriptor
deprecated
func (*ManyConditions) Descriptor() ([]byte, []int)
Deprecated: Use ManyConditions.ProtoReflect.Descriptor instead.
func (*ManyConditions) GetCond ¶
func (x *ManyConditions) GetCond() []*Condition
func (*ManyConditions) ProtoMessage ¶
func (*ManyConditions) ProtoMessage()
func (*ManyConditions) ProtoReflect ¶ added in v0.1.31
func (x *ManyConditions) ProtoReflect() protoreflect.Message
func (*ManyConditions) Reset ¶
func (x *ManyConditions) Reset()
func (*ManyConditions) String ¶
func (x *ManyConditions) String() string
type Name ¶
type Name struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Name describes the name of a table.
func (*Name) Descriptor
deprecated
func (*Name) ProtoMessage ¶
func (*Name) ProtoMessage()
func (*Name) ProtoReflect ¶ added in v0.1.31
func (x *Name) ProtoReflect() protoreflect.Message
type NameAndTemplate ¶
type NameAndTemplate struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Template *Record `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"` // contains filtered or unexported fields }
NameAndTemplate describes the name and template for a table.
func FromNameAndTemplate ¶
func FromNameAndTemplate(name string, template record.Record) (*NameAndTemplate, error)
FromNameAndTemplate converts a string and a record.Record to a *NameAndTemplate.
func (*NameAndTemplate) Descriptor
deprecated
func (*NameAndTemplate) Descriptor() ([]byte, []int)
Deprecated: Use NameAndTemplate.ProtoReflect.Descriptor instead.
func (*NameAndTemplate) GetName ¶
func (x *NameAndTemplate) GetName() string
func (*NameAndTemplate) GetTemplate ¶
func (x *NameAndTemplate) GetTemplate() *Record
func (*NameAndTemplate) ProtoMessage ¶
func (*NameAndTemplate) ProtoMessage()
func (*NameAndTemplate) ProtoReflect ¶ added in v0.1.31
func (x *NameAndTemplate) ProtoReflect() protoreflect.Message
func (*NameAndTemplate) Reset ¶
func (x *NameAndTemplate) Reset()
func (*NameAndTemplate) String ¶
func (x *NameAndTemplate) String() string
type NumberOfRecords ¶
type NumberOfRecords struct { N int64 `protobuf:"varint,1,opt,name=n,proto3" json:"n,omitempty"` // The number of matching records // contains filtered or unexported fields }
NumberOfRecords is the result of performing a task whose result is the number of records.
func FromInt64 ¶
func FromInt64(n int64) *NumberOfRecords
FromInt64 converts an int64 to a *NumberOfRecords.
func (*NumberOfRecords) Descriptor
deprecated
func (*NumberOfRecords) Descriptor() ([]byte, []int)
Deprecated: Use NumberOfRecords.ProtoReflect.Descriptor instead.
func (*NumberOfRecords) GetN ¶
func (x *NumberOfRecords) GetN() int64
func (*NumberOfRecords) ProtoMessage ¶
func (*NumberOfRecords) ProtoMessage()
func (*NumberOfRecords) ProtoReflect ¶ added in v0.1.31
func (x *NumberOfRecords) ProtoReflect() protoreflect.Message
func (*NumberOfRecords) Reset ¶
func (x *NumberOfRecords) Reset()
func (*NumberOfRecords) String ¶
func (x *NumberOfRecords) String() string
type Order ¶
type Order struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Direction *Direction `protobuf:"bytes,2,opt,name=direction,proto3" json:"direction,omitempty"` // contains filtered or unexported fields }
Order represents a sort order
func (*Order) Descriptor
deprecated
func (*Order) GetDirection ¶
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) ProtoReflect ¶ added in v0.1.31
func (x *Order) ProtoReflect() protoreflect.Message
type OrderBy ¶
type OrderBy struct { Order []*Order `protobuf:"bytes,1,rep,name=order,proto3" json:"order,omitempty"` // contains filtered or unexported fields }
OrderBy represents a sequence of sort orders
func FromOrderBy ¶
FromOrderBy converts a sort.OrderBy to a *OrderBy.
func (*OrderBy) Descriptor
deprecated
func (*OrderBy) ProtoMessage ¶
func (*OrderBy) ProtoMessage()
func (*OrderBy) ProtoReflect ¶ added in v0.1.31
func (x *OrderBy) ProtoReflect() protoreflect.Message
type Record ¶
type Record struct { Values map[string]*Value `` // The map of record keys to values /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
Record is the type defining a record in a table. The keys of the map are the keys of the record, and the values of the map are the values of the record.
func FromRecord ¶
FromRecord converts a record.Record to a *Record.
func (*Record) Descriptor
deprecated
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) ProtoReflect ¶ added in v0.1.31
func (x *Record) ProtoReflect() protoreflect.Message
type SrcAndDstNames ¶ added in v0.1.29
type SrcAndDstNames struct { Src string `protobuf:"bytes,1,opt,name=src,proto3" json:"src,omitempty"` Dst string `protobuf:"bytes,2,opt,name=dst,proto3" json:"dst,omitempty"` // contains filtered or unexported fields }
SrcAndDstNames describes a pair of table names.
func FromSrcAndDst ¶ added in v0.1.29
func FromSrcAndDst(src string, dst string) *SrcAndDstNames
FromSrcAndDst converts a pair of strings to a *SrcAndDstNames.
func (*SrcAndDstNames) Descriptor
deprecated
added in
v0.1.29
func (*SrcAndDstNames) Descriptor() ([]byte, []int)
Deprecated: Use SrcAndDstNames.ProtoReflect.Descriptor instead.
func (*SrcAndDstNames) GetDst ¶ added in v0.1.29
func (x *SrcAndDstNames) GetDst() string
func (*SrcAndDstNames) GetSrc ¶ added in v0.1.29
func (x *SrcAndDstNames) GetSrc() string
func (*SrcAndDstNames) ProtoMessage ¶ added in v0.1.29
func (*SrcAndDstNames) ProtoMessage()
func (*SrcAndDstNames) ProtoReflect ¶ added in v0.1.31
func (x *SrcAndDstNames) ProtoReflect() protoreflect.Message
func (*SrcAndDstNames) Reset ¶ added in v0.1.29
func (x *SrcAndDstNames) Reset()
func (*SrcAndDstNames) String ¶ added in v0.1.29
func (x *SrcAndDstNames) String() string
type TableNames ¶
type TableNames struct { Name []string `protobuf:"bytes,1,rep,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
TableNames encodes a list of table names.
func (*TableNames) Descriptor
deprecated
func (*TableNames) Descriptor() ([]byte, []int)
Deprecated: Use TableNames.ProtoReflect.Descriptor instead.
func (*TableNames) GetName ¶
func (x *TableNames) GetName() []string
func (*TableNames) ProtoMessage ¶
func (*TableNames) ProtoMessage()
func (*TableNames) ProtoReflect ¶ added in v0.1.31
func (x *TableNames) ProtoReflect() protoreflect.Message
func (*TableNames) Reset ¶
func (x *TableNames) Reset()
func (*TableNames) String ¶
func (x *TableNames) String() string
type UnimplementedKvdbServer ¶
type UnimplementedKvdbServer struct { }
UnimplementedKvdbServer must be embedded to have forward compatible implementations.
func (UnimplementedKvdbServer) CountWhere ¶
func (UnimplementedKvdbServer) CountWhere(context.Context, *Condition) (*NumberOfRecords, error)
func (UnimplementedKvdbServer) CreateDatabase ¶ added in v0.2.8
func (UnimplementedKvdbServer) CreateTable ¶
func (UnimplementedKvdbServer) CreateTable(context.Context, *NameAndTemplate) (*emptypb.Empty, error)
func (UnimplementedKvdbServer) DeleteDatabase ¶ added in v0.2.8
func (UnimplementedKvdbServer) DeleteIndex ¶
func (UnimplementedKvdbServer) DeleteKeys ¶ added in v0.1.29
func (UnimplementedKvdbServer) DeleteTable ¶
func (UnimplementedKvdbServer) DeleteWhere ¶
func (UnimplementedKvdbServer) DeleteWhere(context.Context, *Condition) (*NumberOfRecords, error)
func (UnimplementedKvdbServer) DescribeTable ¶
func (UnimplementedKvdbServer) Insert ¶
func (UnimplementedKvdbServer) Insert(Kvdb_InsertServer) error
func (UnimplementedKvdbServer) ListDatabases ¶ added in v0.1.37
func (UnimplementedKvdbServer) ListDatabases(context.Context, *emptypb.Empty) (*DatabaseNames, error)
func (UnimplementedKvdbServer) ListIndices ¶
func (UnimplementedKvdbServer) ListTables ¶
func (UnimplementedKvdbServer) ListTables(context.Context, *emptypb.Empty) (*TableNames, error)
func (UnimplementedKvdbServer) RenameTable ¶ added in v0.1.29
func (UnimplementedKvdbServer) RenameTable(context.Context, *SrcAndDstNames) (*emptypb.Empty, error)
func (UnimplementedKvdbServer) SelectOneWhere ¶ added in v0.2.10
func (UnimplementedKvdbServer) SelectOneWhere(context.Context, *ConditionTemplateAndOrder) (*HasRecord, error)
func (UnimplementedKvdbServer) SelectWhereLimit ¶
func (UnimplementedKvdbServer) SelectWhereLimit(*ConditionTemplateOrderAndLimit, Kvdb_SelectWhereLimitServer) error
func (UnimplementedKvdbServer) UpdateWhere ¶
func (UnimplementedKvdbServer) UpdateWhere(context.Context, *ConditionAndReplacement) (*NumberOfRecords, error)
type UnsafeKvdbServer ¶ added in v0.1.31
type UnsafeKvdbServer interface {
// contains filtered or unexported methods
}
UnsafeKvdbServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to KvdbServer will result in compilation errors.
type Value ¶
type Value struct { Type Value_Type `protobuf:"varint,1,opt,name=type,proto3,enum=kvdb.Value_Type" json:"type,omitempty"` // The value type // Types that are assignable to Value: // // *Value_Int32Value // *Value_Int64Value // *Value_Uint32Value // *Value_Uint64Value // *Value_BoolValue // *Value_DoubleValue // *Value_StringValue // *Value_BytesValue Value isValue_Value `protobuf_oneof:"value"` // contains filtered or unexported fields }
Value describes a value in a record.
func (*Value) Descriptor
deprecated
func (*Value) GetBoolValue ¶
func (*Value) GetBytesValue ¶
func (*Value) GetDoubleValue ¶
func (*Value) GetInt32Value ¶
func (*Value) GetInt64Value ¶
func (*Value) GetStringValue ¶
func (*Value) GetType ¶
func (x *Value) GetType() Value_Type
func (*Value) GetUint32Value ¶
func (*Value) GetUint64Value ¶
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
func (*Value) ProtoReflect ¶ added in v0.1.31
func (x *Value) ProtoReflect() protoreflect.Message
type Value_BoolValue ¶
type Value_BoolValue struct {
BoolValue bool `protobuf:"varint,6,opt,name=bool_value,json=boolValue,proto3,oneof"` // BOOL
}
type Value_BytesValue ¶
type Value_BytesValue struct {
BytesValue []byte `protobuf:"bytes,9,opt,name=bytes_value,json=bytesValue,proto3,oneof"` // BYTESLICE
}
type Value_DoubleValue ¶
type Value_DoubleValue struct {
DoubleValue float64 `protobuf:"fixed64,7,opt,name=double_value,json=doubleValue,proto3,oneof"` // FLOAT64
}
type Value_Int32Value ¶
type Value_Int32Value struct {
Int32Value int32 `protobuf:"varint,2,opt,name=int32_value,json=int32Value,proto3,oneof"` // INT8, INT16, INT32
}
type Value_Int64Value ¶
type Value_Int64Value struct {
Int64Value int64 `protobuf:"varint,3,opt,name=int64_value,json=int64Value,proto3,oneof"` // INT, INT64
}
type Value_StringValue ¶
type Value_StringValue struct {
StringValue string `protobuf:"bytes,8,opt,name=string_value,json=stringValue,proto3,oneof"` // STRING
}
type Value_Type ¶
type Value_Type int32
Type enumerates the possible value types
const ( Value_UNDEFINED Value_Type = 0 // Illegal value Value_INT Value_Type = 1 // A signed integer (at most 64-bit) Value_INT8 Value_Type = 2 // 8-bit signed integer Value_INT16 Value_Type = 3 // 16-bit signed integer Value_INT32 Value_Type = 4 // 32-bit signed integer Value_INT64 Value_Type = 5 // 64-bit signed integer Value_UINT Value_Type = 6 // An unsigned integer (at most 64-bit) Value_UINT8 Value_Type = 7 // 8-bit unsigned integer Value_UINT16 Value_Type = 8 // 16-bit unsigned integer Value_UINT32 Value_Type = 9 // 32-bit unsigned integer Value_UINT64 Value_Type = 10 // 64-bit unsigned integer Value_BOOL Value_Type = 11 // Boolean value Value_FLOAT64 Value_Type = 12 // 64-bit float Value_STRING Value_Type = 13 // String value Value_BYTESLICE Value_Type = 14 // An array of bytes (e.g. byte[...]) )
func (Value_Type) Descriptor ¶ added in v0.1.31
func (Value_Type) Descriptor() protoreflect.EnumDescriptor
func (Value_Type) Enum ¶ added in v0.1.31
func (x Value_Type) Enum() *Value_Type
func (Value_Type) EnumDescriptor
deprecated
func (Value_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use Value_Type.Descriptor instead.
func (Value_Type) Number ¶ added in v0.1.31
func (x Value_Type) Number() protoreflect.EnumNumber
func (Value_Type) String ¶
func (x Value_Type) String() string
func (Value_Type) Type ¶ added in v0.1.31
func (Value_Type) Type() protoreflect.EnumType
type Value_Uint32Value ¶
type Value_Uint32Value struct {
Uint32Value uint32 `protobuf:"varint,4,opt,name=uint32_value,json=uint32Value,proto3,oneof"` // UINT8, UINT16, UINT32
}
type Value_Uint64Value ¶
type Value_Uint64Value struct {
Uint64Value uint64 `protobuf:"varint,5,opt,name=uint64_value,json=uint64Value,proto3,oneof"` // UINT, UINT64
}