Expand description
Model files: derived arbor structure over any Quarb source.
A Model (parsed from a --model file, see parse_model)
declares derived containers, references, and edges over a
base arbor — the top rung of the reference-provenance ladder,
generalizing the SQLite views-and---refs construction to any
substrate (a CSV, a JSON export, a log stream).
ModelAdapter wraps a base adapter and presents the base’s own
nodes unchanged, adding the derived containers as new root
children in a reserved node-id band (bit 63). Derived structure
materializes lazily: a node constructor runs its query over the
base (never over self, so no recursion) on first touch, and
the distinct string-keyed values are cached. Declared references
and edges build forward/reverse value indexes on first use.
Structs§
- Borrowed
- A borrowing adapter: lets a
ModelAdapterenrich an adapter a caller holds by reference (behinddyn) without taking ownership — the shape bothqua’srunfunnel andquai’s per-query dispatch need, since the concrete adapter is already wrapped (now-binding, shell-gating) and only borrowed there. - Edge
Decl - Model
- One parsed model file.
- Model
Adapter - A base arbor enriched with a model’s derived structure.
- Mount
- Node
Decl - RefDecl
Functions§
- parse_
model - Parse model-file text.
- resolve_
mount_ target - Resolve a
mounttarget against the model file’s directory: a scheme target (neo4j://,git:…) or an absolute path is left as-is; a relative filesystem path is joined tobase_dir, so a shipped fixture directory is self-locating.