mm_sqlite 1.2.8 → 1.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
@@ -13,7 +13,7 @@ class SQLite extends Base {
13
13
  /**
14
14
  * 默认配置
15
15
  */
16
- static default_config = {
16
+ static config = {
17
17
  dir: './db/'.fullname(),
18
18
  user: 'root',
19
19
  password: '',
@@ -23,7 +23,7 @@ class SQLite extends Base {
23
23
  connect_timeout: 20000,
24
24
  acquire_timeout: 20000,
25
25
  query_timeout: 20000,
26
- connection_limit: 1,
26
+ connection_limit: 500,
27
27
  queue_limit: 0,
28
28
  enable_keep_alive: true,
29
29
  keep_alive_initial_delay: 10000,
@@ -44,7 +44,7 @@ class SQLite extends Base {
44
44
  * @param {object} config - 配置对象
45
45
  */
46
46
  constructor(config) {
47
- const merged_cfg = { ...SQLite.default_config, ...config || {}};
47
+ const merged_cfg = { ...SQLite.config, ...config || {}};
48
48
  super(merged_cfg);
49
49
 
50
50
  this.config = merged_cfg;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_sqlite",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "description": "高性能SQLite数据库操作模块,提供与mm_mysql完全兼容的API接口,支持异步操作、事务处理和批量操作",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/sql.js CHANGED
@@ -974,13 +974,6 @@ Sql.prototype.get = async function (query, sort, view, like, timeout = 30000) {
974
974
  }
975
975
  };
976
976
 
977
- /**
978
- * @description 添加或修改
979
- * @param {object} where 查询条件集合
980
- * @param {object} set 修改的键值
981
- * @param {boolean} like 是否使用like匹配, 默认不使用
982
- * @returns {Promise | object} 执行结果
983
- */
984
977
  /**
985
978
  * 添加或修改数据(存在则修改,不存在则添加)
986
979
  * @param {object | string} where 查询条件
@@ -1,6 +0,0 @@
1
- -- 备份表: test_table
2
- -- 备份时间: 2025-12-25T16:10:47.231Z
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,5 +0,0 @@
1
- -- 备份表: test_table
2
- -- 备份时间: 2025-12-25T15:56:50.292Z
3
-
4
- INSERT INTO `test_table` (`id`, `name`, `age`) VALUES (1, '测试数据1', 25);
5
- INSERT INTO `test_table` (`id`, `name`, `age`) VALUES (2, '测试数据2', 30);
@@ -1,7 +0,0 @@
1
- -- 备份表: test_table
2
- -- 备份时间: 2025-12-25T15:56:50.301Z
3
-
4
- CREATE TABLE IF NOT EXISTS `test_table` (`id` INTEGER PRIMARY KEY, `name` TEXT, `age` INTEGER);
5
-
6
- INSERT INTO `test_table` (`id`, `name`, `age`) VALUES (1, '测试数据1', 25);
7
- INSERT INTO `test_table` (`id`, `name`, `age`) VALUES (2, '测试数据2', 30);