mm_sqlite 1.4.6 → 1.4.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_sqlite",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "description": "高性能SQLite数据库操作模块,提供与mm_mysql完全兼容的API接口,支持异步操作、事务处理和批量操作",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/sql.js CHANGED
@@ -208,7 +208,7 @@ Sql.prototype.toQuery = function (where, sort, view) {
208
208
  }
209
209
  if (this.size && this.page) {
210
210
  var start = this.size * (this.page - 1);
211
- sql += ' limit ' + start + ',' + this.size;
211
+ sql += ' limit ' + start + ', ' + this.size;
212
212
  }
213
213
  return sql;
214
214
  };
@@ -340,11 +340,11 @@ Sql.prototype.groupMathSql = async function (where, groupby, view, sort, method)
340
340
  var arr = view.split(',');
341
341
  for (var i = 0; i < arr.length; i++) {
342
342
  var str = escapeId(arr[i]);
343
- viewStr += ',' + method.toUpperCase() + '(' + str + ') ' + method.toLowerCase() + '_' + str.replace(
343
+ viewStr += ', ' + method.toUpperCase() + '(' + str + ') ' + method.toLowerCase() + '_' + str.replace(
344
344
  /`/g, '');
345
345
  }
346
346
  } else {
347
- viewStr = ',' + method.toUpperCase() + '(' + escapeId(view) + ') ' + method.toLowerCase() + '_' +
347
+ viewStr = ', ' + method.toUpperCase() + '(' + escapeId(view) + ') ' + method.toLowerCase() + '_' +
348
348
  view.replace(/`/g, '');
349
349
  }
350
350
  var sql = 'SELECT ' + (groupby ? escapeId(groupby) : '') + viewStr + ' FROM `' + this.table + '`';
@@ -359,7 +359,7 @@ Sql.prototype.groupMathSql = async function (where, groupby, view, sort, method)
359
359
  }
360
360
  if (this.size && this.page) {
361
361
  var start = this.size * (this.page - 1);
362
- sql += ' limit ' + start + ',' + this.size;
362
+ sql += ' limit ' + start + ', ' + this.size;
363
363
  }
364
364
  return await this.run(sql);
365
365
  };
Binary file
Binary file