mm_mysql 2.2.2 → 2.2.3

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 (2) hide show
  1. package/index.js +1 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -194,7 +194,7 @@ Mysql.prototype._safeReleaseConnection = async function (conn, is_pool_conn) {
194
194
  Mysql.prototype.getConn = async function () {
195
195
  // 参数校验
196
196
  if (!this._pool && !this._connection) {
197
- throw new Error('数据库连接未初始化');
197
+ await this.open();
198
198
  }
199
199
 
200
200
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_mysql",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
4
4
  "description": "这是超级美眉mysql帮助函数模块,用于便捷操作mysql,使用await方式,可以避免嵌套函数",
5
5
  "main": "index.js",
6
6
  "dependencies": {