Versions in this module Expand all Collapse all v0 v0.4.9 May 13, 2024 v0.4.8 Nov 6, 2023 Changes in this version + type Index struct + Key func(interface{}) []byte + Name string + type IndexQuery struct + FilterKeys func(key []byte) bool + Index Index + KeyPrefix []byte + Limit int + Offset int + Reverse bool + func (iq *IndexQuery) FetchCollection(db *badger.DB) ([]string, error) + type QueryStore struct + func NewQueryStore(st *Store, iq func(qs *QueryStore, q url.Values) (*IndexQuery, error)) *QueryStore + func (qs *QueryStore) AddIndex(idx Index) *QueryStore + func (qs *QueryStore) Flush() + func (qs *QueryStore) Index(name string) Index + func (qs *QueryStore) OnQueryChange(cb func(store.QueryChange)) + func (qs *QueryStore) Query(q url.Values) (interface{}, error) + func (qs *QueryStore) RebuildIndexes() error + func (qs *QueryStore) SetLogger(l logger.Logger) *QueryStore + type Store struct + DB *badger.DB + func NewStore(db *badger.DB) *Store + func (st *Store) BeforeChange(cb func(id string, before, after, info interface{}) error) + func (st *Store) Get(id string) (interface{}, error) + func (st *Store) Init(cb func(add func(id string, v interface{})) error) error + func (st *Store) OnChange(cb func(id string, before, after, info interface{})) + func (st *Store) Read(id string) store.ReadTxn + func (st *Store) SetPrefix(prefix string) *Store + func (st *Store) SetType(typ interface{}) *Store + func (st *Store) Type() interface{} + func (st *Store) Write(id string) store.WriteTxn