Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByField ¶ added in v0.1.0
type ByField[R record.Record] interface { Add(index Index[R]) Insert(item R) Delete(item R) Update(oldItem, item R) SelectForCondition(condition where.Condition[R]) ( indexExists bool, count int, ids []storage.IDIterator, idsUnique bool, err error, ) }
func CreateByField ¶ added in v0.1.0
type ConcurrentStorage ¶ added in v0.1.0
type ConcurrentStorage interface { RLock() RUnlock() Unwrap() Storage Get(key Key) storage.IDStorage GetOrCreate(key Key) storage.IDStorage }
ConcurrentStorage wrapped Storage for concurrent safe access.
func CreateConcurrentStorage ¶ added in v0.1.0
func CreateConcurrentStorage(original Storage, storeOnlyUniqID bool) ConcurrentStorage
type Index ¶ added in v0.1.0
type Index[R record.Record] interface { Field() record.Field Unique() bool Compute() IndexComputer[R] Weight(condition where.Condition[R]) (canApplyIndex bool, weight IndexWeight) Select(condition where.Condition[R]) (count int, ids []storage.IDIterator, err error) ConcurrentStorage() ConcurrentStorage }
type IndexComputer ¶ added in v0.1.0
type IndexWeight ¶ added in v0.1.0
type IndexWeight uint8
const ( IndexWeightLow IndexWeight = 10 IndexWeightMedium IndexWeight = 20 IndexWeightHigh IndexWeight = 30 )
Click to show internal directories.
Click to hide internal directories.