Function sqlite_loadable::scalar::define_scalar_function_with_aux
source · pub fn define_scalar_function_with_aux<F, T>(
db: *mut sqlite3,
name: &str,
num_args: c_int,
x_func: F,
func_flags: FunctionFlags,
aux: T
) -> Result<()>where
F: Fn(*mut sqlite3_context, &[*mut sqlite3_value], &T) -> Result<()>,
Expand description
Defines a new scalar function, but with the added ability to pass in an arbritary application “pointer” as any rust type. Can be accessed in the callback function as the 3rd argument, as a reference. https://www.sqlite.org/c3ref/create_function.html#:~:text=The%20fifth%20parameter%20is%20an%20arbitrary%20pointer.