This method is used to create SQLite user-defined functions. This method is a wrapper around sqlite3_create_function_v2()
.
method
sqlite.DatabaseSync.function
The name of the SQLite function to create.
Optional configuration settings for the function.
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
.
This method is used to create SQLite user-defined functions. This method is a wrapper around sqlite3_create_function_v2()
.
The name of the SQLite function to create.
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
.
Referenced types
interface FunctionOptions
- useBigIntArguments?: boolean
If
true
, integer arguments tofunction
are converted toBigInt
s. Iffalse
, integer arguments are passed as JavaScript numbers. - varargs?: boolean
If
true
,function
may be invoked with any number of arguments (between zero andSQLITE_MAX_FUNCTION_ARG
). Iffalse
,function
must be invoked with exactlyfunction.length
arguments.