Documentation
¶
Index ¶
- Variables
- func RegisterKvdbServer(s *grpc.Server, 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 ToConditionTemplateOrderAndLimit(ctol *ConditionTemplateOrderAndLimit) (condition.Condition, record.Record, sort.OrderBy, int64, error)
- func ToConditions(mc *ManyConditions) ([]condition.Condition, error)
- func ToDirection(d *Direction) sort.Direction
- 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)
- func (m *Condition) GetBoolValue() bool
- func (m *Condition) GetLeafValue() *LeafOperator
- func (m *Condition) GetLhsBoolValue() *LhsBool
- func (m *Condition) GetLhsLowerUpperValue() *LhsLowerUpper
- func (m *Condition) GetLhsManyValuesValue() *LhsManyValues
- func (m *Condition) GetManyConditionsValue() *ManyConditions
- func (m *Condition) GetType() Condition_CondType
- func (m *Condition) GetValue() isCondition_Value
- func (*Condition) ProtoMessage()
- func (m *Condition) Reset()
- func (m *Condition) String() string
- func (m *Condition) XXX_DiscardUnknown()
- func (m *Condition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Condition) XXX_Merge(src proto.Message)
- func (*Condition) XXX_OneofWrappers() []interface{}
- func (m *Condition) XXX_Size() int
- func (m *Condition) XXX_Unmarshal(b []byte) error
- type ConditionAndReplacement
- func (*ConditionAndReplacement) Descriptor() ([]byte, []int)
- func (m *ConditionAndReplacement) GetCondition() *Condition
- func (m *ConditionAndReplacement) GetReplacement() *Record
- func (*ConditionAndReplacement) ProtoMessage()
- func (m *ConditionAndReplacement) Reset()
- func (m *ConditionAndReplacement) String() string
- func (m *ConditionAndReplacement) XXX_DiscardUnknown()
- func (m *ConditionAndReplacement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConditionAndReplacement) XXX_Merge(src proto.Message)
- func (m *ConditionAndReplacement) XXX_Size() int
- func (m *ConditionAndReplacement) XXX_Unmarshal(b []byte) error
- type ConditionTemplateOrderAndLimit
- func (*ConditionTemplateOrderAndLimit) Descriptor() ([]byte, []int)
- func (m *ConditionTemplateOrderAndLimit) GetCondition() *Condition
- func (m *ConditionTemplateOrderAndLimit) GetLimit() int64
- func (m *ConditionTemplateOrderAndLimit) GetOrder() *OrderBy
- func (m *ConditionTemplateOrderAndLimit) GetTemplate() *Record
- func (*ConditionTemplateOrderAndLimit) ProtoMessage()
- func (m *ConditionTemplateOrderAndLimit) Reset()
- func (m *ConditionTemplateOrderAndLimit) String() string
- func (m *ConditionTemplateOrderAndLimit) XXX_DiscardUnknown()
- func (m *ConditionTemplateOrderAndLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConditionTemplateOrderAndLimit) XXX_Merge(src proto.Message)
- func (m *ConditionTemplateOrderAndLimit) XXX_Size() int
- func (m *ConditionTemplateOrderAndLimit) XXX_Unmarshal(b []byte) error
- type Condition_BoolValue
- type Condition_CondType
- type Condition_LeafValue
- type Condition_LhsBoolValue
- type Condition_LhsLowerUpperValue
- type Condition_LhsManyValuesValue
- type Condition_ManyConditionsValue
- type Direction
- func (*Direction) Descriptor() ([]byte, []int)
- func (m *Direction) GetDirection() bool
- func (*Direction) ProtoMessage()
- func (m *Direction) Reset()
- func (m *Direction) String() string
- func (m *Direction) XXX_DiscardUnknown()
- func (m *Direction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Direction) XXX_Merge(src proto.Message)
- func (m *Direction) XXX_Size() int
- func (m *Direction) XXX_Unmarshal(b []byte) error
- type Index
- func (*Index) Descriptor() ([]byte, []int)
- func (m *Index) GetIndex() string
- func (*Index) ProtoMessage()
- func (m *Index) Reset()
- func (m *Index) String() string
- func (m *Index) XXX_DiscardUnknown()
- func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Index) XXX_Merge(src proto.Message)
- func (m *Index) XXX_Size() int
- func (m *Index) XXX_Unmarshal(b []byte) error
- type IndexList
- func (*IndexList) Descriptor() ([]byte, []int)
- func (m *IndexList) GetList() []*Index
- func (*IndexList) ProtoMessage()
- func (m *IndexList) Reset()
- func (m *IndexList) String() string
- func (m *IndexList) XXX_DiscardUnknown()
- func (m *IndexList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IndexList) XXX_Merge(src proto.Message)
- func (m *IndexList) XXX_Size() int
- func (m *IndexList) XXX_Unmarshal(b []byte) error
- type Key
- func (*Key) Descriptor() ([]byte, []int)
- func (m *Key) GetKey() string
- func (*Key) ProtoMessage()
- func (m *Key) Reset()
- func (m *Key) String() string
- func (m *Key) XXX_DiscardUnknown()
- func (m *Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Key) XXX_Merge(src proto.Message)
- func (m *Key) XXX_Size() int
- func (m *Key) XXX_Unmarshal(b []byte) error
- type KeyList
- func (*KeyList) Descriptor() ([]byte, []int)
- func (m *KeyList) GetList() []*Key
- func (*KeyList) ProtoMessage()
- func (m *KeyList) Reset()
- func (m *KeyList) String() string
- func (m *KeyList) XXX_DiscardUnknown()
- func (m *KeyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *KeyList) XXX_Merge(src proto.Message)
- func (m *KeyList) XXX_Size() int
- func (m *KeyList) XXX_Unmarshal(b []byte) error
- type KvdbClient
- type KvdbServer
- type Kvdb_InsertClient
- type Kvdb_InsertServer
- type Kvdb_SelectWhereLimitClient
- type Kvdb_SelectWhereLimitServer
- type LeafOperator
- func (*LeafOperator) Descriptor() ([]byte, []int)
- func (m *LeafOperator) GetLhs() string
- func (m *LeafOperator) GetOpcode() LeafOperator_LeafType
- func (m *LeafOperator) GetRhs() *Value
- func (*LeafOperator) ProtoMessage()
- func (m *LeafOperator) Reset()
- func (m *LeafOperator) String() string
- func (m *LeafOperator) XXX_DiscardUnknown()
- func (m *LeafOperator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LeafOperator) XXX_Merge(src proto.Message)
- func (m *LeafOperator) XXX_Size() int
- func (m *LeafOperator) XXX_Unmarshal(b []byte) error
- type LeafOperator_LeafType
- type LhsBool
- func (*LhsBool) Descriptor() ([]byte, []int)
- func (m *LhsBool) GetBoolValue() bool
- func (m *LhsBool) GetLhs() string
- func (*LhsBool) ProtoMessage()
- func (m *LhsBool) Reset()
- func (m *LhsBool) String() string
- func (m *LhsBool) XXX_DiscardUnknown()
- func (m *LhsBool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LhsBool) XXX_Merge(src proto.Message)
- func (m *LhsBool) XXX_Size() int
- func (m *LhsBool) XXX_Unmarshal(b []byte) error
- type LhsLowerUpper
- func (*LhsLowerUpper) Descriptor() ([]byte, []int)
- func (m *LhsLowerUpper) GetLhs() string
- func (m *LhsLowerUpper) GetLower() *Value
- func (m *LhsLowerUpper) GetUpper() *Value
- func (*LhsLowerUpper) ProtoMessage()
- func (m *LhsLowerUpper) Reset()
- func (m *LhsLowerUpper) String() string
- func (m *LhsLowerUpper) XXX_DiscardUnknown()
- func (m *LhsLowerUpper) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LhsLowerUpper) XXX_Merge(src proto.Message)
- func (m *LhsLowerUpper) XXX_Size() int
- func (m *LhsLowerUpper) XXX_Unmarshal(b []byte) error
- type LhsManyValues
- func (*LhsManyValues) Descriptor() ([]byte, []int)
- func (m *LhsManyValues) GetLhs() string
- func (m *LhsManyValues) GetValue() []*Value
- func (*LhsManyValues) ProtoMessage()
- func (m *LhsManyValues) Reset()
- func (m *LhsManyValues) String() string
- func (m *LhsManyValues) XXX_DiscardUnknown()
- func (m *LhsManyValues) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LhsManyValues) XXX_Merge(src proto.Message)
- func (m *LhsManyValues) XXX_Size() int
- func (m *LhsManyValues) XXX_Unmarshal(b []byte) error
- type ManyConditions
- func (*ManyConditions) Descriptor() ([]byte, []int)
- func (m *ManyConditions) GetCond() []*Condition
- func (*ManyConditions) ProtoMessage()
- func (m *ManyConditions) Reset()
- func (m *ManyConditions) String() string
- func (m *ManyConditions) XXX_DiscardUnknown()
- func (m *ManyConditions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ManyConditions) XXX_Merge(src proto.Message)
- func (m *ManyConditions) XXX_Size() int
- func (m *ManyConditions) XXX_Unmarshal(b []byte) error
- type Name
- func (*Name) Descriptor() ([]byte, []int)
- func (m *Name) GetName() string
- func (*Name) ProtoMessage()
- func (m *Name) Reset()
- func (m *Name) String() string
- func (m *Name) XXX_DiscardUnknown()
- func (m *Name) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Name) XXX_Merge(src proto.Message)
- func (m *Name) XXX_Size() int
- func (m *Name) XXX_Unmarshal(b []byte) error
- type NameAndTemplate
- func (*NameAndTemplate) Descriptor() ([]byte, []int)
- func (m *NameAndTemplate) GetName() string
- func (m *NameAndTemplate) GetTemplate() *Record
- func (*NameAndTemplate) ProtoMessage()
- func (m *NameAndTemplate) Reset()
- func (m *NameAndTemplate) String() string
- func (m *NameAndTemplate) XXX_DiscardUnknown()
- func (m *NameAndTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NameAndTemplate) XXX_Merge(src proto.Message)
- func (m *NameAndTemplate) XXX_Size() int
- func (m *NameAndTemplate) XXX_Unmarshal(b []byte) error
- type NumberOfRecords
- func (*NumberOfRecords) Descriptor() ([]byte, []int)
- func (m *NumberOfRecords) GetN() int64
- func (*NumberOfRecords) ProtoMessage()
- func (m *NumberOfRecords) Reset()
- func (m *NumberOfRecords) String() string
- func (m *NumberOfRecords) XXX_DiscardUnknown()
- func (m *NumberOfRecords) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NumberOfRecords) XXX_Merge(src proto.Message)
- func (m *NumberOfRecords) XXX_Size() int
- func (m *NumberOfRecords) XXX_Unmarshal(b []byte) error
- type Order
- func (*Order) Descriptor() ([]byte, []int)
- func (m *Order) GetDirection() *Direction
- func (m *Order) GetKey() string
- func (*Order) ProtoMessage()
- func (m *Order) Reset()
- func (m *Order) String() string
- func (m *Order) XXX_DiscardUnknown()
- func (m *Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Order) XXX_Merge(src proto.Message)
- func (m *Order) XXX_Size() int
- func (m *Order) XXX_Unmarshal(b []byte) error
- type OrderBy
- func (*OrderBy) Descriptor() ([]byte, []int)
- func (m *OrderBy) GetOrder() []*Order
- func (*OrderBy) ProtoMessage()
- func (m *OrderBy) Reset()
- func (m *OrderBy) String() string
- func (m *OrderBy) XXX_DiscardUnknown()
- func (m *OrderBy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *OrderBy) XXX_Merge(src proto.Message)
- func (m *OrderBy) XXX_Size() int
- func (m *OrderBy) XXX_Unmarshal(b []byte) error
- type Record
- func (*Record) Descriptor() ([]byte, []int)
- func (m *Record) GetValues() map[string]*Value
- func (*Record) ProtoMessage()
- func (m *Record) Reset()
- func (m *Record) String() string
- func (m *Record) XXX_DiscardUnknown()
- func (m *Record) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Record) XXX_Merge(src proto.Message)
- func (m *Record) XXX_Size() int
- func (m *Record) XXX_Unmarshal(b []byte) error
- type SrcAndDstNames
- func (*SrcAndDstNames) Descriptor() ([]byte, []int)
- func (m *SrcAndDstNames) GetDst() string
- func (m *SrcAndDstNames) GetSrc() string
- func (*SrcAndDstNames) ProtoMessage()
- func (m *SrcAndDstNames) Reset()
- func (m *SrcAndDstNames) String() string
- func (m *SrcAndDstNames) XXX_DiscardUnknown()
- func (m *SrcAndDstNames) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SrcAndDstNames) XXX_Merge(src proto.Message)
- func (m *SrcAndDstNames) XXX_Size() int
- func (m *SrcAndDstNames) XXX_Unmarshal(b []byte) error
- type TableNames
- func (*TableNames) Descriptor() ([]byte, []int)
- func (m *TableNames) GetName() []string
- func (*TableNames) ProtoMessage()
- func (m *TableNames) Reset()
- func (m *TableNames) String() string
- func (m *TableNames) XXX_DiscardUnknown()
- func (m *TableNames) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TableNames) XXX_Merge(src proto.Message)
- func (m *TableNames) XXX_Size() int
- func (m *TableNames) XXX_Unmarshal(b []byte) error
- type UnimplementedKvdbServer
- func (*UnimplementedKvdbServer) AddIndex(ctx context.Context, req *Index) (*emptypb.Empty, error)
- func (*UnimplementedKvdbServer) AddKeys(ctx context.Context, req *Record) (*emptypb.Empty, error)
- func (*UnimplementedKvdbServer) AddUniqueIndex(ctx context.Context, req *Index) (*emptypb.Empty, error)
- func (*UnimplementedKvdbServer) CountWhere(ctx context.Context, req *Condition) (*NumberOfRecords, error)
- func (*UnimplementedKvdbServer) CreateTable(ctx context.Context, req *NameAndTemplate) (*emptypb.Empty, error)
- func (*UnimplementedKvdbServer) DeleteIndex(ctx context.Context, req *Index) (*emptypb.Empty, error)
- func (*UnimplementedKvdbServer) DeleteKeys(ctx context.Context, req *KeyList) (*emptypb.Empty, error)
- func (*UnimplementedKvdbServer) DeleteTable(ctx context.Context, req *Name) (*emptypb.Empty, error)
- func (*UnimplementedKvdbServer) DeleteWhere(ctx context.Context, req *Condition) (*NumberOfRecords, error)
- func (*UnimplementedKvdbServer) DescribeTable(ctx context.Context, req *emptypb.Empty) (*Record, error)
- func (*UnimplementedKvdbServer) Insert(srv Kvdb_InsertServer) error
- func (*UnimplementedKvdbServer) ListIndices(ctx context.Context, req *emptypb.Empty) (*IndexList, error)
- func (*UnimplementedKvdbServer) ListTables(ctx context.Context, req *emptypb.Empty) (*TableNames, error)
- func (*UnimplementedKvdbServer) RenameTable(ctx context.Context, req *SrcAndDstNames) (*emptypb.Empty, error)
- func (*UnimplementedKvdbServer) SelectWhereLimit(req *ConditionTemplateOrderAndLimit, srv Kvdb_SelectWhereLimitServer) error
- func (*UnimplementedKvdbServer) UpdateWhere(ctx context.Context, req *ConditionAndReplacement) (*NumberOfRecords, error)
- type Value
- func (*Value) Descriptor() ([]byte, []int)
- func (m *Value) GetBoolValue() bool
- func (m *Value) GetBytesValue() []byte
- func (m *Value) GetDoubleValue() float64
- func (m *Value) GetInt32Value() int32
- func (m *Value) GetInt64Value() int64
- func (m *Value) GetStringValue() string
- func (m *Value) GetType() Value_Type
- func (m *Value) GetUint32Value() uint32
- func (m *Value) GetUint64Value() uint64
- func (m *Value) GetValue() isValue_Value
- func (*Value) ProtoMessage()
- func (m *Value) Reset()
- func (m *Value) String() string
- func (m *Value) XXX_DiscardUnknown()
- func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Value) XXX_Merge(src proto.Message)
- func (*Value) XXX_OneofWrappers() []interface{}
- func (m *Value) XXX_Size() int
- func (m *Value) XXX_Unmarshal(b []byte) error
- 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 ¶
This section is empty.
Variables ¶
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",
}
var 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,
}
var LeafOperator_LeafType_name = map[int32]string{
0: "UNDEFINED",
1: "EQ",
2: "NE",
3: "GT",
4: "LT",
5: "GE",
6: "LE",
}
var LeafOperator_LeafType_value = map[string]int32{
"UNDEFINED": 0,
"EQ": 1,
"NE": 2,
"GT": 3,
"LT": 4,
"GE": 5,
"LE": 6,
}
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",
}
var 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,
}
Functions ¶
func RegisterKvdbServer ¶
func RegisterKvdbServer(s *grpc.Server, 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 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 ToDirection ¶
ToDirection converts a *Direction to a sort.Direction
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"` // Types that are valid to be assigned to Value: // *Condition_ManyConditionsValue // *Condition_LhsLowerUpperValue // *Condition_BoolValue // *Condition_LhsManyValuesValue // *Condition_LeafValue // *Condition_LhsBoolValue Value isCondition_Value `protobuf_oneof:"value"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Condition describes a condition
func FromCondition ¶
FromCondition converts a condition.Condition to a *Condition
func (*Condition) Descriptor ¶
func (*Condition) GetBoolValue ¶
func (*Condition) GetLeafValue ¶
func (m *Condition) GetLeafValue() *LeafOperator
func (*Condition) GetLhsBoolValue ¶
func (*Condition) GetLhsLowerUpperValue ¶
func (m *Condition) GetLhsLowerUpperValue() *LhsLowerUpper
func (*Condition) GetLhsManyValuesValue ¶
func (m *Condition) GetLhsManyValuesValue() *LhsManyValues
func (*Condition) GetManyConditionsValue ¶
func (m *Condition) GetManyConditionsValue() *ManyConditions
func (*Condition) GetType ¶
func (m *Condition) GetType() Condition_CondType
func (*Condition) ProtoMessage ¶
func (*Condition) ProtoMessage()
func (*Condition) XXX_DiscardUnknown ¶
func (m *Condition) XXX_DiscardUnknown()
func (*Condition) XXX_Marshal ¶
func (*Condition) XXX_OneofWrappers ¶
func (*Condition) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Condition) XXX_Unmarshal ¶
type ConditionAndReplacement ¶
type ConditionAndReplacement struct { Condition *Condition `protobuf:"bytes,1,opt,name=condition,proto3" json:"condition,omitempty"` Replacement *Record `protobuf:"bytes,2,opt,name=replacement,proto3" json:"replacement,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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 ¶
func (*ConditionAndReplacement) Descriptor() ([]byte, []int)
func (*ConditionAndReplacement) GetCondition ¶
func (m *ConditionAndReplacement) GetCondition() *Condition
func (*ConditionAndReplacement) GetReplacement ¶
func (m *ConditionAndReplacement) GetReplacement() *Record
func (*ConditionAndReplacement) ProtoMessage ¶
func (*ConditionAndReplacement) ProtoMessage()
func (*ConditionAndReplacement) Reset ¶
func (m *ConditionAndReplacement) Reset()
func (*ConditionAndReplacement) String ¶
func (m *ConditionAndReplacement) String() string
func (*ConditionAndReplacement) XXX_DiscardUnknown ¶
func (m *ConditionAndReplacement) XXX_DiscardUnknown()
func (*ConditionAndReplacement) XXX_Marshal ¶
func (m *ConditionAndReplacement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConditionAndReplacement) XXX_Merge ¶
func (m *ConditionAndReplacement) XXX_Merge(src proto.Message)
func (*ConditionAndReplacement) XXX_Size ¶
func (m *ConditionAndReplacement) XXX_Size() int
func (*ConditionAndReplacement) XXX_Unmarshal ¶
func (m *ConditionAndReplacement) XXX_Unmarshal(b []byte) error
type ConditionTemplateOrderAndLimit ¶
type ConditionTemplateOrderAndLimit struct { Condition *Condition `protobuf:"bytes,1,opt,name=condition,proto3" json:"condition,omitempty"` Template *Record `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"` Order *OrderBy `protobuf:"bytes,3,opt,name=order,proto3" json:"order,omitempty"` Limit int64 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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 ¶
func (*ConditionTemplateOrderAndLimit) Descriptor() ([]byte, []int)
func (*ConditionTemplateOrderAndLimit) GetCondition ¶
func (m *ConditionTemplateOrderAndLimit) GetCondition() *Condition
func (*ConditionTemplateOrderAndLimit) GetLimit ¶
func (m *ConditionTemplateOrderAndLimit) GetLimit() int64
func (*ConditionTemplateOrderAndLimit) GetOrder ¶
func (m *ConditionTemplateOrderAndLimit) GetOrder() *OrderBy
func (*ConditionTemplateOrderAndLimit) GetTemplate ¶
func (m *ConditionTemplateOrderAndLimit) GetTemplate() *Record
func (*ConditionTemplateOrderAndLimit) ProtoMessage ¶
func (*ConditionTemplateOrderAndLimit) ProtoMessage()
func (*ConditionTemplateOrderAndLimit) Reset ¶
func (m *ConditionTemplateOrderAndLimit) Reset()
func (*ConditionTemplateOrderAndLimit) String ¶
func (m *ConditionTemplateOrderAndLimit) String() string
func (*ConditionTemplateOrderAndLimit) XXX_DiscardUnknown ¶
func (m *ConditionTemplateOrderAndLimit) XXX_DiscardUnknown()
func (*ConditionTemplateOrderAndLimit) XXX_Marshal ¶
func (m *ConditionTemplateOrderAndLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConditionTemplateOrderAndLimit) XXX_Merge ¶
func (m *ConditionTemplateOrderAndLimit) XXX_Merge(src proto.Message)
func (*ConditionTemplateOrderAndLimit) XXX_Size ¶
func (m *ConditionTemplateOrderAndLimit) XXX_Size() int
func (*ConditionTemplateOrderAndLimit) XXX_Unmarshal ¶
func (m *ConditionTemplateOrderAndLimit) XXX_Unmarshal(b []byte) error
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 Condition_AND Condition_CondType = 1 Condition_BETWEEN Condition_CondType = 2 Condition_BOOL Condition_CondType = 3 Condition_IN Condition_CondType = 4 Condition_LEAF Condition_CondType = 5 Condition_NOTBETWEEN Condition_CondType = 6 Condition_NOTIN Condition_CondType = 7 Condition_OR Condition_CondType = 8 Condition_IS Condition_CondType = 9 )
func (Condition_CondType) EnumDescriptor ¶
func (Condition_CondType) EnumDescriptor() ([]byte, []int)
func (Condition_CondType) String ¶
func (x Condition_CondType) String() string
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 Direction ¶
type Direction struct { Direction bool `protobuf:"varint,1,opt,name=direction,proto3" json:"direction,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Direction represents a direction for a sort order
func FromDirection ¶
FromDirection converts a sort.Direction to a *Direction
func (*Direction) Descriptor ¶
func (*Direction) GetDirection ¶
func (*Direction) ProtoMessage ¶
func (*Direction) ProtoMessage()
func (*Direction) XXX_DiscardUnknown ¶
func (m *Direction) XXX_DiscardUnknown()
func (*Direction) XXX_Marshal ¶
func (*Direction) XXX_Unmarshal ¶
type Index ¶
type Index struct { Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Index describes the name of an index.
func (*Index) Descriptor ¶
func (*Index) ProtoMessage ¶
func (*Index) ProtoMessage()
func (*Index) XXX_DiscardUnknown ¶
func (m *Index) XXX_DiscardUnknown()
func (*Index) XXX_Marshal ¶
func (*Index) XXX_Unmarshal ¶
type IndexList ¶
type IndexList struct { List []*Index `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
IndexList is a list of indices.
func FromIndices ¶
FromIndices converts a slice of strings to a *IndexList.
func (*IndexList) Descriptor ¶
func (*IndexList) ProtoMessage ¶
func (*IndexList) ProtoMessage()
func (*IndexList) XXX_DiscardUnknown ¶
func (m *IndexList) XXX_DiscardUnknown()
func (*IndexList) XXX_Marshal ¶
func (*IndexList) XXX_Unmarshal ¶
type Key ¶ added in v0.1.29
type Key struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Key describes a key.
func (*Key) Descriptor ¶ added in v0.1.29
func (*Key) ProtoMessage ¶ added in v0.1.29
func (*Key) ProtoMessage()
func (*Key) XXX_DiscardUnknown ¶ added in v0.1.29
func (m *Key) XXX_DiscardUnknown()
func (*Key) XXX_Marshal ¶ added in v0.1.29
func (*Key) XXX_Unmarshal ¶ added in v0.1.29
type KeyList ¶ added in v0.1.29
type KeyList struct { List []*Key `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
KeyList is a list of keys.
func (*KeyList) Descriptor ¶ added in v0.1.29
func (*KeyList) ProtoMessage ¶ added in v0.1.29
func (*KeyList) ProtoMessage()
func (*KeyList) XXX_DiscardUnknown ¶ added in v0.1.29
func (m *KeyList) XXX_DiscardUnknown()
func (*KeyList) XXX_Marshal ¶ added in v0.1.29
func (*KeyList) XXX_Unmarshal ¶ added in v0.1.29
type KvdbClient ¶
type KvdbClient interface { // ListTables returns the tables in the database. ListTables(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TableNames, error) // CreateTable creates a table with the given name and template. CreateTable(ctx context.Context, in *NameAndTemplate, opts ...grpc.CallOption) (*emptypb.Empty, error) // DescribeTable returns a best-guess template for the data in the table. DescribeTable(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Record, error) // DeleteTable deletes the table with the given name. DeleteTable(ctx context.Context, in *Name, opts ...grpc.CallOption) (*emptypb.Empty, error) // RenameTable changes the name of a table in the database. RenameTable(ctx context.Context, in *SrcAndDstNames, opts ...grpc.CallOption) (*emptypb.Empty, error) // CountWhere returns the number of records in the table that match the // given condition. CountWhere(ctx context.Context, in *Condition, opts ...grpc.CallOption) (*NumberOfRecords, error) // Insert inserts the records from stream into the table. 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. 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. SelectWhereLimit(ctx context.Context, in *ConditionTemplateOrderAndLimit, opts ...grpc.CallOption) (Kvdb_SelectWhereLimitClient, error) // DeleteWhere deletes those records in the table that match the given // condition. Returns the number of records deleted. DeleteWhere(ctx context.Context, in *Condition, opts ...grpc.CallOption) (*NumberOfRecords, error) // AddIndex adds an index on the given key. AddIndex(ctx context.Context, in *Index, opts ...grpc.CallOption) (*emptypb.Empty, error) // AddUniqueIndex adds an index on the given key and the constraint that, // for each value of this key, there is at most one record with that value. AddUniqueIndex(ctx context.Context, in *Index, opts ...grpc.CallOption) (*emptypb.Empty, error) // DeleteIndex deletes the index on the given key. DeleteIndex(ctx context.Context, in *Index, opts ...grpc.CallOption) (*emptypb.Empty, error) // ListIndices lists the keys for which indices are present. 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. 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. DeleteKeys(ctx context.Context, in *KeyList, 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://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewKvdbClient ¶
func NewKvdbClient(cc *grpc.ClientConn) KvdbClient
type KvdbServer ¶
type KvdbServer interface { // ListTables returns the tables in the database. ListTables(context.Context, *emptypb.Empty) (*TableNames, error) // CreateTable creates a table with the given name and template. CreateTable(context.Context, *NameAndTemplate) (*emptypb.Empty, error) // DescribeTable returns a best-guess template for the data in the table. DescribeTable(context.Context, *emptypb.Empty) (*Record, error) // DeleteTable deletes the table with the given name. DeleteTable(context.Context, *Name) (*emptypb.Empty, error) // RenameTable changes the name of a table in the database. RenameTable(context.Context, *SrcAndDstNames) (*emptypb.Empty, error) // CountWhere returns the number of records in the table that match the // given condition. CountWhere(context.Context, *Condition) (*NumberOfRecords, error) // Insert inserts the records from stream into the table. 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. 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. SelectWhereLimit(*ConditionTemplateOrderAndLimit, Kvdb_SelectWhereLimitServer) error // DeleteWhere deletes those records in the table that match the given // condition. Returns the number of records deleted. DeleteWhere(context.Context, *Condition) (*NumberOfRecords, error) // AddIndex adds an index on the given key. AddIndex(context.Context, *Index) (*emptypb.Empty, error) // AddUniqueIndex adds an index on the given key and the constraint that, // for each value of this key, there is at most one record with that value. AddUniqueIndex(context.Context, *Index) (*emptypb.Empty, error) // DeleteIndex deletes the index on the given key. DeleteIndex(context.Context, *Index) (*emptypb.Empty, error) // ListIndices lists the keys for which indices are present. 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. AddKeys(context.Context, *Record) (*emptypb.Empty, error) // DeleteKeys updates all records in the table, deleting the specified keys if // present. DeleteKeys(context.Context, *KeyList) (*emptypb.Empty, error) }
KvdbServer is the server API for Kvdb service.
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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 ¶
func (*LeafOperator) Descriptor() ([]byte, []int)
func (*LeafOperator) GetLhs ¶
func (m *LeafOperator) GetLhs() string
func (*LeafOperator) GetOpcode ¶
func (m *LeafOperator) GetOpcode() LeafOperator_LeafType
func (*LeafOperator) GetRhs ¶
func (m *LeafOperator) GetRhs() *Value
func (*LeafOperator) ProtoMessage ¶
func (*LeafOperator) ProtoMessage()
func (*LeafOperator) Reset ¶
func (m *LeafOperator) Reset()
func (*LeafOperator) String ¶
func (m *LeafOperator) String() string
func (*LeafOperator) XXX_DiscardUnknown ¶
func (m *LeafOperator) XXX_DiscardUnknown()
func (*LeafOperator) XXX_Marshal ¶
func (m *LeafOperator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LeafOperator) XXX_Merge ¶
func (m *LeafOperator) XXX_Merge(src proto.Message)
func (*LeafOperator) XXX_Size ¶
func (m *LeafOperator) XXX_Size() int
func (*LeafOperator) XXX_Unmarshal ¶
func (m *LeafOperator) XXX_Unmarshal(b []byte) error
type LeafOperator_LeafType ¶
type LeafOperator_LeafType int32
LeafType enumerates the possible leaf operators
const ( LeafOperator_UNDEFINED LeafOperator_LeafType = 0 LeafOperator_EQ LeafOperator_LeafType = 1 LeafOperator_NE LeafOperator_LeafType = 2 LeafOperator_GT LeafOperator_LeafType = 3 LeafOperator_LT LeafOperator_LeafType = 4 LeafOperator_GE LeafOperator_LeafType = 5 LeafOperator_LE LeafOperator_LeafType = 6 )
func (LeafOperator_LeafType) EnumDescriptor ¶
func (LeafOperator_LeafType) EnumDescriptor() ([]byte, []int)
func (LeafOperator_LeafType) String ¶
func (x LeafOperator_LeafType) String() string
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
LhsBool represents an IS condition
func FromLHSBool ¶
FromLHSBool converts a string and a slice of interface{} to a *LhsBool
func (*LhsBool) Descriptor ¶
func (*LhsBool) GetBoolValue ¶
func (*LhsBool) ProtoMessage ¶
func (*LhsBool) ProtoMessage()
func (*LhsBool) XXX_DiscardUnknown ¶
func (m *LhsBool) XXX_DiscardUnknown()
func (*LhsBool) XXX_Marshal ¶
func (*LhsBool) XXX_Unmarshal ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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 ¶
func (*LhsLowerUpper) Descriptor() ([]byte, []int)
func (*LhsLowerUpper) GetLhs ¶
func (m *LhsLowerUpper) GetLhs() string
func (*LhsLowerUpper) GetLower ¶
func (m *LhsLowerUpper) GetLower() *Value
func (*LhsLowerUpper) GetUpper ¶
func (m *LhsLowerUpper) GetUpper() *Value
func (*LhsLowerUpper) ProtoMessage ¶
func (*LhsLowerUpper) ProtoMessage()
func (*LhsLowerUpper) Reset ¶
func (m *LhsLowerUpper) Reset()
func (*LhsLowerUpper) String ¶
func (m *LhsLowerUpper) String() string
func (*LhsLowerUpper) XXX_DiscardUnknown ¶
func (m *LhsLowerUpper) XXX_DiscardUnknown()
func (*LhsLowerUpper) XXX_Marshal ¶
func (m *LhsLowerUpper) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LhsLowerUpper) XXX_Merge ¶
func (m *LhsLowerUpper) XXX_Merge(src proto.Message)
func (*LhsLowerUpper) XXX_Size ¶
func (m *LhsLowerUpper) XXX_Size() int
func (*LhsLowerUpper) XXX_Unmarshal ¶
func (m *LhsLowerUpper) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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 ¶
func (*LhsManyValues) Descriptor() ([]byte, []int)
func (*LhsManyValues) GetLhs ¶
func (m *LhsManyValues) GetLhs() string
func (*LhsManyValues) GetValue ¶
func (m *LhsManyValues) GetValue() []*Value
func (*LhsManyValues) ProtoMessage ¶
func (*LhsManyValues) ProtoMessage()
func (*LhsManyValues) Reset ¶
func (m *LhsManyValues) Reset()
func (*LhsManyValues) String ¶
func (m *LhsManyValues) String() string
func (*LhsManyValues) XXX_DiscardUnknown ¶
func (m *LhsManyValues) XXX_DiscardUnknown()
func (*LhsManyValues) XXX_Marshal ¶
func (m *LhsManyValues) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LhsManyValues) XXX_Merge ¶
func (m *LhsManyValues) XXX_Merge(src proto.Message)
func (*LhsManyValues) XXX_Size ¶
func (m *LhsManyValues) XXX_Size() int
func (*LhsManyValues) XXX_Unmarshal ¶
func (m *LhsManyValues) XXX_Unmarshal(b []byte) error
type ManyConditions ¶
type ManyConditions struct { Cond []*Condition `protobuf:"bytes,1,rep,name=cond,proto3" json:"cond,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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 ¶
func (*ManyConditions) Descriptor() ([]byte, []int)
func (*ManyConditions) GetCond ¶
func (m *ManyConditions) GetCond() []*Condition
func (*ManyConditions) ProtoMessage ¶
func (*ManyConditions) ProtoMessage()
func (*ManyConditions) Reset ¶
func (m *ManyConditions) Reset()
func (*ManyConditions) String ¶
func (m *ManyConditions) String() string
func (*ManyConditions) XXX_DiscardUnknown ¶
func (m *ManyConditions) XXX_DiscardUnknown()
func (*ManyConditions) XXX_Marshal ¶
func (m *ManyConditions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ManyConditions) XXX_Merge ¶
func (m *ManyConditions) XXX_Merge(src proto.Message)
func (*ManyConditions) XXX_Size ¶
func (m *ManyConditions) XXX_Size() int
func (*ManyConditions) XXX_Unmarshal ¶
func (m *ManyConditions) XXX_Unmarshal(b []byte) error
type Name ¶
type Name struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Name describes the name of a table.
func (*Name) Descriptor ¶
func (*Name) ProtoMessage ¶
func (*Name) ProtoMessage()
func (*Name) XXX_DiscardUnknown ¶
func (m *Name) XXX_DiscardUnknown()
func (*Name) XXX_Unmarshal ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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 ¶
func (*NameAndTemplate) Descriptor() ([]byte, []int)
func (*NameAndTemplate) GetName ¶
func (m *NameAndTemplate) GetName() string
func (*NameAndTemplate) GetTemplate ¶
func (m *NameAndTemplate) GetTemplate() *Record
func (*NameAndTemplate) ProtoMessage ¶
func (*NameAndTemplate) ProtoMessage()
func (*NameAndTemplate) Reset ¶
func (m *NameAndTemplate) Reset()
func (*NameAndTemplate) String ¶
func (m *NameAndTemplate) String() string
func (*NameAndTemplate) XXX_DiscardUnknown ¶
func (m *NameAndTemplate) XXX_DiscardUnknown()
func (*NameAndTemplate) XXX_Marshal ¶
func (m *NameAndTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*NameAndTemplate) XXX_Merge ¶
func (m *NameAndTemplate) XXX_Merge(src proto.Message)
func (*NameAndTemplate) XXX_Size ¶
func (m *NameAndTemplate) XXX_Size() int
func (*NameAndTemplate) XXX_Unmarshal ¶
func (m *NameAndTemplate) XXX_Unmarshal(b []byte) error
type NumberOfRecords ¶
type NumberOfRecords struct { N int64 `protobuf:"varint,1,opt,name=n,proto3" json:"n,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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 ¶
func (*NumberOfRecords) Descriptor() ([]byte, []int)
func (*NumberOfRecords) GetN ¶
func (m *NumberOfRecords) GetN() int64
func (*NumberOfRecords) ProtoMessage ¶
func (*NumberOfRecords) ProtoMessage()
func (*NumberOfRecords) Reset ¶
func (m *NumberOfRecords) Reset()
func (*NumberOfRecords) String ¶
func (m *NumberOfRecords) String() string
func (*NumberOfRecords) XXX_DiscardUnknown ¶
func (m *NumberOfRecords) XXX_DiscardUnknown()
func (*NumberOfRecords) XXX_Marshal ¶
func (m *NumberOfRecords) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*NumberOfRecords) XXX_Merge ¶
func (m *NumberOfRecords) XXX_Merge(src proto.Message)
func (*NumberOfRecords) XXX_Size ¶
func (m *NumberOfRecords) XXX_Size() int
func (*NumberOfRecords) XXX_Unmarshal ¶
func (m *NumberOfRecords) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Order represents a sort order
func (*Order) Descriptor ¶
func (*Order) GetDirection ¶
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) XXX_DiscardUnknown ¶
func (m *Order) XXX_DiscardUnknown()
func (*Order) XXX_Marshal ¶
func (*Order) XXX_Unmarshal ¶
type OrderBy ¶
type OrderBy struct { Order []*Order `protobuf:"bytes,1,rep,name=order,proto3" json:"order,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
OrderBy represents a sequence of sort orders
func FromOrderBy ¶
FromOrderBy converts a sort.OrderBy to a *OrderBy.
func (*OrderBy) Descriptor ¶
func (*OrderBy) ProtoMessage ¶
func (*OrderBy) ProtoMessage()
func (*OrderBy) XXX_DiscardUnknown ¶
func (m *OrderBy) XXX_DiscardUnknown()
func (*OrderBy) XXX_Marshal ¶
func (*OrderBy) XXX_Unmarshal ¶
type Record ¶
type Record struct { Values map[string]*Value `` /* 153-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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 ¶
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) XXX_DiscardUnknown ¶
func (m *Record) XXX_DiscardUnknown()
func (*Record) XXX_Marshal ¶
func (*Record) XXX_Unmarshal ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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 ¶ added in v0.1.29
func (*SrcAndDstNames) Descriptor() ([]byte, []int)
func (*SrcAndDstNames) GetDst ¶ added in v0.1.29
func (m *SrcAndDstNames) GetDst() string
func (*SrcAndDstNames) GetSrc ¶ added in v0.1.29
func (m *SrcAndDstNames) GetSrc() string
func (*SrcAndDstNames) ProtoMessage ¶ added in v0.1.29
func (*SrcAndDstNames) ProtoMessage()
func (*SrcAndDstNames) Reset ¶ added in v0.1.29
func (m *SrcAndDstNames) Reset()
func (*SrcAndDstNames) String ¶ added in v0.1.29
func (m *SrcAndDstNames) String() string
func (*SrcAndDstNames) XXX_DiscardUnknown ¶ added in v0.1.29
func (m *SrcAndDstNames) XXX_DiscardUnknown()
func (*SrcAndDstNames) XXX_Marshal ¶ added in v0.1.29
func (m *SrcAndDstNames) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SrcAndDstNames) XXX_Merge ¶ added in v0.1.29
func (m *SrcAndDstNames) XXX_Merge(src proto.Message)
func (*SrcAndDstNames) XXX_Size ¶ added in v0.1.29
func (m *SrcAndDstNames) XXX_Size() int
func (*SrcAndDstNames) XXX_Unmarshal ¶ added in v0.1.29
func (m *SrcAndDstNames) XXX_Unmarshal(b []byte) error
type TableNames ¶
type TableNames struct { Name []string `protobuf:"bytes,1,rep,name=name,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TableNames encodes a list of table names.
func (*TableNames) Descriptor ¶
func (*TableNames) Descriptor() ([]byte, []int)
func (*TableNames) GetName ¶
func (m *TableNames) GetName() []string
func (*TableNames) ProtoMessage ¶
func (*TableNames) ProtoMessage()
func (*TableNames) Reset ¶
func (m *TableNames) Reset()
func (*TableNames) String ¶
func (m *TableNames) String() string
func (*TableNames) XXX_DiscardUnknown ¶
func (m *TableNames) XXX_DiscardUnknown()
func (*TableNames) XXX_Marshal ¶
func (m *TableNames) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TableNames) XXX_Merge ¶
func (m *TableNames) XXX_Merge(src proto.Message)
func (*TableNames) XXX_Size ¶
func (m *TableNames) XXX_Size() int
func (*TableNames) XXX_Unmarshal ¶
func (m *TableNames) XXX_Unmarshal(b []byte) error
type UnimplementedKvdbServer ¶
type UnimplementedKvdbServer struct { }
UnimplementedKvdbServer can be embedded to have forward compatible implementations.
func (*UnimplementedKvdbServer) AddUniqueIndex ¶
func (*UnimplementedKvdbServer) CountWhere ¶
func (*UnimplementedKvdbServer) CountWhere(ctx context.Context, req *Condition) (*NumberOfRecords, error)
func (*UnimplementedKvdbServer) CreateTable ¶
func (*UnimplementedKvdbServer) CreateTable(ctx context.Context, req *NameAndTemplate) (*emptypb.Empty, error)
func (*UnimplementedKvdbServer) DeleteIndex ¶
func (*UnimplementedKvdbServer) DeleteKeys ¶ added in v0.1.29
func (*UnimplementedKvdbServer) DeleteTable ¶
func (*UnimplementedKvdbServer) DeleteWhere ¶
func (*UnimplementedKvdbServer) DeleteWhere(ctx context.Context, req *Condition) (*NumberOfRecords, error)
func (*UnimplementedKvdbServer) DescribeTable ¶
func (*UnimplementedKvdbServer) Insert ¶
func (*UnimplementedKvdbServer) Insert(srv Kvdb_InsertServer) error
func (*UnimplementedKvdbServer) ListIndices ¶
func (*UnimplementedKvdbServer) ListTables ¶
func (*UnimplementedKvdbServer) ListTables(ctx context.Context, req *emptypb.Empty) (*TableNames, error)
func (*UnimplementedKvdbServer) RenameTable ¶ added in v0.1.29
func (*UnimplementedKvdbServer) RenameTable(ctx context.Context, req *SrcAndDstNames) (*emptypb.Empty, error)
func (*UnimplementedKvdbServer) SelectWhereLimit ¶
func (*UnimplementedKvdbServer) SelectWhereLimit(req *ConditionTemplateOrderAndLimit, srv Kvdb_SelectWhereLimitServer) error
func (*UnimplementedKvdbServer) UpdateWhere ¶
func (*UnimplementedKvdbServer) UpdateWhere(ctx context.Context, req *ConditionAndReplacement) (*NumberOfRecords, error)
type Value ¶
type Value struct { Type Value_Type `protobuf:"varint,1,opt,name=type,proto3,enum=kvdb.Value_Type" json:"type,omitempty"` // Types that are valid to be assigned to Value: // *Value_Int32Value // *Value_Int64Value // *Value_Uint32Value // *Value_Uint64Value // *Value_BoolValue // *Value_DoubleValue // *Value_StringValue // *Value_BytesValue Value isValue_Value `protobuf_oneof:"value"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Value describes a value in a record.
func (*Value) Descriptor ¶
func (*Value) GetBoolValue ¶
func (*Value) GetBytesValue ¶
func (*Value) GetDoubleValue ¶
func (*Value) GetInt32Value ¶
func (*Value) GetInt64Value ¶
func (*Value) GetStringValue ¶
func (*Value) GetType ¶
func (m *Value) GetType() Value_Type
func (*Value) GetUint32Value ¶
func (*Value) GetUint64Value ¶
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
func (*Value) XXX_DiscardUnknown ¶
func (m *Value) XXX_DiscardUnknown()
func (*Value) XXX_Marshal ¶
func (*Value) XXX_OneofWrappers ¶
func (*Value) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Value) XXX_Unmarshal ¶
type Value_BoolValue ¶
type Value_BoolValue struct {
BoolValue bool `protobuf:"varint,6,opt,name=bool_value,json=boolValue,proto3,oneof"`
}
type Value_BytesValue ¶
type Value_BytesValue struct {
BytesValue []byte `protobuf:"bytes,9,opt,name=bytes_value,json=bytesValue,proto3,oneof"`
}
type Value_DoubleValue ¶
type Value_DoubleValue struct {
DoubleValue float64 `protobuf:"fixed64,7,opt,name=double_value,json=doubleValue,proto3,oneof"`
}
type Value_Int32Value ¶
type Value_Int32Value struct {
Int32Value int32 `protobuf:"varint,2,opt,name=int32_value,json=int32Value,proto3,oneof"`
}
type Value_Int64Value ¶
type Value_Int64Value struct {
Int64Value int64 `protobuf:"varint,3,opt,name=int64_value,json=int64Value,proto3,oneof"`
}
type Value_StringValue ¶
type Value_StringValue struct {
StringValue string `protobuf:"bytes,8,opt,name=string_value,json=stringValue,proto3,oneof"`
}
type Value_Type ¶
type Value_Type int32
Type enumerates the possible value types
const ( Value_UNDEFINED Value_Type = 0 Value_INT Value_Type = 1 Value_INT8 Value_Type = 2 Value_INT16 Value_Type = 3 Value_INT32 Value_Type = 4 Value_INT64 Value_Type = 5 Value_UINT Value_Type = 6 Value_UINT8 Value_Type = 7 Value_UINT16 Value_Type = 8 Value_UINT32 Value_Type = 9 Value_UINT64 Value_Type = 10 Value_BOOL Value_Type = 11 Value_FLOAT64 Value_Type = 12 Value_STRING Value_Type = 13 Value_BYTESLICE Value_Type = 14 )
func (Value_Type) EnumDescriptor ¶
func (Value_Type) EnumDescriptor() ([]byte, []int)
func (Value_Type) String ¶
func (x Value_Type) String() string
type Value_Uint32Value ¶
type Value_Uint32Value struct {
Uint32Value uint32 `protobuf:"varint,4,opt,name=uint32_value,json=uint32Value,proto3,oneof"`
}
type Value_Uint64Value ¶
type Value_Uint64Value struct {
Uint64Value uint64 `protobuf:"varint,5,opt,name=uint64_value,json=uint64Value,proto3,oneof"`
}