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 interface { Add(index Index) Insert(item record.Record) Delete(item record.Record) Update(oldItem, item record.Record) SelectForCondition(condition where.Condition) ( indexExists bool, count int, ids []storage.IDIterator, idsUnique bool, err error, ) }
func CreateByField ¶ added in v0.1.0
func CreateByField() ByField
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 interface { Field() record.Field Unique() bool Compute() IndexComputer Weight(condition where.Condition) (canApplyIndex bool, weight IndexWeight) Select(condition where.Condition) (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.