Skip to main content

Module property_graph

Module property_graph 

Source
Expand description

Property Graph Engine — SQLite-backed code knowledge graph.

Stores nodes (File, Symbol, Module) and edges (imports, calls, defines, exports) extracted by deep_queries + import_resolver. Provides efficient traversal queries for impact analysis, architecture discovery, and graph-driven context loading.

Re-exports§

pub use file_catalog::FileCatalogEntry;

Modules§

file_catalog
snapshot
Versioned, committable graph snapshots — Context-as-Code (GL#451).

Structs§

CodeGraph
DependencyChain
Edge
GraphQuery
ImpactResult
Node
PropertyGraphMetaV1

Enums§

EdgeKind
NodeKind

Constants§

GRAPH_ENGINE_VERSION
Property-graph engine generation. Bump whenever edge extraction changes (e.g. the type_ref edges that connect C#/Java same-namespace consumers to their definers, GH #398) so an existing graph built by an older engine is transparently rebuilt on the next query instead of being served without the new edges. Graphs whose graph.meta.json predates this stamp deserialize to engine version 0, so the first query after an upgrade rebuilds once.

Functions§

edge_weight
Weight multiplier per edge kind for impact scoring.
engine_outdated
true when the persisted graph was built by an engine older than GRAPH_ENGINE_VERSION — or predates the version stamp entirely (missing or unreadable meta) — and must therefore be rebuilt before its edges can be trusted. Callers pair this with a node-count check: an empty graph is rebuilt regardless; a non-empty-but-outdated graph is rebuilt by this gate.
file_connectivity
Graph connectivity stats for a file: incoming/outgoing edge counts by kind.
graph_dir
Resolve the directory for graph.db and graph.meta.json.
load_meta
meta_path
related_files
Related files for a given path: direct neighbors via any structural edge, sorted by edge weight (strongest relationship first). Returns (path, weight) pairs.
write_meta