Documentation
¶
Index ¶
- Variables
- type BinaryIndex
- func (f *BinaryIndex[V]) Asc() *OrderRule[V]
- func (f *BinaryIndex[V]) Desc() *OrderRule[V]
- func (f *BinaryIndex[V]) GreaterThan(v []byte) *GreaterThanCond[V]
- func (f *BinaryIndex[V]) GreaterThanOrEqual(v []byte) *GreaterThanOrEqualCond[V]
- func (f *BinaryIndex[V]) Is(v []byte) *EqualCond[V]
- func (f *BinaryIndex[V]) KeyOf(v V) Key
- func (f *BinaryIndex[V]) LessThan(v []byte) *LessThanCond[V]
- func (f *BinaryIndex[V]) LessThanOrEqual(v []byte) *LessThanOrEqualCond[V]
- type BinaryKey
- type BoolIndex
- type BoolKey
- type CombinedIndex
- type CombinedKey
- type Cond
- type CondFunc
- type DB
- type EqualCond
- type FloatIndex
- func (f *FloatIndex[V]) Asc() *OrderRule[V]
- func (f *FloatIndex[V]) Desc() *OrderRule[V]
- func (f *FloatIndex[V]) GreaterThan(v float64) *GreaterThanCond[V]
- func (f *FloatIndex[V]) GreaterThanOrEqual(v float64) *GreaterThanOrEqualCond[V]
- func (f *FloatIndex[V]) Is(v float64) *EqualCond[V]
- func (f *FloatIndex[V]) KeyOf(v V) Key
- func (f *FloatIndex[V]) LessThan(v float64) *LessThanCond[V]
- func (f *FloatIndex[V]) LessThanOrEqual(v float64) *LessThanOrEqualCond[V]
- type FloatKey
- type GreaterThanCond
- type GreaterThanOrEqualCond
- type Index
- type IndexMap
- type IntIndex
- func (f *IntIndex[V]) Asc() *OrderRule[V]
- func (f *IntIndex[V]) Desc() *OrderRule[V]
- func (f *IntIndex[V]) Is(v int) *EqualCond[V]
- func (f *IntIndex[V]) IsGreaterThan(v int) *GreaterThanCond[V]
- func (f *IntIndex[V]) IsGreaterThanOrEqual(v int) *GreaterThanOrEqualCond[V]
- func (f *IntIndex[V]) IsLessThan(v int) *LessThanCond[V]
- func (f *IntIndex[V]) IsLessThanOrEqual(v int) *LessThanOrEqualCond[V]
- func (f *IntIndex[V]) KeyOf(v V) Key
- type IntKey
- type Key
- type KeyFunc
- type LessThanCond
- type LessThanOrEqualCond
- type OrderDirection
- type OrderRule
- type StringIndex
- func (f *StringIndex[V]) Asc() *OrderRule[V]
- func (f *StringIndex[V]) Desc() *OrderRule[V]
- func (f *StringIndex[V]) GreaterThan(v string) *GreaterThanCond[V]
- func (f *StringIndex[V]) GreaterThanOrEqual(v string) *GreaterThanOrEqualCond[V]
- func (f *StringIndex[V]) Is(v string) *EqualCond[V]
- func (f *StringIndex[V]) KeyOf(v V) Key
- func (f *StringIndex[V]) LessThan(v string) *LessThanCond[V]
- func (f *StringIndex[V]) LessThanOrEqual(v string) *LessThanOrEqualCond[V]
- type StringKey
- type Table
- func (t Table[V]) Del(tx *Txn, pk Key) error
- func (t Table[V]) DelMulti(tx *Txn, pks []Key) error
- func (t Table[V]) Get(tx *Txn, id Key) (V, error)
- func (t Table[V]) IndexBinary(fn func(V) []byte) (Table[V], *BinaryIndex[V])
- func (t Table[V]) IndexBool(fn func(V) bool) (Table[V], *BoolIndex[V])
- func (t Table[V]) IndexFloat(fn func(V) float64) (Table[V], *FloatIndex[V])
- func (t Table[V]) IndexInt(fn func(V) int) (Table[V], *IntIndex[V])
- func (t Table[V]) IndexMultiple(fn func(V) CombinedKey) (Table[V], *CombinedIndex[V])
- func (t Table[V]) IndexString(fn func(V) string) (Table[V], *StringIndex[V])
- func (t Table[V]) Select(tx *Txn) *TableLister[V]
- func (t Table[V]) Set(tx *Txn, v V) error
- func (t Table[V]) SetMulti(tx *Txn, vs []V) error
- type TableCursor
- type TableLister
- func (t *TableLister[V]) All() ([]V, error)
- func (t *TableLister[V]) Asc() *TableLister[V]
- func (t *TableLister[V]) Count() (int, error)
- func (t *TableLister[V]) Cursor() (*TableCursor[V], error)
- func (t *TableLister[V]) Desc() *TableLister[V]
- func (t *TableLister[V]) One() (V, error)
- func (t *TableLister[V]) OrderBy(order Index[V]) *TableLister[V]
- func (t *TableLister[V]) Page(limit, offset int) ([]V, error)
- func (t *TableLister[V]) Where(conds ...Cond[V]) *TableLister[V]
- type TableSelection
- type TableType
- type Txn
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("memdb: not found")
)
Functions ¶
This section is empty.
Types ¶
type BinaryIndex ¶ added in v0.1.2
type BinaryIndex[V any] struct { // contains filtered or unexported fields }
func (*BinaryIndex[V]) Asc ¶ added in v0.1.3
func (f *BinaryIndex[V]) Asc() *OrderRule[V]
func (*BinaryIndex[V]) Desc ¶ added in v0.1.3
func (f *BinaryIndex[V]) Desc() *OrderRule[V]
func (*BinaryIndex[V]) GreaterThan ¶ added in v0.1.2
func (f *BinaryIndex[V]) GreaterThan(v []byte) *GreaterThanCond[V]
func (*BinaryIndex[V]) GreaterThanOrEqual ¶ added in v0.1.2
func (f *BinaryIndex[V]) GreaterThanOrEqual(v []byte) *GreaterThanOrEqualCond[V]
func (*BinaryIndex[V]) Is ¶ added in v0.1.2
func (f *BinaryIndex[V]) Is(v []byte) *EqualCond[V]
func (*BinaryIndex[V]) KeyOf ¶ added in v0.1.2
func (f *BinaryIndex[V]) KeyOf(v V) Key
func (*BinaryIndex[V]) LessThan ¶ added in v0.1.2
func (f *BinaryIndex[V]) LessThan(v []byte) *LessThanCond[V]
func (*BinaryIndex[V]) LessThanOrEqual ¶ added in v0.1.2
func (f *BinaryIndex[V]) LessThanOrEqual(v []byte) *LessThanOrEqualCond[V]
type BoolIndex ¶ added in v0.1.2
type BoolIndex[V any] struct { // contains filtered or unexported fields }
type CombinedIndex ¶ added in v0.1.2
type CombinedIndex[V any] struct { // contains filtered or unexported fields }
func (*CombinedIndex[V]) Is ¶ added in v0.1.2
func (f *CombinedIndex[V]) Is(k CombinedKey) *EqualCond[V]
func (*CombinedIndex[V]) KeyOf ¶ added in v0.1.2
func (f *CombinedIndex[V]) KeyOf(v V) Key
type CombinedKey ¶ added in v0.1.2
type CombinedKey []Key
func (CombinedKey) Bytes ¶ added in v0.1.2
func (mk CombinedKey) Bytes() []byte
type FloatIndex ¶ added in v0.1.2
type FloatIndex[V any] struct { // contains filtered or unexported fields }
func (*FloatIndex[V]) Asc ¶ added in v0.1.3
func (f *FloatIndex[V]) Asc() *OrderRule[V]
func (*FloatIndex[V]) Desc ¶ added in v0.1.3
func (f *FloatIndex[V]) Desc() *OrderRule[V]
func (*FloatIndex[V]) GreaterThan ¶ added in v0.1.2
func (f *FloatIndex[V]) GreaterThan(v float64) *GreaterThanCond[V]
func (*FloatIndex[V]) GreaterThanOrEqual ¶ added in v0.1.2
func (f *FloatIndex[V]) GreaterThanOrEqual(v float64) *GreaterThanOrEqualCond[V]
func (*FloatIndex[V]) Is ¶ added in v0.1.2
func (f *FloatIndex[V]) Is(v float64) *EqualCond[V]
func (*FloatIndex[V]) KeyOf ¶ added in v0.1.2
func (f *FloatIndex[V]) KeyOf(v V) Key
func (*FloatIndex[V]) LessThan ¶ added in v0.1.2
func (f *FloatIndex[V]) LessThan(v float64) *LessThanCond[V]
func (*FloatIndex[V]) LessThanOrEqual ¶ added in v0.1.2
func (f *FloatIndex[V]) LessThanOrEqual(v float64) *LessThanOrEqualCond[V]
type GreaterThanCond ¶
type GreaterThanCond[V any] struct { // contains filtered or unexported fields }
func (*GreaterThanCond[V]) Matches ¶
func (c *GreaterThanCond[V]) Matches(v V) bool
type GreaterThanOrEqualCond ¶
type GreaterThanOrEqualCond[V any] struct { // contains filtered or unexported fields }
func (*GreaterThanOrEqualCond[V]) Matches ¶
func (c *GreaterThanOrEqualCond[V]) Matches(v V) bool
type IntIndex ¶ added in v0.1.2
type IntIndex[V any] struct { // contains filtered or unexported fields }
func (*IntIndex[V]) IsGreaterThan ¶ added in v0.1.2
func (f *IntIndex[V]) IsGreaterThan(v int) *GreaterThanCond[V]
func (*IntIndex[V]) IsGreaterThanOrEqual ¶ added in v0.1.2
func (f *IntIndex[V]) IsGreaterThanOrEqual(v int) *GreaterThanOrEqualCond[V]
func (*IntIndex[V]) IsLessThan ¶ added in v0.1.2
func (f *IntIndex[V]) IsLessThan(v int) *LessThanCond[V]
func (*IntIndex[V]) IsLessThanOrEqual ¶ added in v0.1.2
func (f *IntIndex[V]) IsLessThanOrEqual(v int) *LessThanOrEqualCond[V]
type LessThanCond ¶
type LessThanCond[V any] struct { // contains filtered or unexported fields }
func (*LessThanCond[V]) Matches ¶
func (c *LessThanCond[V]) Matches(v V) bool
type LessThanOrEqualCond ¶
type LessThanOrEqualCond[V any] struct { // contains filtered or unexported fields }
func (*LessThanOrEqualCond[V]) Matches ¶
func (c *LessThanOrEqualCond[V]) Matches(v V) bool
type OrderRule ¶ added in v0.1.3
type OrderRule[V any] struct { // contains filtered or unexported fields }
type StringIndex ¶ added in v0.1.2
type StringIndex[V any] struct { // contains filtered or unexported fields }
func (*StringIndex[V]) Asc ¶ added in v0.1.3
func (f *StringIndex[V]) Asc() *OrderRule[V]
func (*StringIndex[V]) Desc ¶ added in v0.1.3
func (f *StringIndex[V]) Desc() *OrderRule[V]
func (*StringIndex[V]) GreaterThan ¶ added in v0.1.2
func (f *StringIndex[V]) GreaterThan(v string) *GreaterThanCond[V]
func (*StringIndex[V]) GreaterThanOrEqual ¶ added in v0.1.2
func (f *StringIndex[V]) GreaterThanOrEqual(v string) *GreaterThanOrEqualCond[V]
func (*StringIndex[V]) Is ¶ added in v0.1.2
func (f *StringIndex[V]) Is(v string) *EqualCond[V]
func (*StringIndex[V]) KeyOf ¶ added in v0.1.2
func (f *StringIndex[V]) KeyOf(v V) Key
func (*StringIndex[V]) LessThan ¶ added in v0.1.2
func (f *StringIndex[V]) LessThan(v string) *LessThanCond[V]
func (*StringIndex[V]) LessThanOrEqual ¶ added in v0.1.2
func (f *StringIndex[V]) LessThanOrEqual(v string) *LessThanOrEqualCond[V]
type Table ¶
type Table[V any] struct { // contains filtered or unexported fields }
func (Table[V]) IndexBinary ¶
func (t Table[V]) IndexBinary(fn func(V) []byte) (Table[V], *BinaryIndex[V])
func (Table[V]) IndexFloat ¶
func (t Table[V]) IndexFloat(fn func(V) float64) (Table[V], *FloatIndex[V])
func (Table[V]) IndexMultiple ¶
func (t Table[V]) IndexMultiple(fn func(V) CombinedKey) (Table[V], *CombinedIndex[V])
func (Table[V]) IndexString ¶
func (t Table[V]) IndexString(fn func(V) string) (Table[V], *StringIndex[V])
func (Table[V]) Select ¶ added in v0.1.1
func (t Table[V]) Select(tx *Txn) *TableLister[V]
type TableCursor ¶
type TableCursor[V any] struct { // contains filtered or unexported fields }
func (*TableCursor[V]) First ¶
func (t *TableCursor[V]) First() (V, bool)
func (*TableCursor[V]) Last ¶
func (t *TableCursor[V]) Last() (V, bool)
func (*TableCursor[V]) Next ¶
func (t *TableCursor[V]) Next() (V, bool)
func (*TableCursor[V]) Prev ¶
func (t *TableCursor[V]) Prev() (V, bool)
func (*TableCursor[V]) Seek ¶
func (t *TableCursor[V]) Seek(id Key) (V, bool)
type TableLister ¶
type TableLister[V any] struct { // contains filtered or unexported fields }
func (*TableLister[V]) All ¶ added in v0.1.3
func (t *TableLister[V]) All() ([]V, error)
func (*TableLister[V]) Asc ¶
func (t *TableLister[V]) Asc() *TableLister[V]
func (*TableLister[V]) Count ¶
func (t *TableLister[V]) Count() (int, error)
func (*TableLister[V]) Cursor ¶
func (t *TableLister[V]) Cursor() (*TableCursor[V], error)
func (*TableLister[V]) Desc ¶
func (t *TableLister[V]) Desc() *TableLister[V]
func (*TableLister[V]) One ¶
func (t *TableLister[V]) One() (V, error)
func (*TableLister[V]) OrderBy ¶
func (t *TableLister[V]) OrderBy(order Index[V]) *TableLister[V]
func (*TableLister[V]) Page ¶
func (t *TableLister[V]) Page(limit, offset int) ([]V, error)
func (*TableLister[V]) Where ¶
func (t *TableLister[V]) Where(conds ...Cond[V]) *TableLister[V]
type TableSelection ¶
type TableSelection[V any] struct { // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.