kvdbrpc

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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.

View Source
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.

View Source
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.

View Source
var File_condition_proto protoreflect.FileDescriptor
View Source
var File_value_proto protoreflect.FileDescriptor
View Source
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

func ScanRecord(dst record.Record, src *Record) error

ScanRecord scans the contents of "src" into "dst". Any previously set keys or values in "dst" will be deleted or overwritten.

func ToCondition

func ToCondition(c *Condition) (condition.Condition, error)

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

func ToDirection(d *Direction) sort.Direction

ToDirection converts a *Direction to a sort.Direction

func ToHasRecord added in v0.2.10

func ToHasRecord(hr *HasRecord) (record.Record, error)

ToHasRecord converts a *HasRecord to a record.Record.

func ToIndex

func ToIndex(idx *Index) string

ToIndex converts a *Index to a string.

func ToIndices

func ToIndices(il *IndexList) []string

ToIndices converts a *IndexList to a slice of strings.

func ToInt64

func ToInt64(nr *NumberOfRecords) int64

ToInt64 converts a *NumberOfRecords to an int64.

func ToKey added in v0.1.29

func ToKey(key *Key) string

ToKey converts a *Key to a string.

func ToKeys added in v0.1.29

func ToKeys(kl *KeyList) []string

ToKeys converts a *KeyList to a slice of strings.

func ToLHSBool

func ToLHSBool(m *LhsBool) (string, bool, error)

ToLHSBool converts a *LhsBool to a string and a bool.

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 ToName

func ToName(n *Name) string

ToName converts a *Name to a string.

func ToNameAndTemplate

func ToNameAndTemplate(nt *NameAndTemplate) (string, record.Record, error)

ToNameAndTemplate converts a *NameAndTemplate to a string and a record.Record.

func ToOrder

func ToOrder(s *Order) sort.Order

ToOrder converts a *Order to a sort.Order.

func ToOrderBy

func ToOrderBy(S *OrderBy) sort.OrderBy

ToOrderBy converts a *OrderBy to a sort.OrderBy.

func ToRecord

func ToRecord(r *Record) (record.Record, error)

ToRecord converts a *Record to 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

func FromCondition(c condition.Condition) (*Condition, error)

FromCondition converts a condition.Condition to a *Condition

func (*Condition) Descriptor deprecated

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

Deprecated: Use Condition.ProtoReflect.Descriptor instead.

func (*Condition) GetBoolValue

func (x *Condition) GetBoolValue() bool

func (*Condition) GetLeafValue

func (x *Condition) GetLeafValue() *LeafOperator

func (*Condition) GetLhsBoolValue

func (x *Condition) GetLhsBoolValue() *LhsBool

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) GetValue

func (m *Condition) GetValue() isCondition_Value

func (*Condition) ProtoMessage

func (*Condition) ProtoMessage()

func (*Condition) ProtoReflect added in v0.1.31

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

func (*Condition) Reset

func (x *Condition) Reset()

func (*Condition) String

func (x *Condition) String() string

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 (*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 (*ConditionTemplateOrderAndLimit) Reset

func (x *ConditionTemplateOrderAndLimit) Reset()

func (*ConditionTemplateOrderAndLimit) 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) Enum added in v0.1.31

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 (Condition_CondType) String

func (x Condition_CondType) String() string

func (Condition_CondType) Type added in v0.1.31

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

func FromDirection(d sort.Direction) *Direction

FromDirection converts a sort.Direction to a *Direction

func (*Direction) Descriptor deprecated

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

Deprecated: Use Direction.ProtoReflect.Descriptor instead.

func (*Direction) GetDirection

func (x *Direction) GetDirection() bool

func (*Direction) ProtoMessage

func (*Direction) ProtoMessage()

func (*Direction) ProtoReflect added in v0.1.31

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

func (*Direction) Reset

func (x *Direction) Reset()

func (*Direction) String

func (x *Direction) String() string

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

func FromHasRecord(r record.Record) (*HasRecord, error)

FromHasRecord converts a record.Record to a *HasRecord

func (*HasRecord) Descriptor deprecated added in v0.2.10

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

Deprecated: Use HasRecord.ProtoReflect.Descriptor instead.

func (*HasRecord) GetHasRecord added in v0.2.10

func (x *HasRecord) GetHasRecord() bool

func (*HasRecord) GetRecord added in v0.2.10

func (x *HasRecord) GetRecord() *Record

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

func (*HasRecord) Reset added in v0.2.10

func (x *HasRecord) Reset()

func (*HasRecord) String added in v0.2.10

func (x *HasRecord) String() string

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 FromIndex

func FromIndex(index string) *Index

FromIndex converts a string to a *Index.

func (*Index) Descriptor deprecated

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

Deprecated: Use Index.ProtoReflect.Descriptor instead.

func (*Index) GetIndex

func (x *Index) GetIndex() string

func (*Index) ProtoMessage

func (*Index) ProtoMessage()

func (*Index) ProtoReflect added in v0.1.31

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

func (*Index) Reset

func (x *Index) Reset()

func (*Index) String

func (x *Index) String() string

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

func FromIndices(indices []string) *IndexList

FromIndices converts a slice of strings to a *IndexList.

func (*IndexList) Descriptor deprecated

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

Deprecated: Use IndexList.ProtoReflect.Descriptor instead.

func (*IndexList) GetList

func (x *IndexList) GetList() []*Index

func (*IndexList) ProtoMessage

func (*IndexList) ProtoMessage()

func (*IndexList) ProtoReflect added in v0.1.31

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

func (*IndexList) Reset

func (x *IndexList) Reset()

func (*IndexList) String

func (x *IndexList) String() string

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 FromKey added in v0.1.29

func FromKey(key string) *Key

FromKey converts a string to a *Key.

func (*Key) Descriptor deprecated added in v0.1.29

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

Deprecated: Use Key.ProtoReflect.Descriptor instead.

func (*Key) GetKey added in v0.1.29

func (x *Key) GetKey() string

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

func (*Key) Reset added in v0.1.29

func (x *Key) Reset()

func (*Key) String added in v0.1.29

func (x *Key) String() string

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 FromKeys added in v0.1.29

func FromKeys(keys []string) *KeyList

FromKeys converts a slice of strings to a *KeyList.

func (*KeyList) Descriptor deprecated added in v0.1.29

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

Deprecated: Use KeyList.ProtoReflect.Descriptor instead.

func (*KeyList) GetList added in v0.1.29

func (x *KeyList) GetList() []*Key

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

func (*KeyList) Reset added in v0.1.29

func (x *KeyList) Reset()

func (*KeyList) String added in v0.1.29

func (x *KeyList) String() string

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.golang.ir/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_InsertClient interface {
	Send(*Record) error
	CloseAndRecv() (*emptypb.Empty, error)
	grpc.ClientStream
}

type Kvdb_InsertServer

type Kvdb_InsertServer interface {
	SendAndClose(*emptypb.Empty) error
	Recv() (*Record, error)
	grpc.ServerStream
}

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) Enum added in v0.1.31

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 (LeafOperator_LeafType) String

func (x LeafOperator_LeafType) String() string

func (LeafOperator_LeafType) Type added in v0.1.31

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

func FromLHSBool(lhs string, b bool) *LhsBool

FromLHSBool converts a string and a slice of interface{} to a *LhsBool

func (*LhsBool) Descriptor deprecated

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

Deprecated: Use LhsBool.ProtoReflect.Descriptor instead.

func (*LhsBool) GetBoolValue

func (x *LhsBool) GetBoolValue() bool

func (*LhsBool) GetLhs

func (x *LhsBool) GetLhs() string

func (*LhsBool) ProtoMessage

func (*LhsBool) ProtoMessage()

func (*LhsBool) ProtoReflect added in v0.1.31

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

func (*LhsBool) Reset

func (x *LhsBool) Reset()

func (*LhsBool) String

func (x *LhsBool) String() string

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 FromName

func FromName(name string) *Name

FromName converts a string to a *Name.

func (*Name) Descriptor deprecated

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

Deprecated: Use Name.ProtoReflect.Descriptor instead.

func (*Name) GetName

func (x *Name) GetName() string

func (*Name) ProtoMessage

func (*Name) ProtoMessage()

func (*Name) ProtoReflect added in v0.1.31

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

func (*Name) Reset

func (x *Name) Reset()

func (*Name) String

func (x *Name) String() string

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 FromOrder

func FromOrder(s sort.Order) *Order

FromOrder converts a sort.Order to a *Order.

func (*Order) Descriptor deprecated

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

Deprecated: Use Order.ProtoReflect.Descriptor instead.

func (*Order) GetDirection

func (x *Order) GetDirection() *Direction

func (*Order) GetKey

func (x *Order) GetKey() string

func (*Order) ProtoMessage

func (*Order) ProtoMessage()

func (*Order) ProtoReflect added in v0.1.31

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

func (*Order) Reset

func (x *Order) Reset()

func (*Order) String

func (x *Order) String() string

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

func FromOrderBy(S sort.OrderBy) *OrderBy

FromOrderBy converts a sort.OrderBy to a *OrderBy.

func (*OrderBy) Descriptor deprecated

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

Deprecated: Use OrderBy.ProtoReflect.Descriptor instead.

func (*OrderBy) GetOrder

func (x *OrderBy) GetOrder() []*Order

func (*OrderBy) ProtoMessage

func (*OrderBy) ProtoMessage()

func (*OrderBy) ProtoReflect added in v0.1.31

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

func (*OrderBy) Reset

func (x *OrderBy) Reset()

func (*OrderBy) String

func (x *OrderBy) String() string

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

func FromRecord(r record.Record) (*Record, error)

FromRecord converts a record.Record to a *Record.

func (*Record) Descriptor deprecated

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

Deprecated: Use Record.ProtoReflect.Descriptor instead.

func (*Record) GetValues

func (x *Record) GetValues() map[string]*Value

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) ProtoReflect added in v0.1.31

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

func (*Record) Reset

func (x *Record) Reset()

func (*Record) String

func (x *Record) String() string

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) AddIndex

func (UnimplementedKvdbServer) AddKeys added in v0.1.29

func (UnimplementedKvdbServer) CountWhere

func (UnimplementedKvdbServer) CreateDatabase added in v0.2.8

func (UnimplementedKvdbServer) CreateTable

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) DescribeTable

func (UnimplementedKvdbServer) Insert

func (UnimplementedKvdbServer) ListDatabases added in v0.1.37

func (UnimplementedKvdbServer) ListIndices

func (UnimplementedKvdbServer) ListTables

func (UnimplementedKvdbServer) RenameTable added in v0.1.29

func (UnimplementedKvdbServer) SelectOneWhere added in v0.2.10

func (UnimplementedKvdbServer) UpdateWhere

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) Descriptor() ([]byte, []int)

Deprecated: Use Value.ProtoReflect.Descriptor instead.

func (*Value) GetBoolValue

func (x *Value) GetBoolValue() bool

func (*Value) GetBytesValue

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

func (*Value) GetDoubleValue

func (x *Value) GetDoubleValue() float64

func (*Value) GetInt32Value

func (x *Value) GetInt32Value() int32

func (*Value) GetInt64Value

func (x *Value) GetInt64Value() int64

func (*Value) GetStringValue

func (x *Value) GetStringValue() string

func (*Value) GetType

func (x *Value) GetType() Value_Type

func (*Value) GetUint32Value

func (x *Value) GetUint32Value() uint32

func (*Value) GetUint64Value

func (x *Value) GetUint64Value() uint64

func (*Value) GetValue

func (m *Value) GetValue() isValue_Value

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) ProtoReflect added in v0.1.31

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

func (*Value) Reset

func (x *Value) Reset()

func (*Value) String

func (x *Value) String() string

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

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
}

Jump to

Keyboard shortcuts

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