mm_mysql 2.0.6 → 2.0.7

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 +7 -2
  2. package/package.json +3 -2
package/index.js CHANGED
@@ -10,6 +10,11 @@ const { DB } = require('./db');
10
10
  class Mysql extends BaseService {
11
11
  /**
12
12
  * 默认配置
13
+ * MySQL2支持的连接池配置参数:
14
+ * - host, port, user, password, database
15
+ * - charset, timezone, connectTimeout
16
+ * - connectionLimit, acquireTimeout, waitForConnections
17
+ * - queueLimit参数在MySQL2中可能不被支持,已移除
13
18
  */
14
19
  static default_config = {
15
20
  host: '127.0.0.1',
@@ -20,8 +25,8 @@ class Mysql extends BaseService {
20
25
  charset: 'utf8mb4',
21
26
  timezone: '+08:00',
22
27
  connectTimeout: 20000,
23
- connectionLimit: 10,
24
- queueLimit: 0
28
+ connectionLimit: 10
29
+ // queueLimit: 0 // MySQL2不支持此参数,已移除以避免警告
25
30
  };
26
31
 
27
32
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_mysql",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "这是超级美眉mysql帮助函数模块,用于便捷操作mysql,使用await方式,可以避免嵌套函数",
5
5
  "main": "index.js",
6
6
  "dependencies": {
@@ -8,7 +8,8 @@
8
8
  "mysql2": "^3.15.2"
9
9
  },
10
10
  "scripts": {
11
- "start": "node index.js"
11
+ "start": "node index.js",
12
+ "test": "node test.js"
12
13
  },
13
14
  "repository": {
14
15
  "type": "git",