mirror of
https://github.com/denoland/deno.git
synced 2025-02-22 05:12:55 -05:00
![]() 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. ``` |
||
---|---|---|
.. | ||
benchmarks | ||
ops | ||
polyfills | ||
build.rs | ||
Cargo.toml | ||
clippy.toml | ||
global.rs | ||
lib.rs | ||
README.md |
deno_node
require
and other node related functionality for Deno.