baja-lite 1.7.1 → 1.7.3

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/code.js +1 -0
  2. package/package.json +15 -15
  3. package/sql.js +8 -8
package/code.js CHANGED
@@ -34,6 +34,7 @@ const lxMap = {
34
34
  text: "string",
35
35
  mediumtext: "string",
36
36
  longtext: "string",
37
+ json: '',
37
38
  enum: "string",
38
39
  set: "string",
39
40
  binary: "string",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baja-lite",
3
- "version": "1.7.1",
3
+ "version": "1.7.3",
4
4
  "description": "some util for self",
5
5
  "homepage": "https://github.com/void-soul/baja-lite",
6
6
  "repository": {
@@ -35,37 +35,37 @@
35
35
  "xml": "bun --inspect ./src/test-xml.ts"
36
36
  },
37
37
  "dependencies": {
38
- "@msgpack/msgpack": "3.1.2",
38
+ "@msgpack/msgpack": "3.1.3",
39
39
  "@types/request-promise": "4.1.51",
40
- "axios": "1.13.2",
41
- "baja-lite-field": "1.4.20",
40
+ "axios": "1.13.4",
41
+ "baja-lite-field": "1.4.23",
42
42
  "decimal.js": "10.6.0",
43
43
  "html-parse-stringify": "3.0.1",
44
44
  "iterare": "1.2.1",
45
45
  "mustache": "4.2.0",
46
- "pino": "10.1.0",
46
+ "pino": "10.3.0",
47
47
  "pino-pretty": "13.1.3",
48
48
  "reflect-metadata": "0.2.2",
49
49
  "request": "2.88.2",
50
50
  "request-promise": "4.2.6",
51
- "sql-formatter": "15.6.12",
51
+ "sql-formatter": "15.7.0",
52
52
  "sqlstring": "2.3.3",
53
53
  "tslib": "2.8.1"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/better-sqlite3": "7.6.13",
57
57
  "@types/mustache": "4.2.6",
58
- "@types/node": "24.10.1",
59
- "@types/shelljs": "0.8.17",
58
+ "@types/node": "25.0.10",
59
+ "@types/shelljs": "0.10.0",
60
60
  "@types/sqlstring": "2.3.2",
61
- "@typescript-eslint/eslint-plugin": "8.48.0",
62
- "@typescript-eslint/parser": "8.48.0",
63
- "better-sqlite3": "12.5.0",
64
- "ioredis": "5.8.2",
61
+ "@typescript-eslint/eslint-plugin": "8.54.0",
62
+ "@typescript-eslint/parser": "8.54.0",
63
+ "better-sqlite3": "12.6.2",
64
+ "ioredis": "5.9.2",
65
65
  "mongodb": "7.0.0",
66
- "mysql2": "3.15.3",
67
- "pg": "8.16.3",
68
- "pg-pool": "3.10.1",
66
+ "mysql2": "3.16.2",
67
+ "pg": "8.17.2",
68
+ "pg-pool": "3.11.0",
69
69
  "redlock": "5.0.0-beta.2",
70
70
  "shelljs": "0.10.0",
71
71
  "typescript": "5.9.3"
package/sql.js CHANGED
@@ -3480,8 +3480,8 @@ class StreamQuery {
3480
3480
  this._updateColumns = [];
3481
3481
  this._groups = [];
3482
3482
  this._orders = [];
3483
- this._startRow = 0;
3484
- this._pageSize = 0;
3483
+ this._startRow = -1;
3484
+ this._pageSize = -1;
3485
3485
  this._prefix = parseInt(`${Math.random() * 1000}`);
3486
3486
  this._service = service;
3487
3487
  this[_fields] = __fields;
@@ -3493,8 +3493,8 @@ class StreamQuery {
3493
3493
  this._wheres.length = 0;
3494
3494
  this._param = {};
3495
3495
  this._paramKeys = {};
3496
- this._pageSize = 0;
3497
- this._startRow = 0;
3496
+ this._pageSize = -1;
3497
+ this._startRow = -1;
3498
3498
  this._orders.length = 0;
3499
3499
  this._groups.length = 0;
3500
3500
  this._columns.length = 0;
@@ -3877,10 +3877,10 @@ class StreamQuery {
3877
3877
  ${this._groups.length > 0 ? `GROUP BY ${this._groups.join(',')} ` : ''}
3878
3878
  ${this._orders.length > 0 ? `ORDER BY ${this._orders.join(',')} ` : ''}
3879
3879
  `;
3880
- if (this._startRow !== undefined && this._pageSize !== undefined) {
3880
+ if (this._startRow >= 0 && this._pageSize >= 0) {
3881
3881
  sql += `LIMIT ${this._startRow}, ${this._pageSize}`;
3882
3882
  }
3883
- else if (this._startRow !== undefined) {
3883
+ else if (this._startRow >= 0) {
3884
3884
  sql += `LIMIT ${this._startRow}`;
3885
3885
  }
3886
3886
  if (option.sync === SyncMode.Async) {
@@ -3922,10 +3922,10 @@ class StreamQuery {
3922
3922
  ${this._groups.length > 0 ? `GROUP BY ${this._groups.join(',')} ` : ''}
3923
3923
  ${this._orders.length > 0 ? `ORDER BY ${this._orders.join(',')} ` : ''}
3924
3924
  `;
3925
- if (this._startRow && this._pageSize) {
3925
+ if (this._startRow >= 0 && this._pageSize >= 0) {
3926
3926
  sql += `LIMIT ${this._startRow}, ${this._pageSize}`;
3927
3927
  }
3928
- else if (this._startRow) {
3928
+ else if (this._startRow >= 0) {
3929
3929
  sql += `LIMIT ${this._startRow}`;
3930
3930
  }
3931
3931
  const sqlCount = `