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 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 AggregateFn
- type AllOf
- type AllOfExecutor
- type Allocator
- type AnyOf
- 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 Column
- type Composite
- type Const
- 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]) ClearAll(R)
- func (EmptyColumn[R, V]) Delete()
- func (EmptyColumn[R, V]) Get(R) (V, bool)
- func (EmptyColumn[R, V]) GetAll(R) ([]V, bool)
- 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 ExecuteFn
- type GroupBy
- type Iterator
- type Iterator2
- type Join
- type JoinFn
- type KeyFn
- type Marshaller
- type Maybe
- type None
- type Operation
- type Persister
- type Read
- type ReadAll
- type ReadExecutor
- type Result
- type Row
- type RowCursor
- type RowManager
- type RowSet
- func (s *RowSet[R]) Add(key R)
- func (s *RowSet[R]) AddAll(r RowSet[R])
- func (s RowSet[R]) Copy() RowSet[R]
- func (s RowSet[R]) Cursor() RowCursor[R]
- func (s RowSet[R]) Has(key R) bool
- func (s RowSet[R]) HasAny(r RowSet[R]) bool
- func (s *RowSet[R]) IntersectWith(r RowSet[R])
- func (s RowSet[R]) IsEmpty() bool
- func (s *RowSet[R]) MarshalCATE(*cate.Encoder) (cate.Value, error)
- func (s *RowSet[R]) Remove(key R)
- func (s *RowSet[R]) RemoveAll(r RowSet[R])
- func (s *RowSet[R]) Reset()
- func (s RowSet[R]) Size() int
- func (s RowSet[R]) Slice() []R
- func (s *RowSet[R]) UnmarshalCATE(_ *cate.Decoder, value cate.Value) error
- type Select
- type SelectFn
- type SimpleValueSet
- type SingleValueIterator
- 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 Without
- 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 AggregateFn ¶
type AllOfExecutor ¶
type Allocator ¶
type Column ¶
type Column[R Row, V any] interface { Get(R) (V, bool) GetAll(R) ([]V, bool) Set(R, V) Clear(R) ClearAll(R) Slot(int) Column[R, V] All() Iterator2[R, V] AllSlots() Iterator2[R, V] // Delete the whole column (including slots). Delete() }
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 GroupBy ¶
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 ReadExecutor ¶
type RowManager ¶
type RowSet ¶
type RowSet[R Row] struct { // contains filtered or unexported fields }
func RowSetWith ¶
func (*RowSet[R]) IntersectWith ¶
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 SingleValueIterator ¶
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(RowSet[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() RowSet[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
¶
Click to show internal directories.
Click to hide internal directories.