Updated to use sqlite3 instead of sqlite in api

This commit is contained in:
2017-07-29 13:21:25 +02:00
parent a436f79770
commit fbf49e4cd9
5 changed files with 28 additions and 38 deletions

View File

@@ -1,19 +1,19 @@
const fs = require('fs');
const path = require('path');
const sqlite = require('sqlite');
const sqlite3 = require('sqlite3');
class SqliteDatabase {
constructor(host) {
this.host = host;
this.connection = sqlite;
this.connection = sqlite3;
// this.schemaDirectory = path.join(__dirname, 'schemas');
}
connect() {
return Promise.resolve()
.then(() => sqlite.open(this.host))
.then(() => new sqlite3.Database(this.host))
}
all(sql, parameters) {