mm_mysql 2.2.8 → 2.2.9

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.
package/index.js CHANGED
@@ -17,7 +17,7 @@ class Mysql extends Base {
17
17
  * - connection_limit, acquire_timeout, wait_for_connections
18
18
  * - queueLimit参数在MySQL2中可能不被支持,已移除
19
19
  */
20
- static default_config = {
20
+ static config = {
21
21
  host: '127.0.0.1',
22
22
  port: 3306,
23
23
  user: 'root',
@@ -26,7 +26,7 @@ class Mysql extends Base {
26
26
  charset: 'utf8mb4',
27
27
  timezone: '+08:00',
28
28
  connect_timeout: 20000,
29
- connection_limit: 10,
29
+ connection_limit: 500,
30
30
  acquire_timeout: 20000,
31
31
  wait_for_connections: true
32
32
  };
@@ -36,7 +36,7 @@ class Mysql extends Base {
36
36
  * @param {object} config - 配置对象
37
37
  */
38
38
  constructor(config = {}) {
39
- super({ ...Mysql.default_config, ...config});
39
+ super({ ...Mysql.config, ...config});
40
40
  this._pool = null;
41
41
  this._connection = null;
42
42
  this._usePool = this.config.connection_limit > 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_mysql",
3
- "version": "2.2.8",
3
+ "version": "2.2.9",
4
4
  "description": "这是超级美眉mysql帮助函数模块,用于便捷操作mysql,使用await方式,可以避免嵌套函数",
5
5
  "main": "index.js",
6
6
  "dependencies": {
@@ -1,6 +0,0 @@
1
- -- 备份表: test_table
2
- -- 备份时间: 2025-12-25T16:36:48.438Z
3
-
4
- INSERT INTO `test_table` (`id`, `name`, `age`) VALUES (1, '张三', 25);
5
- INSERT INTO `test_table` (`id`, `name`, `age`) VALUES (2, '李四', 30);
6
- INSERT INTO `test_table` (`id`, `name`, `age`) VALUES (3, '王五', 28);
@@ -1,13 +0,0 @@
1
- -- 备份表: test_table
2
- -- 备份时间: 2025-12-25T16:36:48.450Z
3
-
4
- CREATE TABLE IF NOT EXISTS `test_table` (
5
- `id` int(11) NOT NULL AUTO_INCREMENT,
6
- `name` varchar(50) NOT NULL,
7
- `age` int(11) DEFAULT NULL,
8
- PRIMARY KEY (`id`)
9
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
10
-
11
- INSERT INTO `test_table` (`id`, `name`, `age`) VALUES (1, '张三', 25);
12
- INSERT INTO `test_table` (`id`, `name`, `age`) VALUES (2, '李四', 30);
13
- INSERT INTO `test_table` (`id`, `name`, `age`) VALUES (3, '王五', 28);
@@ -1,13 +0,0 @@
1
- -- 备份表: test_table
2
- -- 备份时间: 2025-12-25T16:34:30.386Z
3
-
4
- CREATE TABLE IF NOT EXISTS `test_table` (
5
- `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
6
- `name` varchar(50) NOT NULL COMMENT '用户姓名',
7
- `age` int(11) DEFAULT NULL COMMENT '用户年龄',
8
- PRIMARY KEY (`id`)
9
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='测试用户表';
10
-
11
- INSERT INTO `test_table` (`id`, `name`, `age`) VALUES (1, '张三', 25);
12
- INSERT INTO `test_table` (`id`, `name`, `age`) VALUES (2, '李四', 30);
13
- INSERT INTO `test_table` (`id`, `name`, `age`) VALUES (3, '王五', 28);