Documentation
¶
Index ¶
- type DB
- func (db *DB) AttachAllDirtyIndexes() int
- func (db *DB) AttachDirtyIndex(worktreePath string) error
- func (db *DB) AttachDirtyIndexByID(id, dirtyBlevePath string) error
- func (db *DB) AttachDirtyOverlay() error
- func (db *DB) BuildDirtyIndex(ctx context.Context, localPath string, opts index.IndexOptions) (int, error)
- func (db *DB) Close() error
- func (db *DB) DetachDirtyIndexByID(id string)
- func (db *DB) DetachDirtyOverlay()
- func (db *DB) DirtyOverlayCount() int
- func (db *DB) GCDirtyIndexes() (int, error)
- func (db *DB) IndexGitHubData(ctx context.Context, ledgerPath string, progress func(string)) (*index.GitHubIndexStats, error)
- func (db *DB) IndexLocalRepo(ctx context.Context, localPath string, opts index.IndexOptions) error
- func (db *DB) IndexRepo(ctx context.Context, url string, opts index.IndexOptions) error
- func (db *DB) ParseComments(ctx context.Context, progress func(string)) (index.CommentStats, error)
- func (db *DB) ParseSymbols(ctx context.Context, progress func(string)) (index.ParseStats, error)
- func (db *DB) RawSQL(query string) ([]string, [][]string, error)
- func (db *DB) Search(ctx context.Context, input string) ([]search.Result, error)
- func (db *DB) Store() *store.Store
- func (db *DB) TranslateQuery(input string) (*search.TranslatedQuery, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB is the top-level CodeDB facade.
func (*DB) AttachAllDirtyIndexes ¶ added in v0.6.1
AttachAllDirtyIndexes scans the dirty index directory for manifest files and attaches all valid dirty overlays by worktree ID. This gives CLI searches access to all active worktree overlays simultaneously.
func (*DB) AttachDirtyIndex ¶ added in v0.5.0
AttachDirtyIndex opens the daemon-built on-disk dirty overlay and aliases it with the shared CodeIndex for transparent search. Uses a default key; for multi-worktree support use AttachDirtyIndexByID.
func (*DB) AttachDirtyIndexByID ¶ added in v0.6.1
AttachDirtyIndexByID opens an on-disk dirty overlay by worktree ID and path. Multiple overlays can be attached simultaneously; all are merged at query time.
func (*DB) AttachDirtyOverlay ¶ added in v0.5.0
AttachDirtyOverlay creates an in-memory Bleve overlay for dirty worktree files. Primarily used in tests; production uses AttachDirtyIndex for on-disk overlays.
func (*DB) BuildDirtyIndex ¶ added in v0.5.0
func (db *DB) BuildDirtyIndex(ctx context.Context, localPath string, opts index.IndexOptions) (int, error)
BuildDirtyIndex builds an on-disk Bleve index of dirty (uncommitted) files. Called by the daemon after committed content indexing.
func (*DB) DetachDirtyIndexByID ¶ added in v0.6.1
DetachDirtyIndexByID removes a specific dirty overlay by ID.
func (*DB) DetachDirtyOverlay ¶ added in v0.5.0
func (db *DB) DetachDirtyOverlay()
DetachDirtyOverlay closes all attached dirty overlays.
func (*DB) DirtyOverlayCount ¶ added in v0.6.1
DirtyOverlayCount returns the number of currently attached dirty overlays.
func (*DB) GCDirtyIndexes ¶ added in v0.6.0
GCDirtyIndexes removes stale dirty overlay directories for worktrees that no longer exist on disk. Returns the number of overlays removed.
func (*DB) IndexGitHubData ¶ added in v0.5.0
func (db *DB) IndexGitHubData(ctx context.Context, ledgerPath string, progress func(string)) (*index.GitHubIndexStats, error)
IndexGitHubData reads PR/issue JSON files from the ledger and indexes them into CodeDB.
func (*DB) IndexLocalRepo ¶
IndexLocalRepo indexes a local git repository's committed content.
func (*DB) ParseComments ¶ added in v0.5.0
ParseComments extracts comments from all unparsed blobs with supported languages.
func (*DB) ParseSymbols ¶
ParseSymbols extracts symbols from all unparsed blobs with supported languages.
func (*DB) TranslateQuery ¶
func (db *DB) TranslateQuery(input string) (*search.TranslatedQuery, error)
TranslateQuery parses a query and returns the generated SQL without executing.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package comments extracts comments from source code using a character-level scanner configured by language-specific syntax families.
|
Package comments extracts comments from source code using a character-level scanner configured by language-specific syntax families. |
|
Package symbols extracts symbol definitions and references from source code using tree-sitter via gotreesitter (pure Go, no CGO required).
|
Package symbols extracts symbol definitions and references from source code using tree-sitter via gotreesitter (pure Go, no CGO required). |