mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
doc: clarify sqlite user-defined function behaviour
PR-URL: https://github.com/nodejs/node/pull/56786 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
This commit is contained in:
@@ -182,11 +182,14 @@ added:
|
||||
* `useBigIntArguments` {boolean} If `true`, integer arguments to `function`
|
||||
are converted to `BigInt`s. If `false`, integer arguments are passed as
|
||||
JavaScript numbers. **Default:** `false`.
|
||||
* `varargs` {boolean} If `true`, `function` can accept a variable number of
|
||||
arguments. If `false`, `function` must be invoked with exactly
|
||||
`function.length` arguments. **Default:** `false`.
|
||||
* `varargs` {boolean} If `true`, `function` may be invoked with any number of
|
||||
arguments (between zero and [`SQLITE_MAX_FUNCTION_ARG`][]). If `false`,
|
||||
`function` must be invoked with exactly `function.length` arguments.
|
||||
**Default:** `false`.
|
||||
* `function` {Function} The JavaScript function to call when the SQLite
|
||||
function is invoked.
|
||||
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()`][].
|
||||
@@ -599,10 +602,12 @@ resolution handler passed to [`database.applyChangeset()`][]. See also
|
||||
[Constants Passed To The Conflict Handler]: https://www.sqlite.org/session/c_changeset_conflict.html
|
||||
[Constants Returned From The Conflict Handler]: https://www.sqlite.org/session/c_changeset_abort.html
|
||||
[SQL injection]: https://en.wikipedia.org/wiki/SQL_injection
|
||||
[Type conversion between JavaScript and SQLite]: #type-conversion-between-javascript-and-sqlite
|
||||
[`ATTACH DATABASE`]: https://www.sqlite.org/lang_attach.html
|
||||
[`PRAGMA foreign_keys`]: https://www.sqlite.org/pragma.html#pragma_foreign_keys
|
||||
[`SQLITE_DETERMINISTIC`]: https://www.sqlite.org/c3ref/c_deterministic.html
|
||||
[`SQLITE_DIRECTONLY`]: https://www.sqlite.org/c3ref/c_deterministic.html
|
||||
[`SQLITE_MAX_FUNCTION_ARG`]: https://www.sqlite.org/limits.html#max_function_arg
|
||||
[`database.applyChangeset()`]: #databaseapplychangesetchangeset-options
|
||||
[`sqlite3_changes64()`]: https://www.sqlite.org/c3ref/changes.html
|
||||
[`sqlite3_close_v2()`]: https://www.sqlite.org/c3ref/close.html
|
||||
|
||||
Reference in New Issue
Block a user