@@ -180,11 +180,14 @@ added: v22.13.0
180180 * ` useBigIntArguments ` {boolean} If ` true ` , integer arguments to ` function `
181181 are converted to ` BigInt ` s. If ` false ` , integer arguments are passed as
182182 JavaScript numbers. ** Default:** ` false ` .
183- * ` varargs ` {boolean} If ` true ` , ` function ` can accept a variable number of
184- arguments. If ` false ` , ` function ` must be invoked with exactly
185- ` function.length ` arguments. ** Default:** ` false ` .
183+ * ` varargs ` {boolean} If ` true ` , ` function ` may be invoked with any number of
184+ arguments (between zero and [ ` SQLITE_MAX_FUNCTION_ARG ` ] [ ] ). If ` false ` ,
185+ ` function ` must be invoked with exactly ` function.length ` arguments.
186+ ** Default:** ` false ` .
186187* ` function ` {Function} The JavaScript function to call when the SQLite
187- function is invoked.
188+ function is invoked. The return value of this function should be a valid
189+ SQLite data type: see [ Type conversion between JavaScript and SQLite] [ ] .
190+ The result defaults to ` NULL ` if the return value is ` undefined ` .
188191
189192This method is used to create SQLite user-defined functions. This method is a
190193wrapper around [ ` sqlite3_create_function_v2() ` ] [ ] .
@@ -583,10 +586,12 @@ resolution handler passed to [`database.applyChangeset()`][]. See also
583586[ Constants Passed To The Conflict Handler ] : https://www.sqlite.org/session/c_changeset_conflict.html
584587[ Constants Returned From The Conflict Handler ] : https://www.sqlite.org/session/c_changeset_abort.html
585588[ SQL injection ] : https://en.wikipedia.org/wiki/SQL_injection
589+ [ Type conversion between JavaScript and SQLite ] : #type-conversion-between-javascript-and-sqlite
586590[ `ATTACH DATABASE` ] : https://www.sqlite.org/lang_attach.html
587591[ `PRAGMA foreign_keys` ] : https://www.sqlite.org/pragma.html#pragma_foreign_keys
588592[ `SQLITE_DETERMINISTIC` ] : https://www.sqlite.org/c3ref/c_deterministic.html
589593[ `SQLITE_DIRECTONLY` ] : https://www.sqlite.org/c3ref/c_deterministic.html
594+ [ `SQLITE_MAX_FUNCTION_ARG` ] : https://www.sqlite.org/limits.html#max_function_arg
590595[ `database.applyChangeset()` ] : #databaseapplychangesetchangeset-options
591596[ `sqlite3_changes64()` ] : https://www.sqlite.org/c3ref/changes.html
592597[ `sqlite3_close_v2()` ] : https://www.sqlite.org/c3ref/close.html
0 commit comments