Skip to main content

Module queries

Module queries 

Source

Structs§

OutlineCounts
How many names one outline row stands for.
OutlineScope
The path filter and depth of one outline, as SQL parameters.

Enums§

QueryError

Constants§

BASELINE_PATH_CAP
The largest number of files one answer is measured against.
CATEGORY_ALIASES
Category aliases mapped to the pattern-id families they name.
DEFINITION_KINDS
Symbol kinds that define a body: the kinds a touched-symbol or ranking rule prefers over locals.
MAX_RESULT_LIMIT
OUTLINE_FILE_CAP
The most files one outline lists by name.

Functions§

alias_fact_counts
Counts the patterns and facts each category alias reaches, given a category listing.
compute_blast_radius
Compute blast radius and likely tests for given seed symbols or seed file paths.
compute_blast_radius_scoped
Compute blast radius and likely tests for given seed symbols or seed file paths. Recursively walks reverse reachability (transitive callers) up to max_depth in SQLite.
compute_blast_radius_scoped_with_ids
Compute blast radius with exact current-index IDs kept as traversal seeds.
count_file_symbols
Count parse diagnostics recorded for a file, returning 0 when the index has none. Number of indexed symbols in one file, without loading the rows. Like load_file_symbols, an exact-case path wins and the case-insensitive match is only the fallback.
count_parse_diagnostics
file_not_found_parts
The workspace name and the recovery hint for a file that is not indexed.
file_sizes_for_paths
Sums the indexed byte size of up to BASELINE_PATH_CAP distinct paths. Returns 0 when no path is indexed, so telemetry never fails a tool call.
find_callee_signatures
Resolve callee signatures directly in a single joined query, avoiding N+1 queries and preserving ambiguous methods across types. Prioritizes functions/methods over enum variants.
find_literals
Find literals (endpoints, SQL queries, configs) matching category.
find_literals_scoped
Find literals (endpoints, SQL queries, configs) matching category, optionally scoped by path.
find_references
Find callers or callees of a symbol (filters unresolved external stdlib/runtime primitives by default).
find_references_ext
Find callers or callees with option to include external runtime/stdlib primitives.
find_references_for_symbol
find_references_for_symbol_ext
find_references_scoped
Find callers or callees with optional file path disambiguation filter and external symbols toggle.
find_related_tests
Find tests related to a target symbol by caller relationships, naming pattern, or FTS matching.
find_related_types
The workspace type definitions named by the type facts of target and of its parameters and locals, one per name, as signature (path:line). A name with no type definition in the index, such as Result or String, is left out. Same-file definitions win, then shorter paths.
find_structural_facts
Find structural facts by category (e.g. route, query, model, config).
find_structural_facts_scoped
Find structural facts by category (e.g. route, query, model, config), optionally scoped by path.
find_type_facts
Find type facts for a symbol.
folds_into_import_line
True when lookup shows row inside the one line that counts the imports of query, not as a row of its own: an import of that exact name, when some row is a definition. Such rows do not count toward the lookup limit.
for_each_outline_path
Streams every file path in the outline scope that has an extractor, in path order.
for_each_unsupported_path
Streams the paths of files in the outline scope that no extractor reads.
fts_search_symbols_explained
Conceptual full-text search that also attaches the rerank breakdown to every row when explain is true. Without it, explain stays None on every row.
fts_search_symbols_scoped
Conceptual full-text search with optional path scoping filter.
get_file
Lookup single file metadata by path with slash-boundary matching.
get_symbol_by_id
Retrieve one indexed symbol by its exact current-index identifier.
get_symbol_by_name
Find a specific symbol by name, with an optional path filter for disambiguation.
get_symbol_by_name_exact
Find a specific symbol by name, requiring exact path match (used for atomic edits).
get_symbol_overloads
The overloads a name selects: one symbol, or every symbol with that name, owner, and file. Any other set of candidates is an AmbiguousSymbol error.
import_sites
The import statements of the top-level definition name (under path_filter when given): an import row with that name whose source module names a folder or file on the definition’s path. find_references lists calls and type uses, so these go in a summary line after them.
inherited_writes_among
The ids among ids that [inherited_attribute_write] leaves out. Callers check only the rows they return, because the check walks base classes and a common word touches thousands of rows.
is_category_alias
True when the category text names one of the aliases in CATEGORY_ALIASES.
is_test_path
list_structural_fact_categories
List all available structural fact and literal categories with counts.
list_structural_fact_categories_scoped
List available structural fact and literal categories with counts, optionally scoped by path.
load_file_symbols
Load all symbols declared inside a specific file.
load_outline_counts
For each file the outline lists by name: its top-level definitions that are not tests, its tests, and its fixtures, so the outline can say how many names it left out.
load_scoped_files
Retrieve indexed files optionally scoped by path filter, pushed down to SQLite.
load_scoped_outline_symbols
Load up to limit_per_file top-level definitions for each file the outline lists by name. Files deeper than depth are filtered out in SQLite to keep memory strictly bounded. The unary + keeps the overload check on the name index: the parent index would walk every top-level symbol of the repository for each row.
normalize_kind
Normalizes common symbol kind aliases to their canonical database representation.
qualify_members
Renames each row whose parent is a class or another code type to Owner.name, so a list of __init__ rows says which class each one belongs to. For text output only: other tools take the qualified name, and JSON keeps the raw name.
sanitize_fts5_query
Sanitizes a free-form user query into (and_query, or_query) formatted for SQLite FTS5. Each alphanumeric/underscore token is quoted and given a prefix wildcard: "token"*. Identifiers are split at case boundaries too (parseHTTPResponse -> parse HTTP Response), so a camelCase query finds a snake_case symbol. Each split identifier keeps its unsplit form as an alternative inside its own required term, so a camelCase symbol, which FTS5 indexes as one token, still matches. A query of two or three words also tries their concatenation. English stop words are dropped unless the whole query is stop words, and tokens under three characters get no prefix wildcard.
search_symbols
Search symbols by name query, kind filter, and test flag.
search_symbols_scoped
suggest_file_paths
Up to three indexed file paths close to rel_path. Never fails.
suggest_symbol_names
Up to three indexed symbols whose names are close to name. Never fails.
symbol_not_found_parts
The workspace name and the recovery hint for a symbol that is not indexed.
validate_result_limit
workspace_name
The name of the repository this index was built for, for not-found messages.