mirror of
https://github.com/danbulant/sql2csv
synced 2026-05-19 04:18:33 +00:00
Testing query
This commit is contained in:
parent
30cd011e18
commit
44702a053b
1 changed files with 9 additions and 0 deletions
|
|
@ -52,6 +52,15 @@ class sql2csv {
|
|||
this.colorLog("Initialized", "\x1b[32m");
|
||||
}
|
||||
|
||||
query(sql){
|
||||
return new Promise((resolve, reject) => {
|
||||
this.conn.query(sql, function (err, result) {
|
||||
if (err) reject(err);
|
||||
console.log(result);
|
||||
resolve(result);
|
||||
});
|
||||
}
|
||||
}
|
||||
//update certain option
|
||||
setOption(name, value){
|
||||
this.options[name] = value;
|
||||
|
|
|
|||
Loading…
Reference in a new issue