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

Applied prettier to code base

This commit is contained in:
Laurent Cozic
2018-03-09 17:49:35 +00:00
parent e868102c98
commit c4f19465a6
203 changed files with 13395 additions and 7927 deletions

View File

@ -1,11 +1,10 @@
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;
@ -19,7 +18,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;
}
@ -57,7 +56,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;
@ -68,9 +67,8 @@ class DatabaseDriverNode {
}
lastInsertId() {
throw new Error('NOT IMPLEMENTED');
throw new Error("NOT IMPLEMENTED");
}
}
module.exports = { DatabaseDriverNode };
module.exports = { DatabaseDriverNode };