Expand description
Implementations of proc macros to derive SQL function traits.
This is separate from the actual proc macro to allow exporting the function defining the proc macro itself. Proc macro crates cannot export anything but proc macros.
Modules§
- generate 🔒
- Codegen shared by every scalar function arity.
- modifiers 🔒
- The
#[sqlfunc]attribute’s key-value modifiers. - shape 🔒
- Per-arity descriptions of the three scalar function shapes.
- signature 🔒
- Analysis of a
#[sqlfunc]-annotated function’s signature. - source 🔒
- Source text the scalar function registry records for each
#[sqlfunc]. - sqlfunc 🔒
- The
#[sqlfunc]attribute macro’s entry point.
Functions§
- 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. - test_
sqlfunc - Expands
#[sqlfunc(attr)]onitemand returns the formatted expansion, or the formatted errors, along with the formatted input. - test_
sqlfunc_ str test_sqlfuncover source text, as the generated snapshot tests pass it.