Documentation
¶
Overview ¶
Package store provides SQLite-backed persistence.
Index ¶
- type DiffRecord
- type Node
- type RankedNode
- type RowScanner
- type Snapshot
- type Stats
- type Store
- func (s *Store) AdvanceCursorTx(ctx context.Context, tx *sql.Tx, snapshotID int64) error
- func (s *Store) BoostTemperature(ctx context.Context, id string, boost float64) error
- func (s *Store) BoostTemperatureBatch(ctx context.Context, ids []string, boost float64) error
- func (s *Store) Close() error
- func (s *Store) CreateSnapshotTx(ctx context.Context, tx *sql.Tx, cursorHash, message, compileRoot string) (int64, error)
- func (s *Store) DecayTemperatures(ctx context.Context, factor float64) (int64, error)
- func (s *Store) DeleteNode(ctx context.Context, id string) error
- func (s *Store) DeleteNodeTx(ctx context.Context, tx *sql.Tx, id string) error
- func (s *Store) DeleteNodesByFiles(ctx context.Context, paths []string) error
- func (s *Store) ExecRewriteSourcePaths(ctx context.Context, oldPrefix, newPrefix string) error
- func (s *Store) GetAllNodes(ctx context.Context) ([]*Node, error)
- func (s *Store) GetAncestors(ctx context.Context, id string) ([]*Node, error)
- func (s *Store) GetChildren(ctx context.Context, parentID string) ([]*Node, error)
- func (s *Store) GetColdNodes(ctx context.Context, threshold float64) ([]*Node, error)
- func (s *Store) GetDescendants(ctx context.Context, id string, maxDepth int) ([]*Node, error)
- func (s *Store) GetDiffsBySnapshot(ctx context.Context, snapshotID int64) ([]*DiffRecord, error)
- func (s *Store) GetDiffsForNode(ctx context.Context, nodeID string) ([]*DiffRecord, error)
- func (s *Store) GetDiffsSince(ctx context.Context, sinceSnapshotID int64) ([]*DiffRecord, error)
- func (s *Store) GetHeadCursorHash(ctx context.Context) (string, error)
- func (s *Store) GetLatestCompileRoot(ctx context.Context) (string, error)
- func (s *Store) GetNode(ctx context.Context, id string) (*Node, error)
- func (s *Store) GetNodesByFile(ctx context.Context, path string) ([]*Node, error)
- func (s *Store) GetNodesByFiles(ctx context.Context, paths []string) ([]*Node, error)
- func (s *Store) GetRootNodes(ctx context.Context) ([]*Node, error)
- func (s *Store) GetSiblings(ctx context.Context, id string) ([]*Node, error)
- func (s *Store) GetSnapshot(ctx context.Context, id int) (*Snapshot, error)
- func (s *Store) GetStats(ctx context.Context) (*Stats, error)
- func (s *Store) IncrementAccess(ctx context.Context, id string) error
- func (s *Store) InsertDiffTx(ctx context.Context, tx *sql.Tx, d *DiffRecord) error
- func (s *Store) ListSnapshots(ctx context.Context, limit int) ([]*Snapshot, error)
- func (s *Store) Migrate(ctx context.Context) error
- func (s *Store) Search(ctx context.Context, query string, limit int) ([]*Node, error)
- func (s *Store) SearchRanked(ctx context.Context, query string, limit int) ([]*RankedNode, error)
- func (s *Store) Tx(ctx context.Context, fn func(tx *sql.Tx) error) error
- func (s *Store) UpdateTemperature(ctx context.Context, id string, temp float64) error
- func (s *Store) UpsertNode(ctx context.Context, n *Node) error
- func (s *Store) UpsertNodeTx(ctx context.Context, tx *sql.Tx, n *Node) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiffRecord ¶
type Node ¶
type RankedNode ¶
type RowScanner ¶
type Store ¶
func (*Store) AdvanceCursorTx ¶
func (*Store) BoostTemperature ¶
func (*Store) BoostTemperatureBatch ¶
func (*Store) CreateSnapshotTx ¶
func (*Store) DecayTemperatures ¶
func (*Store) DeleteNodeTx ¶
func (*Store) DeleteNodesByFiles ¶
func (*Store) ExecRewriteSourcePaths ¶
Replace every source file prefix matching oldPrefix with newPrefix.
func (*Store) GetAncestors ¶
func (*Store) GetChildren ¶
func (*Store) GetColdNodes ¶
func (*Store) GetDescendants ¶
func (*Store) GetDiffsBySnapshot ¶
func (*Store) GetDiffsForNode ¶
func (*Store) GetDiffsSince ¶
func (*Store) GetHeadCursorHash ¶
func (*Store) GetLatestCompileRoot ¶
Return the compile root of the most recent snapshot created via a directory compile.
func (*Store) GetNodesByFile ¶
func (*Store) GetNodesByFiles ¶
func (*Store) GetSiblings ¶
func (*Store) GetSnapshot ¶
func (*Store) IncrementAccess ¶
func (*Store) InsertDiffTx ¶
func (*Store) ListSnapshots ¶
func (*Store) SearchRanked ¶
func (*Store) UpdateTemperature ¶
Click to show internal directories.
Click to hide internal directories.