Skip to main content

Module source

Module source 

Source
Expand description

Source text the scalar function registry records for each #[sqlfunc].

The registry compares a function’s declaration, its types-only signature, and a fingerprint of its body across builds, so every string here depends only on the tokens the call site wrote, not on how they were spaced or commented.

Functions§

fnv1a64 🔒
FNV-1a, 64 bit. A fingerprint, not a secure hash: it only needs to be stable across builds and sensitive to any change in its input.
probe_column_type 🔒
An expression of type Option<SqlColumnType>: the column type of ty if it implements AsColumnType, else None. Resolved by autoref specialization on ColumnTypeProbe, so it needs no trait bound the macro cannot check.
probe_column_types 🔒
One probe expression per datum a parameter consumes. Variadic<T> stands for two T arguments and OptionalArg<T> for one present T.
render_into 🔒
render_tokens 🔒
Renders a token stream as compact, canonical source text.
single_generic_arg 🔒
The last path segment’s name and its single type argument, for types shaped like Wrapper<T>.
sqlfunc_source 🔒
Emits the source-derived members of the generated FuncName impl: the SQLFUNC const (declaration text, types-only signature, body fingerprint) and sqlfunc_input_types, which yields the column types the function naturally consumes when every parameter type has one. Both exist only under mz-expr’s func-registry feature, like the trait members they implement.
staticize_lifetimes 🔒
Replaces every lifetime in ty with 'static, so a type written against the trait impl’s 'a can be named in a function body.