Skip to content

Commit 45a8e19

Browse files
committed
buffer: add prepare options doc
1 parent 6da81dd commit 45a8e19

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

doc/api/sqlite.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,13 +453,23 @@ Opens the database specified in the `path` argument of the `DatabaseSync`
453453
constructor. This method should only be used when the database is not opened via
454454
the constructor. An exception is thrown if the database is already open.
455455

456-
### `database.prepare(sql)`
456+
### `database.prepare(sql[, options])`
457457

458458
<!-- YAML
459459
added: v22.5.0
460460
-->
461461

462462
* `sql` {string} A SQL string to compile to a prepared statement.
463+
* `options` {Object} Optional configuration for the prepared statement.
464+
* `readBigInts` {boolean} If `true`, integer fields are read as `BigInt`s.
465+
**Default:** inherited from database options or `false`.
466+
* `returnArrays` {boolean} If `true`, results are returned as arrays.
467+
**Default:** inherited from database options or `false`.
468+
* `allowBareNamedParameters` {boolean} If `true`, allows binding named
469+
parameters without the prefix character. **Default:** inherited from
470+
database options or `true`.
471+
* `allowUnknownNamedParameters` {boolean} If `true`, unknown named parameters
472+
are ignored. **Default:** inherited from database options or `false`.
463473
* Returns: {StatementSync} The prepared statement.
464474

465475
Compiles a SQL statement into a [prepared statement][]. This method is a wrapper

0 commit comments

Comments
 (0)