Skip to main content

BuiltFor

Struct BuiltFor 

Source
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: DatabaseKind

Which 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.

Trait Implementations§

Source§

impl Clone for BuiltFor

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BuiltFor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.