Skip to main content

Module standalone

Module standalone 

Source
Expand description

The STANDALONE family’s model — a hand-written struct’s three faces, composed from the units. The STANDALONE family’s model: a hand-written struct’s Filter, Comparison and OrderBy faces, composed from the same unit walks #[ingraph::record(…)] composes.

§What the bare doors add to the units: NOTHING

That is the ruling and it is also the code. Each emit_* below assembles rows and calls a unit; there is no second emitter and no standalone-only shape. What the GRAMMAR WORD adds — the storage lowerings, the wire faces, the per-database order terms, the row equations — is exactly what a hand-written struct has no table to render against, so a bare door adds none of it.

§A field with NO interpretation word takes its type’s own reading

The record MANDATES the word on a stored or exposed field, and the reason is storage: a column’s physical layout is decided by the kind, so a record that let the kind be inferred would let a table shape be inferred. A bare face has no table. So a field writing no word here resolves through DefaultMarker — the same inference the marker layer already answers for every field whose type has one sensible reading — and a field writing one spends it exactly as the record does.

That is a WIDENING and not a reduced dialect: every word the record takes is taken here, and one declaration the record refuses is accepted. Stated because it is the one place the two doors’ grammars differ, and the difference is the storage the word was mandated for.

§The DATABASE set is the container’s, and it decides how many comparisons there are

A record’s comparison is per database because its fields are STORAGE-typed and the storage type is per database. A standalone struct that names no database has one type to be compared in, so it gets ONE comparison, generic in its dialect — the same shape a record’s is, at a parameter. Naming databases (persist(sqlite, postgres)) gets one per database, each named by the same two functions a record’s is: default_comparison_name(default_row_name(subject, kind)).

§A crossing that NAMES the projection is unwritable at a generic DB, and that is measured

§rather than chosen

TryFromFilter<F> for <S>Comparison<DB> written with <F as ToDatabaseComparison<V, Db>>::Comparison as its where clause’s self type is unwritable at a generic DB: the projection there makes rustc resolve it through the impl that DEFINES it, so the clause demands whatever that impl demands of Db — including Db::Builder<'q> == SqlConjunction<'q, Db>, which no Db bound can supply. The interface’s own crossing records the same wall and answers it the same way: name a backend.

The self type in that sentence is the WHERE CLAUSE’s, not the impl’s. The impl head names the minted comparison already, at both doors — writing the concrete name instead of the projection is the spelling in use rather than one left untried, and the wall survives it because the rows the BODY owes have the projection as their self type. Measured at the seventh spelling on 2026-08-22; FieldsModel’s pair carries the compiler output and the control that isolates the seam to the comparison’s MEMBER type.

§The wall has a door, and now NEITHER arm stops at it

Unwritable above is true of a crossing that NAMES the projection, and that is a fact about a spelling rather than about the dialect. ToCrossedComparison reaches the same two rows through METHODS, which return the projection instead of naming it in a bound, and the fragment tier writes its crossing at a parameter over that — one impl for every backend, its where clause one row per member with the FILTER as each self type. StandaloneModel::generic_pair is that same shape, read onto a declaration’s own columns — BARE or NAMED, the same method either way: where the container names a filter seat with #[ingraph(filter = "…")], the comparison gets TryFromFilter<F> for <S>Comparison<DB> and the empty-predicate Default beside it, one impl for every backend, discharged wherever a caller names a concrete one.

Gated on the SEAT rather than on the wall, and rather than on bareness. This door’s value-level crossing is a refinement of the map row StandaloneModel::crossing emits, a refinement needs something to refine, and a declaration naming no hook has written a refinement of nothing — the reason the FIELD-level refusal already gives, unmoved and unworded-differently by this. So the pair rides the same gate the map row always has: a hook, or neither half — asked once and answered the same way whether or not the declaration also named a database, because the wall this door answers was never about the store words either.

The NAMED loop’s own absence WAS scope rather than the wall, and this is the knife that closes it. A named database only ever changed which STORED type a column crosses through here — the comparison itself stays a parameter whether or not a database was named, so nothing about unwritable at a generic DB ever distinguished the two arms; #358 measured the bare one and left the named one flagged rather than measuring both at once, because measuring one shape at a time is how a wall gets a door instead of a hole. StandaloneModel::emit_comparison now calls StandaloneModel::generic_pair beside BOTH arms’ own calls — the bare branch’s at = None and each named iteration’s own at = Some(…) — never once touching one_comparison’s own body, which is what keeps everything the pair does not add byte for byte what it was, in both arms, by construction rather than by audit.

The per-database STORED-type override composes without a new reader. crossing_of already had to answer what does this column store, because held and assumptions ask it for every comparison this door emits, named or not — stored is that answer, and it already reads the per-database override where a named declaration wrote one. Threading the same at this door’s other readers already carry into crossing_of is the whole of what the named loop needed: the crossing’s V becomes the STORED type at that database exactly where the struct’s own fields already are one, and ToCrossedComparison<V, Db> asks nothing of V that ties it to the DOMAIN type. Measured at two declarations that store the SAME column shape under two DIFFERENT types, crossing live at SQLite — see ingraph/tests/standalone_named_crossing.rs. A flatten column asks one_comparison’s own Self::new for one bound the plain crossing does not supply; crossings states it beside the crossing rather than instead of it, the same branch assumptions already carries, read here for the reason that one already established.

A finding the measurement surfaced, pre-existing and untouched by this knife. The fixture above is TWO declarations rather than one naming both databases, because one naming both does not compile: crossing emits, for EVERY named database, impl<DB> ToDatabaseComparison<Subject, DB> for Hook { … } — ONE HEAD, since neither the trait’s own arguments nor the self type mention the database NAME. Two named databases is two impls sharing that head, and rustc’s overlap check does not weigh where clauses when deciding two impls conflict — E0119, on a struct that names two databases and a hook, regardless of whether either comparison ever gains a value-level pair. [crossing] is byte-identical to origin/main here, so this is not a fact about what this knife adds; it is a fact about the map row that already existed, unmeasured until a compiled fixture finally named two databases and a hook at once. Reconciling it — keying the map row on something the database name reaches, or refusing the combination by name at the front end — is open, and is a knife of its own.

Structs§

StandaloneColumn
One field of the struct, as the three doors read it.
StandaloneModel
A hand-written struct, as the three bare doors read it.
StandaloneStored
How ONE database stores one column.