mm_mysql 1.9.4 → 1.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.js +0 -8
  2. package/package.json +1 -1
  3. package/test.js +1 -1
package/index.js CHANGED
@@ -90,10 +90,6 @@ class Mysql {
90
90
  $.log.debug("SQL:", sql);
91
91
  }
92
92
 
93
- if (!$this.conn) {
94
- $this.open();
95
- }
96
-
97
93
  // 返回一个 Promise
98
94
  return new Promise((resolve, reject) => {
99
95
  $this.conn.getConnection(function(err, db) {
@@ -159,10 +155,6 @@ class Mysql {
159
155
  $.log.debug("SQL:", sql);
160
156
  }
161
157
 
162
- if (!$this.conn) {
163
- $this.open();
164
- }
165
-
166
158
  // 返回一个 Promise
167
159
  return new Promise((resolve, reject) => {
168
160
  $this.conn.getConnection(function(err, db) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_mysql",
3
- "version": "1.9.4",
3
+ "version": "1.9.6",
4
4
  "description": "这是超级美眉mysql帮助函数模块,用于便捷操作mysql,使用await方式,可以避免嵌套函数",
5
5
  "main": "index.js",
6
6
  "dependencies": {
package/test.js CHANGED
@@ -13,7 +13,7 @@ async function test() {
13
13
  password: "Asd159357",
14
14
  multipleStatements: true
15
15
  });
16
- // await sql.open();
16
+ await sql.open();
17
17
 
18
18
  db = sql.db();
19
19
  db.table = 'user_account';