Expand description
Query framework and built-in queries over the knowledge graph.
This module defines the Query trait and a collection of ready-to-use
queries such as ConnectedFilesQuery, FunctionUsageQuery,
CycleDetectionQuery, ShortestPathQuery, HubsQuery,
ModuleCentralityQuery, TraitImplsQuery, and UnreferencedItemsQuery.
Each query operates on crate::graph::KnowledgeGraph and returns results
suitable for CLI or library consumption.
Structs§
- Connected
Files Query - Return the set of files directly connected to a target file by any relationship involving items defined in that file (edge endpoints at item-level are projected to file-level).
- Cycle
Detection Query - Detect cycles over the file-level projection of the graph.
- Function
Usage Query - Find callers or callees for a given function name, returning unique file paths.
- Hubs
Query - Compute top-N files by degree centrality.
- Item
Info Query - Item
Info Relation Entry - Item
Info Result - Module
Centrality Query - Compute top-N modules (by directory) by degree centrality.
- Shortest
Path Query - Compute shortest path between two files (directed edges) on the file-level projection.
- Trait
Impls Query - List types implementing a given trait name.
- Unreferenced
Items Query - Find items without inbound Uses/Calls edges.
Enums§
- Centrality
Metric - Metric for degree centrality used by
HubsQueryandModuleCentralityQuery. - Usage
Direction - Direction for
FunctionUsageQuery.
Traits§
- Query
- Query trait implemented by all query types.