Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc: document new options for database connection
  • Loading branch information
miguelmarcondesf committed Jun 12, 2025
commit 1aca01ee7dbef880a927e691281eeb848318952b
8 changes: 8 additions & 0 deletions doc/api/sqlite.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ added: v22.5.0
* `timeout` {number} The [busy timeout][] in milliseconds. This is the maximum amount of
time that SQLite will wait for a database lock to be released before
returning an error. **Default:** `0`.
* `readBigInts` {boolean} If `true`, integer fields are read as JavaScript `BigInt` values. If `false`,
integer fields are read as JavaScript numbers. **Default:** `false`.
* `returnArrays` {boolean} If `true`, query results are returned as arrays instead of objects.
**Default:** `false`.
* `allowBareNamedParameters` {boolean} If `true`, allows binding named parameters without the prefix
character (e.g., `foo` instead of `:foo`). **Default:** `true`.
* `allowUnknownNamedParameters` {boolean} If `true`, unknown named parameters are ignored when binding.
If `false`, an exception is thrown for unknown named parameters. **Default:** `false`.

Constructs a new `DatabaseSync` instance.

Expand Down
2 changes: 0 additions & 2 deletions src/node_sqlite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1836,8 +1836,6 @@ StatementSync::StatementSync(Environment* env,
allow_bare_named_params_ = db_->allow_bare_named_params();
allow_unknown_named_params_ = db_->allow_unknown_named_params();

// In the future, some of these options could be set at the database
// connection level and inherited by statements to reduce boilerplate.
bare_named_params_ = std::nullopt;
}

Expand Down
Loading