Commit 7e3f5da7 authored by Milan Wikarski's avatar Milan Wikarski 🎪
Browse files

db.query() patch

parent cdea0815
...@@ -44,7 +44,7 @@ class DB { ...@@ -44,7 +44,7 @@ class DB {
} }
_lorem() { _lorem() {
return "ipsum"; return 'ipsum';
} }
_getWhere(where) { _getWhere(where) {
...@@ -93,7 +93,9 @@ class DB { ...@@ -93,7 +93,9 @@ class DB {
} }
query(q, data = []) { query(q, data = []) {
return this._sendResponse(q, data); return new Promise((resolve, reject) => {
this._db.query(q, data, (err, res) => (err ? reject(err) : resolve(res)));
});
} }
tableExists(tableName) { tableExists(tableName) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment