mm_sqlite 1.4.4 → 1.4.5

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 +2 -2
  2. package/package.json +1 -1
  3. package/sql.js +2 -2
package/index.js CHANGED
@@ -209,7 +209,7 @@ SQLite.prototype.run = async function (sql, params = [], timeout = 30000) {
209
209
  });
210
210
  });
211
211
  } catch (error) {
212
- this.log('error', 'SQL执行失败', error);
212
+ console.error('SQL执行失败', error);
213
213
  this.sql = sql;
214
214
  this.error = {
215
215
  code: error.errno,
@@ -275,7 +275,7 @@ SQLite.prototype.exec = async function (sql, params, timeout) {
275
275
  });
276
276
  });
277
277
  } catch (error) {
278
- this.log('error', 'SQL执行失败', error);
278
+ console.error('SQL执行失败', error);
279
279
  this.sql = sql;
280
280
  this.error = {
281
281
  code: error.errno,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_sqlite",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "description": "高性能SQLite数据库操作模块,提供与mm_mysql完全兼容的API接口,支持异步操作、事务处理和批量操作",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/sql.js CHANGED
@@ -745,7 +745,7 @@ Sql.prototype.toWhere = function (obj, like) {
745
745
  }
746
746
  }
747
747
  }
748
- return where.replace(' and ', '');
748
+ return where.replace(/^ and /, '');
749
749
  };
750
750
 
751
751
  /**
@@ -770,7 +770,7 @@ Sql.prototype.toSet = function (obj) {
770
770
  set += ',' + escapeId(k) + ' = ' + val;
771
771
  }
772
772
  }
773
- return set.replace(',', '');
773
+ return set.replace(/^,/, '');
774
774
  };
775
775
 
776
776
  /**