Expand description
Query module for symbol, reference, and call search operations.
This module provides the core search functionality for llmgrep, including:
- Symbol search with fuzzy matching and filtering
- Reference search (find incoming edges to symbols)
- Call search (find outgoing function calls from symbols)
- AST-based filtering by node kind
- Metrics-based filtering (complexity, fan-in, fan-out)
- Algorithm-based filtering (reachable, dead-code, cycles, etc.)
§Search Options
All search operations use SearchOptions to configure the query.
See the SearchOptions struct documentation for all available options.
§Language Inference
The infer_language function detects programming language from file extensions,
used for labeling symbols with their source language.
Structs§
- AstOptions
- AST-based filtering options
- Code
Chunk - Code chunk from Magellan’s code_chunks table.
- Context
Options - Context extraction options
- Depth
Options - Depth-based filtering options
- FqnOptions
- FQN inclusion options (symbols only)
- Metrics
Options - Metrics-based filtering options
- Search
Options - Options for all search functions
- Snippet
Options - Snippet extraction options
Enums§
- Backend
Format - Database backend format detection
- Coverage
Filter - Coverage filter for symbol search.
Functions§
- detect_
backend_ format - Detect the backend format of a database file by checking magic bytes
- infer_
language - Infer programming language from file extension
- search_
calls - Public wrapper for search_calls that handles connection opening and validation.
- search_
chunks_ by_ span - Query the code_chunks table by span
- search_
chunks_ by_ symbol_ name - Query the code_chunks table by symbol name
- search_
references - Public wrapper for search_references that handles connection opening and validation.
- search_
symbols - Public wrapper for search_symbols that handles connection opening and validation.