Node-sqlite3: Setting WAL mode in sqlite

Created on 2 Dec 2016  路  2Comments  路  Source: mapbox/node-sqlite3

Is there a way to configure WAL mode like we do for busyTimeout?

Most helpful comment

Yeah, it's pretty straightforward

const sqlite3 = require( 'sqlite3' );

const path = 'my/db/path.sqlite';
const database = new sqlite3.Database( path );

database.run( 'PRAGMA journal_mode = WAL;' );

All 2 comments

Yeah, it's pretty straightforward

const sqlite3 = require( 'sqlite3' );

const path = 'my/db/path.sqlite';
const database = new sqlite3.Database( path );

database.run( 'PRAGMA journal_mode = WAL;' );

Thanks for the example @kokarn - yep, that's how one would set WAL.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

barbalex picture barbalex  路  4Comments

gabrielfgularte picture gabrielfgularte  路  3Comments

aprilmintacpineda picture aprilmintacpineda  路  3Comments

andrewjmead picture andrewjmead  路  5Comments

converge picture converge  路  3Comments