Crate common_macro
source ·Modules§
- admin_fn π
- aggr_func π
- print_caller π
- range_fn π
- stack_trace_debug πimplement
::common_error::ext::StackError
- utils π
Attribute Macros§
- Attribute macro to convert a normal function to SQL administration function. The annotated function should accept:
- A struct can be used as a creator for aggregate function if it has been annotated with this attribute first. This attribute add a necessary field which is intended to store the input dataβs types to the struct. This attribute is expected to be used along with derive macro AggrFuncTypeStore.
- Attribute macro to print the caller to the annotated function. The caller is printed as its filename and the call site line number.
- Attribute macro to convert an arithimetic function to a range function. The annotated function should accept servaral arrays as input and return a single value as output. This procedure macro can works on any number of input parameters. Return type can be either primitive type or wrapped in
Option
. - Attribute macro to derive std::fmt::Debug for the annotated
Error
type.
Derive Macros§
- Make struct implemented trait AggrFuncTypeStore, which is necessary when writing UDAF. This derive macro is expect to be used along with attribute macro as_aggr_func_creator.