Versions in this module Expand all Collapse all v0 v0.1.0 Jul 18, 2026 Changes in this version + const SchemaVersion + var ErrMigrationRequired = errors.New("sqlitevec: pending schema migrations (run `ckv migrate --out PATH`)") + var ErrMigrationTampered = errors.New("sqlitevec: applied migration content has changed (file edited after apply)") + func BackupPath(dbPath string, ts time.Time) string + func MigrationsDir() string + type Migration struct + File string + Name string + SHA256 string + SQL string + Version string + type MigrationOption func(*MigrationRunner) + func WithBackup(enabled bool) MigrationOption + func WithSource(source fs.FS, dir string) MigrationOption + type MigrationRunner struct + func NewMigrationRunner(db *sql.DB, dbPath string, opts ...MigrationOption) *MigrationRunner + func (r *MigrationRunner) Apply(ctx context.Context) error + func (r *MigrationRunner) DryRun(ctx context.Context) ([]Migration, error) + func (r *MigrationRunner) Status(ctx context.Context) (*MigrationStatus, error) + type MigrationStatus struct + Applied []Migration + Current string + Pending []Migration + Tampered []Migration + type Store struct + func Open(path string, dim int) (*Store, error) + func (s *Store) AllFiles(ctx context.Context) ([]string, error) + func (s *Store) Close() error + func (s *Store) CuratedInvariant(ctx context.Context, id string) (*types.Chunk, error) + func (s *Store) DeleteByFile(ctx context.Context, path string) error + func (s *Store) DeleteDocsChunks(ctx context.Context) (int, error) + func (s *Store) DeleteFlowChunks(ctx context.Context) (int, error) + func (s *Store) Dim() int + func (s *Store) DocsChunks(ctx context.Context) ([]types.Chunk, error) + func (s *Store) FindConventions(ctx context.Context, packagePrefix string) ([]types.Chunk, error) + func (s *Store) FindInvariants(ctx context.Context, file, category string) ([]types.Chunk, error) + func (s *Store) FlowChunks(ctx context.Context) ([]types.Chunk, error) + func (s *Store) LookupByFileOrdered(ctx context.Context, file string) ([]types.Chunk, error) + func (s *Store) LookupByIDs(ctx context.Context, ids []string) ([]types.Chunk, error) + func (s *Store) LookupPRsByFile(ctx context.Context, file string) ([]types.PRRef, error) + func (s *Store) RealignCanonical(ctx context.Context, updates map[string]string) (int, error) + func (s *Store) Search(ctx context.Context, query []float32, k int, filter types.Filter) ([]types.Hit, error) + func (s *Store) SetManifest(ctx context.Context, kv map[string]string) error + func (s *Store) Stats(ctx context.Context) (types.Stats, error) + func (s *Store) UpdateRecentPRs(ctx context.Context, filePRs map[string][]types.PRRef) (int, error) + func (s *Store) Upsert(ctx context.Context, chunks []types.Chunk, embeddings [][]float32) error + func (s *Store) Validate(ctx context.Context) (Validation, error) + type Validation struct + CanonicalChunks int + Chunks int + OrphanChunks int + OrphanVectors int + SymbolChunks int + Vectors int + func (v Validation) CanonicalRate() float64 + func (v Validation) OK() bool