-
Notifications
You must be signed in to change notification settings - Fork 1
primitives node and edge records
Bryan edited this page Jun 13, 2026
·
1 revision
Active contributors: Bryan
Node and edge records are the data structures that carry facts from parsers to SQLite. They are defined as dataclasses in src/lode/model.py.
The model layer keeps fact shape simple and serializable. Node describes one indexed thing, Edge describes one relationship, and FileIndex groups all facts from one file.
| Name | File | Description |
|---|---|---|
Node |
src/lode/model.py |
Graph node with ID, kind, name, qualified name, path, line range, signature, doc, confidence, content hash, and extra metadata. |
Edge |
src/lode/model.py |
Relationship with source, destination, kind, confidence, and detail. |
FileIndex |
src/lode/model.py |
Per-file package of metadata, nodes, and edges. |
make_node() in src/lode/indexer.py hashes the node kind, qualified name, path, and start line to create stable node IDs. Repository IDs are derived from resolved root paths in src/lode/config.py.
-
src/lode/indexer.pycreates records. -
src/lode/storage.pyserializes records into SQLite and FTS rows. -
src/lode/graph.pyreads records to resolve relationships. -
src/lode/context.pyandsrc/lode/cli.pyexpose records in compact JSON.
| File | Purpose |
|---|---|
src/lode/model.py |
Dataclass definitions. |
src/lode/indexer.py |
Node ID generation and parser output. |
src/lode/storage.py |
Serialization into SQLite. |
src/lode/config.py |
Repository ID helper. |