Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 710b8fc

Browse filesBrowse files
louwersaduh95
authored andcommitted
doc: add entry to changelog about SQLite Session Extension
PR-URL: #56318 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent dc3dafc commit 710b8fc
Copy full SHA for 710b8fc

File tree

Expand file treeCollapse file tree

1 file changed

+31
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+31
-0
lines changed
Open diff view settings
Collapse file

‎doc/changelogs/CHANGELOG_V23.md‎

Copy file name to clipboardExpand all lines: doc/changelogs/CHANGELOG_V23.md
+31Lines changed: 31 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,37 @@ Contributed by Giovanni Bucci in [#54630](https://github.com/nodejs/node/pull/54
399399
400400
### Notable Changes
401401
402+
#### SQLite Session Extension
403+
404+
Basic support for the [SQLite Session Extension](https://www.sqlite.org/sessionintro.html)
405+
got added to the experimental `node:sqlite` module.
406+
407+
```js
408+
const sourceDb = new DatabaseSync(':memory:');
409+
const targetDb = new DatabaseSync(':memory:');
410+
411+
sourceDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)');
412+
targetDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)');
413+
414+
const session = sourceDb.createSession();
415+
416+
const insert = sourceDb.prepare('INSERT INTO data (key, value) VALUES (?, ?)');
417+
insert.run(1, 'hello');
418+
insert.run(2, 'world');
419+
420+
const changeset = session.changeset();
421+
targetDb.applyChangeset(changeset);
422+
// Now that the changeset has been applied, targetDb contains the same data as sourceDb.
423+
```
424+
425+
Of note to distributors when dynamically linking with SQLite (using the `--shared-sqlite`
426+
flag): compiling SQLite with `SQLITE_ENABLE_SESSION` and `SQLITE_ENABLE_PREUPDATE_HOOK`
427+
defines is now required.
428+
429+
Contributed by Bart Louwers in [#54181](https://github.com/nodejs/node/pull/54181).
430+
431+
#### Other Notable Changes
432+
402433
* \[[`5767b76c30`](https://github.com/nodejs/node/commit/5767b76c30)] - **doc**: enforce strict policy to semver-major releases (Rafael Gonzaga) [#55732](https://github.com/nodejs/node/pull/55732)
403434
* \[[`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)
404435
* \[[`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

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.