function

This method is used to create SQLite user-defined functions. This method is a wrapper around sqlite3_create_function_v2().

Since

v22.13.0

Parameters

name

The name of the SQLite function to create.

options

Optional configuration settings for the function.

func

The JavaScript function to call when the SQLite function is invoked. The return value of this function should be a valid SQLite data type: see Type conversion between JavaScript and SQLite. The result defaults to NULL if the return value is undefined.