Comparing version 0.0.3 to 0.0.4
20
index.js
@@ -127,4 +127,4 @@ const mysql = require('mysql'); | ||
async insert([table, values, onDuplicate = false], callback) { | ||
return await _try(async () => { | ||
insert([table, values, onDuplicate = false], callback) { | ||
return _try(async () => { | ||
if (typeof values != "object" || Array.isArray(values)) | ||
@@ -151,4 +151,4 @@ throw new DBError(`Params must be an object`); | ||
async select([fields, table, condition = false, params = false], callback = false) { | ||
return await _try(async () => { | ||
select([fields, table, condition = false, params = false], callback = false) { | ||
return _try(async () => { | ||
let query = "SELECT "; | ||
@@ -171,4 +171,4 @@ if (typeof fields == "object") { | ||
async update([table, setters, condition = false, params = false], callback = false) { | ||
return await _try(async () => { | ||
update([table, setters, condition = false, params = false], callback = false) { | ||
return _try(async () => { | ||
let query = "UPDATE "; | ||
@@ -189,4 +189,4 @@ | ||
async _nudeQuery(query, callback) { | ||
return await _try(async () => { | ||
_nudeQuery(query, callback) { | ||
return _try(() => { | ||
return new Promise((resolve, reject) => { | ||
@@ -207,2 +207,6 @@ this.connection.query(query, async (err, result, fields) => { | ||
} | ||
end() { | ||
this.connection.end(); | ||
} | ||
} | ||
@@ -209,0 +213,0 @@ |
{ | ||
"name": "amysql", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Useless wrapper over mysql", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24551
250