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 tofunctionare converted toBigInts. Iffalse, integer arguments are passed as JavaScript numbers. - varargs?: boolean
If
true,functionmay be invoked with any number of arguments (between zero andSQLITE_MAX_FUNCTION_ARG). Iffalse,functionmust be invoked with exactlyfunction.lengtharguments.