Skip to main content

order_identity

Function order_identity 

Source
pub fn order_identity(
    vis: &Visibility,
    term_name: &TokenStream,
    columns: &[OrderColumn],
) -> TokenStream
Expand description

The SEMANTIC IDENTITY method — the one input a cursor’s SIGNATURE takes from a term.

It is the FIELD’s own name — the name a per-database rename renames FROM — so a cursor minted against one deployment’s dialect is the same order’s on the next: a rendered name would SPLIT one order apart the moment either database renamed a column, and could ALIAS two orders together where two renames crossed.

It is no longer the ONLY name a rename cannot move — the variant is one too, being built from the same member — and that is a strengthening rather than a redundancy. What this still answers is what a variant cannot: a VALUE a decoder generic over the term type can ask for, fold into a signature and compare, where a variant is a type-level thing each subject spells for itself.

A method of its own rather than a part of order_by, because its GATE is not the enum’s: it is the PAGE’s, and a subject with no page to complete has nothing to do with it.