Expand description
Codegen shared by every scalar function arity.
Structs§
- Codegen 🔒
- What the shared codegen needs that is not arity specific.
Functions§
- expand 🔒
- Wraps an arity’s trait impl with the parts every arity shares: the unit-struct
definition (unless
has_self), theDisplayimpl (unlessskip_display), theFuncNameimpl, and the annotated function itself. - generate 🔒
- Generates the trait impl for one
#[sqlfunc]-annotated function, together with the itemsexpandwraps around it. - output_
type_ 🔒and_ introduces_ nulls - The column type expression the output-type method starts from, and the
introduces_nullsmethod if one is generated. - override_
methods 🔒 - One
fn name(&self) -> Ret { expr }per modifier present inmods, in the arity table’s order rather than the attribute’s order, so the generated code is stable against how a call site happens to spell its modifiers. - sql_
params 🔒 - The SQL arguments’ pre-erasure types, and the names
callbinds them to.