Comparing version 0.0.9 to 0.0.10
15
index.js
@@ -16,2 +16,11 @@ const mysql = require('mysql'); | ||
this._config = config; | ||
this.SELECTALL = this.selectAll; | ||
this.SELECT = this.select; | ||
this.INSERT = this.insert; | ||
this.UPDATE = this.update; | ||
} | ||
_createConnection() { | ||
this.connection = mysql.createConnection(this._config); | ||
this.connection.config.queryFormat = (query, values) => { | ||
@@ -77,6 +86,2 @@ query = query.replace(/:insert:/g, () => { | ||
}); | ||
this.SELECTALL = this.selectAll; | ||
this.SELECT = this.select; | ||
this.INSERT = this.insert; | ||
this.UPDATE = this.update; | ||
} | ||
@@ -103,3 +108,3 @@ | ||
connect(reconnectOnError = 0) { | ||
this.connection = mysql.createConnection(this._config); | ||
this._createConnection(); | ||
return new Promise((resolve, reject) => { | ||
@@ -106,0 +111,0 @@ this.connection.connect(async (err) => { |
{ | ||
"name": "amysql", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "Useless wrapper over mysql", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
12549
269