1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-27 23:28:38 +02:00

Revert "Applied prettier to code base"

This reverts commit c4f19465a6.
This commit is contained in:
Laurent Cozic
2018-03-09 20:59:12 +00:00
parent 5e8b09f5af
commit 55c5ddedf4
203 changed files with 7883 additions and 13355 deletions

View File

@ -1,10 +1,11 @@
const sqlite3 = require("sqlite3").verbose();
const Promise = require("promise");
const sqlite3 = require('sqlite3').verbose();
const Promise = require('promise');
class DatabaseDriverNode {
open(options) {
return new Promise((resolve, reject) => {
this.db_ = new sqlite3.Database(options.name, sqlite3.OPEN_READWRITE | sqlite3.OPEN_CREATE, error => {
this.db_ = new sqlite3.Database(options.name, sqlite3.OPEN_READWRITE | sqlite3.OPEN_CREATE, (error) => {
if (error) {
reject(error);
return;
@ -18,7 +19,7 @@ class DatabaseDriverNode {
let msg = [error.toString()];
if (sql) msg.push(sql);
if (params) msg.push(params);
let output = new Error(msg.join(": "));
let output = new Error(msg.join(': '));
if (error.code) output.code = error.code;
return output;
}
@ -56,7 +57,7 @@ class DatabaseDriverNode {
exec(sql, params = null) {
if (!params) params = {};
return new Promise((resolve, reject) => {
this.db_.run(sql, params, error => {
this.db_.run(sql, params, (error) => {
if (error) {
reject(error);
return;
@ -67,8 +68,9 @@ class DatabaseDriverNode {
}
lastInsertId() {
throw new Error("NOT IMPLEMENTED");
throw new Error('NOT IMPLEMENTED');
}
}
module.exports = { DatabaseDriverNode };
module.exports = { DatabaseDriverNode };