0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-22 05:12:55 -05:00
denoland-deno/ext/node
Divy Srivastava ece384c094
fix(ext/node): implement DatabaseSync#applyChangeset() (#27967)
https://nodejs.org/api/sqlite.html#databaseapplychangesetchangeset-options

```js
const sourceDb = new DatabaseSync(':memory:');
const targetDb = new DatabaseSync(':memory:');

sourceDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)');
targetDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)');

const session = sourceDb.createSession();

const insert = sourceDb.prepare('INSERT INTO data (key, value) VALUES (?, ?)');
insert.run(1, 'hello');
insert.run(2, 'world');

const changeset = session.changeset();
targetDb.applyChangeset(changeset);
// Now that the changeset has been applied, targetDb contains the same data as sourceDb. 
```
2025-02-06 08:52:39 +05:30
..
benchmarks chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
ops fix(ext/node): implement DatabaseSync#applyChangeset() (#27967) 2025-02-06 08:52:39 +05:30
polyfills fix(ext/node): handle non-ws upgrade headers (#27931) 2025-02-04 17:35:48 +05:30
build.rs chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
Cargo.toml chore: forward v2.1.9 release commit to main (#27888) 2025-01-31 03:02:00 +01:00
clippy.toml refactor(ext/fs): deno_fs::FileSystem - conditional Send + Sync (#18993) 2023-05-08 11:02:02 -04:00
global.rs fix(ext/node): have process global available in Node context (#27562) 2025-01-08 13:14:57 +09:00
lib.rs fix(ext/node): implement SQLite Session API (#27909) 2025-02-04 21:59:13 +05:30
README.md chore(ext/node): correct publishing for ext/node (#15461) 2022-08-11 17:25:41 -04:00

deno_node

require and other node related functionality for Deno.