Skip to main content

Module generate

Module generate 

Source
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), the Display impl (unless skip_display), the FuncName impl, and the annotated function itself.
generate 🔒
Generates the trait impl for one #[sqlfunc]-annotated function, together with the items expand wraps around it.
output_type_and_introduces_nulls 🔒
The column type expression the output-type method starts from, and the introduces_nulls method if one is generated.
override_methods 🔒
One fn name(&self) -> Ret { expr } per modifier present in mods, 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 call binds them to.