Documentation
¶
Index ¶
- func Clear[V any, R Row](store Store[R], key R)
- func Get[V any, R Row](store Store[R], key R) (V, bool)
- func Persist[R Row](s Store[R], wr io.Writer) error
- func PersistFS[R Row](s Store[R], dir WritableFS, name string) error
- func Push[V any](it Iterator[V]) iter.Seq[V]
- func Push2[U, V any](it Iterator2[U, V]) iter.Seq2[U, V]
- func RegisterColumnImpl[C, D any]()
- func RegisterColumnType[C any]()
- func Restore[R Row](store Store[R], rd io.Reader) error
- func RestoreFS[R Row](s Store[R], dir WritableFS, name string) error
- func RowMatrixFor[R Row](sets ...Rows[R]) bitset.Matrix[R]
- func Set[V any, R Row](store Store[R], key R, value V)
- func SimpleValueAs[U valued[V], V any, R Row](v *Value[R]) (V, bool)
- func SimpleValueMustBe[U valued[V], V any, R Row](v *Value[R]) V
- type Allocator
- type Arena
- func (a *Arena[R]) Copy(v *Value[R]) *Value[R]
- func (a *Arena[R]) Empty() *Value[R]
- func (a *Arena[R]) Group(key any, value *Value[R]) *Value[R]
- func (a *Arena[R]) Join(left, right *Value[R]) *Value[R]
- func (a *Arena[R]) Multi(u []*Value[R]) *Value[R]
- func (a *Arena[R]) Release()
- func (a *Arena[R]) Simple(u any) *Value[R]
- func (a *Arena[R]) Sub() *Arena[R]
- type BatchIterator
- type BatchIterator2
- type Column
- type EmptyColumn
- func (EmptyColumn[R, V]) All() Iterator2[R, V]
- func (EmptyColumn[R, V]) AllSlots() Iterator2[R, V]
- func (EmptyColumn[R, V]) Clear(R)
- func (EmptyColumn[R, V]) Delete()
- func (EmptyColumn[R, V]) Get(R) (V, bool)
- func (EmptyColumn[R, V]) Has(R) bool
- func (EmptyColumn[R, V]) Rows() Rows[R]
- func (EmptyColumn[R, V]) Set(R, V)
- func (EmptyColumn[R, V]) Slot(int) Column[R, V]
- type EmptyCursor
- type EmptyIterator
- type EmptyIterator2
- type EmptyResult
- type Iterator
- type Iterator2
- type Marshaller
- type Maybe
- type None
- type Persister
- type Result
- type Row
- type RowCursor
- type RowManager
- type RowSet
- func (s *RowSet[R, V]) All() RowSetIt[R, V]
- func (s *RowSet[R, V]) AllRows() Rows[R]
- func (s *RowSet[R, V]) Clear(row R)
- func (s *RowSet[R, V]) Cleared(row R) bool
- func (s *RowSet[R, V]) Get(row R) (V, bool)
- func (s *RowSet[R, V]) GetOp(row R) (Maybe[V], bool)
- func (s *RowSet[R, V]) Rows() Rows[R]
- func (s *RowSet[R, V]) Set(row R, value V)
- func (s *RowSet[R, V]) Size() int
- func (s *RowSet[R, V]) Sort()
- type RowSetIt
- type RowSetOp
- type Rows
- func (s *Rows[R]) Clear(key R)
- func (s *Rows[R]) ClearAll(r Rows[R])
- func (s Rows[R]) Copy() Rows[R]
- func (s Rows[R]) Cursor() RowCursor[R]
- func (s Rows[R]) Has(key R) bool
- func (s Rows[R]) HasAny(r Rows[R]) bool
- func (s *Rows[R]) IntersectWith(r Rows[R])
- func (s Rows[R]) IsEmpty() bool
- func (s *Rows[R]) MarshalCATE(*cate.Encoder) (cate.Value, error)
- func (s Rows[R]) Rank(key R) int
- func (s *Rows[R]) Reset()
- func (s *Rows[R]) Set(key R)
- func (s *Rows[R]) SetAll(r Rows[R])
- func (s Rows[R]) Size() int
- func (s *Rows[R]) UnmarshalCATE(_ *cate.Decoder, value cate.Value) error
- type SimpleValueSet
- type SliceIterator
- type Store
- type Value
- func (v *Value[R]) Equal(u *Value[R]) bool
- func (v *Value[R]) Group() (any, *Value[R])
- func (v *Value[R]) HasRow() bool
- func (v *Value[R]) Join() (left, right *Value[R])
- func (v *Value[R]) Kind() ValueKind
- func (v *Value[R]) Multi() []*Value[R]
- func (v *Value[R]) Row() R
- func (v *Value[R]) Simple() any
- func (v *Value[R]) WithGroup(key any, value *Value[R]) *Value[R]
- func (v *Value[R]) WithJoin(left, right *Value[R]) *Value[R]
- func (v *Value[R]) WithMulti(u []*Value[R]) *Value[R]
- func (v *Value[R]) WithRow(row R) *Value[R]
- func (v *Value[R]) WithSimple(u any) *Value[R]
- type ValueKind
- type WritableFS
- type WritableFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterColumnImpl ¶
func RegisterColumnImpl[C, D any]()
func RegisterColumnType ¶
func RegisterColumnType[C any]()
func SimpleValueMustBe ¶
Types ¶
type Allocator ¶
type BatchIterator ¶
type BatchIterator2 ¶
type Column ¶
type Column[R Row, V any] interface { Rows() Rows[R] Has(R) bool Get(R) (V, bool) Set(R, V) Clear(R) Slot(int) Column[R, V] All() Iterator2[R, V] AllSlots() Iterator2[R, V] }
func ReadColumnFor ¶
type EmptyColumn ¶
type EmptyCursor ¶
type EmptyIterator ¶
type EmptyIterator[V any] struct{}
type EmptyIterator2 ¶
type EmptyIterator2[U, V any] struct{}
type EmptyResult ¶
type EmptyResult[R Row] struct{}
type Iterator2 ¶
type Marshaller ¶
type Marshaller interface {
cate.Marshaller
cate.Unmarshaller
}
type Persister ¶
type Persister[R Row] interface { Persist(R, Store[R], WritableFS) error Restore(R, Store[R], WritableFS) error }
type RowManager ¶
type RowSet ¶
RowSet is an ordered, mutable set of (row, value) pairs. An empty RowSet is implicitly sorted; it is only marked unsorted after an out-of-order insert.
type SimpleValueSet ¶
func SimpleValueAllocatorFor ¶
func SimpleValueAllocatorFor[V any, R Row](a *Arena[R]) SimpleValueSet[R, V]
func (SimpleValueSet[R, V]) Value ¶
func (s SimpleValueSet[R, V]) Value(value V) *Value[R]
type SliceIterator ¶
type SliceIterator[V any] []V
type Store ¶
type Store[R Row] interface { // For creates a new store scoped to the given rows. For(Rows[R]) Store[R] // Rows returns the set of all populated rows. Rows is optimistic - the // presence of a row in the row set does not guarantee that row is // present in any column. Rows() Rows[R] // Row iterates over the attributes of a row. Row(R) Iterator2[reflect.Type, any] // HasRow returns true if any column contains an entry for the given // row. HasRow(row R) bool // Columns iterates over all populated columns. Columns() Iterator[reflect.Type] // Column returns a specific column. Column(reflect.Type) Column[R, any] }
type Value ¶
type Value[R Row] struct { // contains filtered or unexported fields }
func NewSimpleValue ¶
func (*Value[R]) WithSimple ¶
type WritableFS ¶
type WritableFS interface {
fs.FS
Subdir(string) (WritableFS, error)
Create(string) (WritableFile, error)
}
func DirFS ¶
func DirFS(dir string) WritableFS
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package store (v0) is a minimal, non-performant implementation store.Store.
|
Package store (v0) is a minimal, non-performant implementation store.Store. |
|
Package store (v1) is the baseline implementation of store.Store.
|
Package store (v1) is the baseline implementation of store.Store. |
Click to show internal directories.
Click to hide internal directories.