Documentation
¶
Index ¶
- type FileMeta
- type Store
- func (s *Store) AcquireLocks(ctx context.Context, intentID string, lockKeys []string, ttl time.Duration) ([]core.LockRecord, error)
- func (s *Store) AllEdges(ctx context.Context) ([]core.Edge, error)
- func (s *Store) AllFileMeta(ctx context.Context) (map[string]FileMeta, error)
- func (s *Store) AllSymbols(ctx context.Context) ([]core.SymbolRecord, error)
- func (s *Store) Close() error
- func (s *Store) DeleteFilesNotIn(ctx context.Context, current map[string]bool) (int, error)
- func (s *Store) FileBlobSHA(ctx context.Context, filePath string) (string, bool, error)
- func (s *Store) FilesNotIn(ctx context.Context, current map[string]bool) ([]string, error)
- func (s *Store) Migrate(ctx context.Context) error
- func (s *Store) ReleaseLocks(ctx context.Context, intentID string) (int64, error)
- func (s *Store) ReplaceEdges(ctx context.Context, edges []core.Edge) error
- func (s *Store) Status(ctx context.Context) (core.Status, error)
- func (s *Store) UpdateFileStats(ctx context.Context, stats map[string][2]int64) error
- func (s *Store) UpsertFile(ctx context.Context, filePath, blobSHA, language string, size, mtime int64, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileMeta ¶ added in v0.17.1
FileMeta is the per-file identity the walk uses to decide whether a file needs re-hashing (stat match) or re-parsing (blob mismatch).
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) AcquireLocks ¶
func (*Store) AllFileMeta ¶ added in v0.17.1
AllFileMeta returns the stat cache for every indexed file in one query.
func (*Store) AllSymbols ¶
func (*Store) DeleteFilesNotIn ¶
func (*Store) FileBlobSHA ¶
func (*Store) FilesNotIn ¶ added in v0.6.2
FilesNotIn returns the indexed file paths absent from current — the files a delete pass would prune — without deleting anything.
func (*Store) ReleaseLocks ¶
func (*Store) ReplaceEdges ¶
ReplaceEdges makes the edges table equal to the given set. It diffs against what is stored and writes only the difference: a one-file change on a million-edge repo touches hundreds of rows, and the previous delete-everything-reinsert paid the full million-row write every index (21s on a 19k-file monorepo). Inserts are batched multi-row.
func (*Store) UpdateFileStats ¶ added in v0.17.1
UpdateFileStats refreshes size+mtime for files whose content was verified unchanged (touched files: stat differs, blob identical).