sqlite-to-json
Dump data from sqlite databases to JSON files easily.
API
constructor(opts)
Create an instance of SqliteToJson.
Example:
const SqliteToJson = ;const sqlite3 = ;const exporter = client: './mydb.sqlite3';
opts.client
A sqlite3 client instance.
Type: sqlite3.Database
Default: null
tables(cb)
List all tables in the current database.
Example:
const SqliteToJson = ;const sqlite3 = ;const exporter = client: './mydb.sqlite3';exporter;
save(table, dest, cb)
Save the contents of a table to the specified output directory.
Example:
const SqliteToJson = ;const sqlite3 = ;const exporter = client: './mydb.sqlite3';exporter;
all(cb)
Returns the entire database and all tables as a single object.
Example:
const SqliteToJson = ;const sqlite3 = ;const exporter = client: './mydb.sqlite3';exporterall { // all your data here};