@@ -180,11 +180,14 @@ added: v22.13.0
180
180
* ` useBigIntArguments ` {boolean} If ` true ` , integer arguments to ` function `
181
181
are converted to ` BigInt ` s. If ` false ` , integer arguments are passed as
182
182
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 ` .
186
187
* ` 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 ` .
188
191
189
192
This method is used to create SQLite user-defined functions. This method is a
190
193
wrapper around [ ` sqlite3_create_function_v2() ` ] [ ] .
@@ -583,10 +586,12 @@ resolution handler passed to [`database.applyChangeset()`][]. See also
583
586
[ Constants Passed To The Conflict Handler ] : https://www.sqlite.org/session/c_changeset_conflict.html
584
587
[ Constants Returned From The Conflict Handler ] : https://www.sqlite.org/session/c_changeset_abort.html
585
588
[ SQL injection ] : https://en.wikipedia.org/wiki/SQL_injection
589
+ [ Type conversion between JavaScript and SQLite ] : #type-conversion-between-javascript-and-sqlite
586
590
[ `ATTACH DATABASE` ] : https://www.sqlite.org/lang_attach.html
587
591
[ `PRAGMA foreign_keys` ] : https://www.sqlite.org/pragma.html#pragma_foreign_keys
588
592
[ `SQLITE_DETERMINISTIC` ] : https://www.sqlite.org/c3ref/c_deterministic.html
589
593
[ `SQLITE_DIRECTONLY` ] : https://www.sqlite.org/c3ref/c_deterministic.html
594
+ [ `SQLITE_MAX_FUNCTION_ARG` ] : https://www.sqlite.org/limits.html#max_function_arg
590
595
[ `database.applyChangeset()` ] : #databaseapplychangesetchangeset-options
591
596
[ `sqlite3_changes64()` ] : https://www.sqlite.org/c3ref/changes.html
592
597
[ `sqlite3_close_v2()` ] : https://www.sqlite.org/c3ref/close.html
0 commit comments