pub struct BuiltFor {
pub kind: DatabaseKind,
pub comparison: Option<Path>,
pub cursor: Option<Path>,
}Expand description
ONE dialect this fragment is BUILT for, and whatever lowering it mounted there.
§The mount is per dialect because a lowering is
A comparison is backend-SPECIFIC by construction — that is ingraph::comparison’s own first
paragraph — so the seat that replaces one is per backend too. There is deliberately no
dialect-free spelling: a type generic over the SQL family serves three dialects and not MongoDB,
and a bare seat would leave that scope implicit at the one declaration that could have stated
it. A family-generic type is named at each dialect it serves, and each mention is audited
against the dialect it was written at.
Fields§
§kind: DatabaseKindWhich database this entry named.
comparison: Option<Path><db>(comparison = "…") — the type this fragment’s predicate LOWERS INTO at this dialect,
or None where the framework’s per-field product stands.
§What it replaces, and why a field list cannot say it
The emitted comparison is a per-FIELD product: one conjunct per column, each rendered one
segment below the address the whole value arrived at. A whole-value operator has no field to
hang on — overlaps on a time range is start < $end AND end > $start, one predicate over two
columns at once — so a household needing one bespoke lowering had to decline the storage
activation entirely, which is what kept the pilot’s time household hand-written.
It is the declared mirror of FieldsModel::filter: that word mounts the author’s WIRE
predicate and this one mounts the author’s LOWERING, and the two are independently swappable.
Where BOTH are written the framework still writes the map row that joins them — the author’s
filter at this dialect lowering into the author’s comparison — because that row is the one
artifact neither word can write for itself.
A syn::Path for FieldsModel::filter’s reason: it names a type this declaration did not
mint and the path is EMITTED, so one naming nothing is E0412 at the string the author wrote,
and one naming a type that does not answer the dialect’s faces is the audit’s own sentence at
the same span.
cursor: Option<Path><db>(cursor = "…") — the type that writes this fragment’s CURSOR BYTES at THIS dialect, or
None where the framed default stands there.
§Per dialect in substance, not only in grammar
The seat sits in a dialect group by the register law — a word that names a TYPE is written where
the dialect is, as comparison is one word over — and here the placement is what the value
MEANS rather than where it is filed: the bytes belong to that store. A page cursor is
session-lived pagination state rather than a durable id, so the only engine that has to read a
token is the one that minted it, and a household is free to keep a dense form per store.
So the entries need not agree, and a declaration mounting three different codecs at three
dialects is ordinary. FieldsModel::per_dialect_keyset is what spends them: one row per
DECLARED dialect, carrying the mounted codec where one was named and the frame where none was.
A syn::Path for Self::comparison’s reason, with the same two failure modes at the same
span.