Versions in this module Expand all Collapse all v0 v0.3.0 Jul 24, 2023 v0.2.0 Mar 13, 2022 Changes in this version type Iterator + Reset func() v0.1.0 Mar 12, 2022 Changes in this version + const SortAny + const SortAsc + const SortDesc + var ErrExists = errors.New("tuple: this key already exists") + var ErrNotFound = errors.New("tuple: not found") + var ErrReadOnly = errors.New("tuple: read-only database") + var ErrTableExists = errors.New("tuple: table already exists") + var ErrTableNotFound = errors.New("tuple: table not found") + var ErrWildGuess = errors.New("can only guess the size") + func DeleteEach(ctx context.Context, d Deleter, f *Filter) error + func FilterIterator(it LazyTuple, f *Filter, next func() bool) bool + func TableSize(ctx context.Context, t Table, f *Filter, exact bool) (int64, error) + func Update(ctx context.Context, s Store, update func(tx Tx) error) error + func View(ctx context.Context, s Store, view func(tx Tx) error) error + type Data []Value + func SData(data ...string) Data + type DataFilter interface + FilterData func(d Data) bool + type DataFilters []filter.ValueFilter + func (arr DataFilters) FilterData(d Data) bool + type Deleter interface + DeleteTuplesByKey func(ctx context.Context, keys []Key) error + type Field struct + Name string + Type Type + type Filter struct + func (f *Filter) FilterData(d Data) bool + func (f *Filter) FilterKey(k Key) bool + func (f *Filter) FilterTuple(t Tuple) bool + func (f *Filter) IsAny() bool + func (f *Filter) IsAnyData() bool + func (f *Filter) IsAnyKey() bool + type Header struct + Data []Field + Key []KeyField + Name string + func (t Header) Clone() Header + func (t Header) DataByName(name string) (*Field, int) + func (t Header) KeyByName(name string) (*KeyField, int) + func (t Header) Validate() error + func (t Header) ValidateData(d Data) error + func (t Header) ValidateKey(k Key, insert bool) error + func (t Header) ValidatePref(k Key) error + type Iterator interface + Data func() Data + Key func() Key + type Key []Sortable + func AutoKey() Key + func SKey(key ...string) Key + func (k Key) Compare(k2 Key) int + type KeyField struct + Auto bool + Name string + Type KeyType + type KeyFilter interface + FilterKey func(k Key) bool + type KeyFilters []filter.ValueFilter + func (arr KeyFilters) FilterKey(k Key) bool + type KeyType = values.SortableType + type Keys []Key + func (arr Keys) FilterKey(k Key) bool + type LazyTuple interface + Data func() Data + Key func() Key + type ScanOptions struct + Filter *Filter + KeysOnly bool + Limit int + Sort Sorting + type Scanner interface + Scan func(opt *ScanOptions) Iterator + type Sortable = values.Sortable + type Sorting int + type Store interface + ListTables func(ctx context.Context) ([]TableInfo, error) + Table func(ctx context.Context, name string) (TableInfo, error) + Tx func(rw bool) (Tx, error) + Update func(ctx context.Context, update func(tx Tx) error) error + View func(ctx context.Context, view func(tx Tx) error) error + type Table interface + Clear func(ctx context.Context) error + DeleteTuples func(ctx context.Context, f *Filter) error + Drop func(ctx context.Context) error + GetTuple func(ctx context.Context, key Key) (Data, error) + GetTupleBatch func(ctx context.Context, keys []Key) ([]Data, error) + InsertTuple func(ctx context.Context, t Tuple) (Key, error) + UpdateTuple func(ctx context.Context, t Tuple, opt *UpdateOpt) error + type TableInfo interface + Header func() Header + Open func(tx Tx) (Table, error) + type Tuple struct + Data Data + Key Key + type Tx interface + CreateTable func(ctx context.Context, table Header) (Table, error) + ListTables func(ctx context.Context) ([]Table, error) + Table func(ctx context.Context, name string) (Table, error) + type Type = values.Type + type UpdateOpt struct + Upsert bool + type Value = values.Value