feat(extraction): add Nix language support with module-system option wiring (#324, #332 via #648 — carries #1084) (#1190)
Carries @TyceHerrman's #1084 as the functional base. Extraction + file wiring (imports/modules lists, callPackage), module-system option-path synthesizer, lexical-scope resolution gates, ABI-15 wasm rebuilt from upstream source. Validated on agenix, nix-darwin, home-manager, and nixpkgs (44,368 files, 3m49s, 1.30M nodes). Co-authored-by: Tyce Herrman <Tyce.Herrman@pm.me> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Tyce Herrman
Claude Fable 5
parent
99152212a9
commit
7f325134e0
@@ -211,6 +211,7 @@ export class QueryBuilder {
|
||||
deleteUnresolvedByNode?: SqliteStatement;
|
||||
getUnresolvedByName?: SqliteStatement;
|
||||
getNodesByName?: SqliteStatement;
|
||||
getNodesByNamePrefix?: SqliteStatement;
|
||||
getNodesByQualifiedNameExact?: SqliteStatement;
|
||||
getNodesByLowerName?: SqliteStatement;
|
||||
getUnresolvedCount?: SqliteStatement;
|
||||
@@ -890,6 +891,20 @@ export class QueryBuilder {
|
||||
return rows.map(rowToNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Nodes whose name starts with `prefix`, by index range scan (a LIKE would
|
||||
* skip idx_nodes_name under SQLite's default case-insensitive LIKE).
|
||||
*/
|
||||
getNodesByNamePrefix(prefix: string, limit = 20): Node[] {
|
||||
if (!this.stmts.getNodesByNamePrefix) {
|
||||
this.stmts.getNodesByNamePrefix = this.db.prepare(
|
||||
'SELECT * FROM nodes WHERE name >= ? AND name < ? ORDER BY name LIMIT ?'
|
||||
);
|
||||
}
|
||||
const rows = this.stmts.getNodesByNamePrefix.all(prefix, prefix + '', limit) as NodeRow[];
|
||||
return rows.map(rowToNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get nodes by exact qualified name match (uses idx_nodes_qualified_name index)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user