@@ -107,6 +107,9 @@ exposed by this class execute synchronously.
107107<!-- YAML
108108added: v22.5.0
109109changes:
110+ - version: REPLACEME
111+ pr-url: https://github.com/nodejs/node/pull/62241
112+ description: Add `verbose` option.
110113 - version:
111114 - v25.5.0
112115 - v24.14.0
@@ -180,6 +183,13 @@ changes:
180183 * ` likePatternLength ` {number} Maximum length of a LIKE pattern.
181184 * ` variableNumber ` {number} Maximum number of SQL variables.
182185 * ` triggerDepth ` {number} Maximum trigger recursion depth.
186+ * ` verbose ` {Function} An optional callback function that is invoked for
187+ every SQL statement executed against the database. The callback receives
188+ the expanded SQL string (with bound parameter values substituted) as its
189+ only argument. If expansion fails, the source SQL (with unsubstituted
190+ placeholders) is passed instead. This is useful for logging and debugging.
191+ This option is a wrapper around [ ` sqlite3_trace_v2() ` ] [ ] .
192+ ** Default:** ` undefined ` .
183193
184194Constructs a new ` DatabaseSync ` instance.
185195
@@ -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