Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
NPM Packages
js-db
Commits
7e3f5da7
Commit
7e3f5da7
authored
Mar 08, 2019
by
Milan Wikarski
🎪
Browse files
db.query() patch
parent
cdea0815
Changes
1
Hide whitespace changes
Inline
Side-by-side
index.js
View file @
7e3f5da7
...
...
@@ -44,7 +44,7 @@ class DB {
}
_lorem
()
{
return
"
ipsum
"
;
return
'
ipsum
'
;
}
_getWhere
(
where
)
{
...
...
@@ -93,7 +93,9 @@ class DB {
}
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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment