Skip to main content

Crate quarb_model

Crate quarb_model 

Source
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 ModelAdapter enrich an adapter a caller holds by reference (behind dyn) without taking ownership — the shape both qua’s run funnel and quai’s per-query dispatch need, since the concrete adapter is already wrapped (now-binding, shell-gating) and only borrowed there.
EdgeDecl
Model
One parsed model file.
ModelAdapter
A base arbor enriched with a model’s derived structure.
Mount
NodeDecl
RefDecl

Functions§

parse_model
Parse model-file text.
resolve_mount_target
Resolve a mount target 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 to base_dir, so a shipped fixture directory is self-locating.