Documentation
¶
Index ¶
- type Option
- type SQLiteStore
- func (s *SQLiteStore) All(scopes []store.Scope) ([]store.Entry, error)
- func (s *SQLiteStore) AllByCategory(category string, topK int, scopes []store.Scope) ([]store.Entry, error)
- func (s *SQLiteStore) Close() error
- func (s *SQLiteStore) Delete(id string) error
- func (s *SQLiteStore) Get(id string) (*store.Entry, error)
- func (s *SQLiteStore) ListHeads(scopes []store.Scope) ([]store.HeadInfo, error)
- func (s *SQLiteStore) Promote(id string, targetScope store.Scope) error
- func (s *SQLiteStore) Query(category string, tags []string) ([]store.Entry, error)
- func (s *SQLiteStore) QueryByCategory(category, query string, topK int, scopes []store.Scope) ([]store.Entry, error)
- func (s *SQLiteStore) Score(id string, delta float64) error
- func (s *SQLiteStore) Upsert(entry *store.Entry) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*options)
Option is a functional option for configuring SQLiteStore.
func WithAutoHitCounting ¶
WithAutoHitCounting controls whether queries automatically increment HitCount and LastHit. Enabled by default; pass false to disable.
func WithConfiguredScopes ¶
WithConfiguredScopes sets the allowed (or default) scopes for query methods. When set, queries which don't specify scopes will default to these, while queries providing scopes must be a subset of this set. This applies to reads/queries. Writes (e.g. Upsert and Promote) are not constrained.
type SQLiteStore ¶
type SQLiteStore struct {
// contains filtered or unexported fields
}
func (*SQLiteStore) AllByCategory ¶
func (*SQLiteStore) Close ¶
func (s *SQLiteStore) Close() error
func (*SQLiteStore) Delete ¶
func (s *SQLiteStore) Delete(id string) error
func (*SQLiteStore) Promote ¶
func (s *SQLiteStore) Promote(id string, targetScope store.Scope) error
func (*SQLiteStore) QueryByCategory ¶
Click to show internal directories.
Click to hide internal directories.