macro_rules! function { ($struct_name:ident::$function_name:ident($($arg_ty:expr),*) -> $return_ty:expr => $closure:expr) => { ... }; }
Expand description
§Examples
function!(MyFunction::sum(LogicalType::Integer, LogicalType::Integer) -> LogicalType::Integer => |v1: ValueRef, v2: ValueRef| {
DataValue::binary_op(&v1, &v2, &BinaryOperator::Plus)
});
let fnck_sql = DataBaseBuilder::path("./example")
.register_function(TestFunction::new())
.build()
.await?;