A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/nodejs/node/commit/710b8fc6ed below:

add entry to changelog about SQLite Session Extension · nodejs/node@710b8fc · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+31

-0

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+31

-0

lines changed Original file line number Diff line number Diff line change

@@ -399,6 +399,37 @@ Contributed by Giovanni Bucci in [#54630](https://github.com/nodejs/node/pull/54

399 399 400 400

### Notable Changes

401 401 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 + 402 433

* \[[`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)

403 434

* \[[`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)

404 435

* \[[`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)

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4