@@ -176,11 +176,14 @@ added: v23.5.0
176
176
* ` useBigIntArguments ` {boolean} If ` true ` , integer arguments to ` function `
177
177
are converted to ` BigInt ` s. If ` false ` , integer arguments are passed as
178
178
JavaScript numbers. ** Default:** ` false ` .
179
- * ` varargs ` {boolean} If ` true ` , ` function ` can accept a variable number of
180
- arguments. If ` false ` , ` function ` must be invoked with exactly
181
- ` function.length ` arguments. ** Default:** ` false ` .
179
+ * ` varargs ` {boolean} If ` true ` , ` function ` may be invoked with any number of
180
+ arguments (between zero and [ ` SQLITE_MAX_FUNCTION_ARG ` ] [ ] ). If ` false ` ,
181
+ ` function ` must be invoked with exactly ` function.length ` arguments.
182
+ ** Default:** ` false ` .
182
183
* ` function ` {Function} The JavaScript function to call when the SQLite
183
- function is invoked.
184
+ function is invoked. The return value of this function should be a valid
185
+ SQLite data type: see [ Type conversion between JavaScript and SQLite] [ ] .
186
+ The result defaults to ` NULL ` if the return value is ` undefined ` .
184
187
185
188
This method is used to create SQLite user-defined functions. This method is a
186
189
wrapper around [ ` sqlite3_create_function_v2() ` ] [ ] .
@@ -579,10 +582,12 @@ resolution handler passed to [`database.applyChangeset()`][]. See also
579
582
[ Constants Passed To The Conflict Handler ] : https://www.sqlite.org/session/c_changeset_conflict.html
580
583
[ Constants Returned From The Conflict Handler ] : https://www.sqlite.org/session/c_changeset_abort.html
581
584
[ SQL injection ] : https://en.wikipedia.org/wiki/SQL_injection
585
+ [ Type conversion between JavaScript and SQLite ] : #type-conversion-between-javascript-and-sqlite
582
586
[ `ATTACH DATABASE` ] : https://www.sqlite.org/lang_attach.html
583
587
[ `PRAGMA foreign_keys` ] : https://www.sqlite.org/pragma.html#pragma_foreign_keys
584
588
[ `SQLITE_DETERMINISTIC` ] : https://www.sqlite.org/c3ref/c_deterministic.html
585
589
[ `SQLITE_DIRECTONLY` ] : https://www.sqlite.org/c3ref/c_deterministic.html
590
+ [ `SQLITE_MAX_FUNCTION_ARG` ] : https://www.sqlite.org/limits.html#max_function_arg
586
591
[ `database.applyChangeset()` ] : #databaseapplychangesetchangeset-options
587
592
[ `sqlite3_changes64()` ] : https://www.sqlite.org/c3ref/changes.html
588
593
[ `sqlite3_close_v2()` ] : https://www.sqlite.org/c3ref/close.html
0 commit comments