Skip to main content Module sqlfunc Copy item path Source Modifiers π Modifiers passed as key-value pairs to the #[sqlfunc] macro. Arity π Arity classification for a function annotated with #[sqlfunc]. GenericUsage π How a generic type parameter T appears in a type. 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. arg_type π Determines the argument type of the nth argument of the function. binary_func π Produce a EagerBinaryFunc implementation. camel_case π classify_generic_usage π Classifies how a generic type parameter appears in a type. container_idents_match π Compare two container type paths by their ident segments (ignoring lifetimes
and generic arguments). Two containers are βsameβ if their path idents match. derive_output_type_for_generic π Derives an output_type_expr for a single generic parameter. derive_output_type_for_generics π Derives an output_type_expr TokenStream from the structural relationship
between input types and the output type, based on where generic parameters appear. determine_arity π Determines the arity of a function annotated with #[sqlfunc]. element_type_expr π Generates a token stream that extracts the T-level SQL type from an input
access expression, based on how T is used in that input. elide_lifetimes π Replaces all lifetime parameters in a syn::TypePath with '_. elide_lifetimes_in_type π Recursively replaces all lifetime parameters in a syn::Type with '_. erase_all_generic_params π Erases all generic type parameters from a type, replacing each with Datum<'a>. erase_generic_param π Replaces occurrences of a generic type parameter with Datum<'a> in a type. find_generic_type_params π Extracts generic type parameters from a function signature.
Returns an empty Vec if there are no type parameters. generate_test π is_nullable_type π Convert an identifier to a camel-cased identifier.
Checks if a parameter type accepts NULL. is_option_wrapped π Returns whether the outermost wrapper of a type is Option. 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. type_contains_ident π Returns whether a type syntactically contains an identifier. 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.