Skip to main content

Module sqlfunc

Module sqlfunc 

Source

StructsΒ§

Modifiers πŸ”’
Modifiers passed as key-value pairs to the #[sqlfunc] macro.

EnumsΒ§

Arity πŸ”’
Arity classification for a function annotated with #[sqlfunc].
SqlName πŸ”’
A name for the SQL function. It can be either a literal or a macro, thus we can’t use String or syn::Expr directly.

FunctionsΒ§

arg_type πŸ”’
Determines the argument type of the nth argument of the function.
binary_func πŸ”’
Produce a EagerBinaryFunc implementation.
camel_case πŸ”’
determine_arity πŸ”’
Determines the arity of a function annotated with #[sqlfunc].
generate_test πŸ”’
is_nullable_type πŸ”’
Convert an identifier to a camel-cased identifier. Checks if a parameter type accepts NULL.
is_variadic_arg πŸ”’
Checks whether a parameter’s type is Variadic<...> or OptionalArg<...>, which indicates the function should be treated as variadic regardless of parameter count.
is_variadic_type πŸ”’
Checks if a type is Variadic<T>.
last_is_arena πŸ”’
Checks if the last parameter of the function is a &RowArena.
non_nullable_position_checks πŸ”’
Generates per-position nullability checks for non-nullable parameters.
output_type πŸ”’
Determine the output type for a function. Returns an error if the function does not return a value.
patch_lifetimes πŸ”’
Recursively patches lifetimes in a type, adding 'a to references without a lifetime and recursing into generic arguments and tuples.
sqlfunc
Implementation for the #[sqlfunc] macro. The first parameter is the attribute arguments, the second is the function body. The third parameter indicates whether to include the test function in the output.
unary_func πŸ”’
Produce a EagerUnaryFunc implementation.
variadic_element_is_nullable πŸ”’
For a Variadic<T> type, checks if T accepts NULL.
variadic_func πŸ”’
Produce an EagerVariadicFunc implementation.