Skip to main content

comparison_lowering

Function comparison_lowering 

Source
pub fn comparison_lowering(
    name: &Ident,
    database: &Ident,
    crossings: &TokenStream,
    seats: &LoweringSeats,
    columns: &[LoweringColumn],
) -> TokenStream
Expand description

The comparison’s LOWERING: ComplexComparison, threading one accumulator through the columns.

§It needs no predicate the struct did not already carry

Each field is held at <F as ToDatabaseComparison<V, Db>>::Comparison, and the map’s ITEM BOUND — type Comparison: ComplexComparison<Db> — is what says such a field lowers. So the where clause is the struct’s own, spliced verbatim, and nothing here adds to it.

§The two names of one column, a layer apart

The MEMBER this reads is the field’s and no word moves it; the FRAME pushed below is the string this database RENDERS, which a per-database rename is exactly what moves. A flatten column pushes no frame at all — its own name is dropped, so its type’s columns join the holder’s namespace.

A sum with no leading zero: 0 + x is clippy::identity_op, which a consumer building under -D warnings would see inside an expansion it cannot edit.