Skip to content

Commit 69e5438

Browse files
committed
doc: add verbose option doc
1 parent 349412e commit 69e5438

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

doc/api/sqlite.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ exposed by this class execute synchronously.
130130
<!-- YAML
131131
added: v22.5.0
132132
changes:
133+
- version: REPLACEME
134+
pr-url: https://github.com/nodejs/node/pull/62241
135+
description: Add `verbose` option.
133136
- version:
134137
- v25.5.0
135138
- v24.14.0
@@ -203,6 +206,13 @@ changes:
203206
* `likePatternLength` {number} Maximum length of a LIKE pattern.
204207
* `variableNumber` {number} Maximum number of SQL variables.
205208
* `triggerDepth` {number} Maximum trigger recursion depth.
209+
* `verbose` {Function} An optional callback function that is invoked for
210+
every SQL statement executed against the database. The callback receives
211+
the expanded SQL string (with bound parameter values substituted) as its
212+
only argument. If expansion fails, the source SQL (with unsubstituted
213+
placeholders) is passed instead. This is useful for logging and debugging.
214+
This option is a wrapper around [`sqlite3_trace_v2()`][].
215+
**Default:** `undefined`.
206216

207217
Constructs a new `DatabaseSync` instance.
208218

@@ -1566,6 +1576,7 @@ callback function to indicate what type of operation is being authorized.
15661576
[`sqlite3_load_extension()`]: https://www.sqlite.org/c3ref/load_extension.html
15671577
[`sqlite3_prepare_v2()`]: https://www.sqlite.org/c3ref/prepare.html
15681578
[`sqlite3_set_authorizer()`]: https://sqlite.org/c3ref/set_authorizer.html
1579+
[`sqlite3_trace_v2()`]: https://www.sqlite.org/c3ref/trace_v2.html
15691580
[`sqlite3_sql()`]: https://www.sqlite.org/c3ref/expanded_sql.html
15701581
[`sqlite3changeset_apply()`]: https://www.sqlite.org/session/sqlite3changeset_apply.html
15711582
[`sqlite3session_attach()`]: https://www.sqlite.org/session/sqlite3session_attach.html

0 commit comments

Comments
 (0)