You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/changelogs/CHANGELOG_V23.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -229,6 +229,34 @@ Contributed by Giovanni Bucci in [#54630](https://github.com/nodejs/node/pull/54
229
229
230
230
### Notable Changes
231
231
232
+
#### SQLite Session Extension
233
+
234
+
Basic support for the [SQLite Session Extension](https://www.sqlite.org/sessionintro.html) got added to the experimental `node:sqlite` module.
235
+
236
+
```js
237
+
constsourceDb=newDatabaseSync(':memory:');
238
+
consttargetDb=newDatabaseSync(':memory:');
239
+
240
+
sourceDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)');
241
+
targetDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)');
242
+
243
+
constsession=sourceDb.createSession();
244
+
245
+
constinsert=sourceDb.prepare('INSERT INTO data (key, value) VALUES (?, ?)');
246
+
insert.run(1, 'hello');
247
+
insert.run(2, 'world');
248
+
249
+
constchangeset=session.changeset();
250
+
targetDb.applyChangeset(changeset);
251
+
// Now that the changeset has been applied, targetDb contains the same data as sourceDb.
252
+
```
253
+
254
+
Of note to distributors when dynamically linking with SQLite (using the `--shared-sqlite` flag): compiling SQLite with `SQLITE_ENABLE_SESSION` and `SQLITE_ENABLE_PREUPDATE_HOOK` defines is now required.
255
+
256
+
Contributed by Bart Louwers in [#54181](https://github.com/nodejs/node/pull/54181).
*\[[`ccb69bb8d5`](https://github.com/nodejs/node/commit/ccb69bb8d5)] - **(SEMVER-MINOR)****src**: add cli option to preserve env vars on dr (Rafael Gonzaga) [#55697](https://github.com/nodejs/node/pull/55697)
234
262
*\[[`d4e792643d`](https://github.com/nodejs/node/commit/d4e792643d)] - **(SEMVER-MINOR)****util**: add sourcemap support to getCallSites (Marco Ippolito) [#55589](https://github.com/nodejs/node/pull/55589)
0 commit comments