Skip to main content

sqlfunc_source

Function sqlfunc_source 

Source
fn sqlfunc_source(
    attr: &TokenStream,
    func: &ItemFn,
    input_tys_raw: &[Type],
    output_ty_raw: &Type,
    input_tys: &[Type],
) -> TokenStream
Expand description

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.

Text comes from the token trees via render_tokens, so formatting and comments do not affect it. input_tys_raw are the parameter types as written, for the signature. input_tys are the erased types the trait impl uses, for the probes.