baja-lite 1.5.0 → 1.5.1
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 +4 -4
- package/sql.d.ts +1 -1
- package/sql.js +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "baja-lite",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "some util for self",
|
|
5
5
|
"homepage": "https://github.com/void-soul/baja-lite",
|
|
6
6
|
"repository": {
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"@types/node": "24.0.3",
|
|
61
61
|
"@types/shelljs": "0.8.16",
|
|
62
62
|
"@types/sqlstring": "2.3.2",
|
|
63
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
64
|
-
"@typescript-eslint/parser": "8.
|
|
65
|
-
"better-sqlite3": "
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "8.35.0",
|
|
64
|
+
"@typescript-eslint/parser": "8.35.0",
|
|
65
|
+
"better-sqlite3": "12.1.0",
|
|
66
66
|
"ioredis": "5.6.1",
|
|
67
67
|
"mongodb": "6.17.0",
|
|
68
68
|
"mysql2": "3.14.1",
|
package/sql.d.ts
CHANGED
|
@@ -471,7 +471,7 @@ export interface GlobalSqlOption extends GlobalSqlOptionForWeb {
|
|
|
471
471
|
jsMode?: boolean;
|
|
472
472
|
}
|
|
473
473
|
export interface PageQuery<L> {
|
|
474
|
-
sum?: Record<string, number>;
|
|
474
|
+
sum?: Record<string, string | number>;
|
|
475
475
|
total?: number;
|
|
476
476
|
size?: number;
|
|
477
477
|
records?: L[];
|
package/sql.js
CHANGED
|
@@ -2508,11 +2508,11 @@ export class SqlService {
|
|
|
2508
2508
|
}
|
|
2509
2509
|
}
|
|
2510
2510
|
delete(option) {
|
|
2511
|
-
Throw.if(!!this[_ids] && this[_ids].length > 1 && !option.where, 'muit id must set where!');
|
|
2512
|
-
Throw.if((!this[_ids] || this[_ids].length === 0) && !option.where, 'if not set id on class, must set where!');
|
|
2513
|
-
Throw.if(!option.id && !option.where, 'not found id or where!');
|
|
2511
|
+
Throw.if(!!this[_ids] && this[_ids].length > 1 && !option.where && !option.whereSql, 'muit id must set where!');
|
|
2512
|
+
Throw.if((!this[_ids] || this[_ids].length === 0) && !option.where && !option.whereSql, 'if not set id on class, must set where!');
|
|
2513
|
+
Throw.if(!option.id && !option.where && !option.whereSql, 'not found id or where!');
|
|
2514
2514
|
Throw.if(!!option.id && !!this[_ids] && this[_ids].length > 1, 'muit id must set where!');
|
|
2515
|
-
Throw.if(!!option.id && !!option.where, 'id and where only one can set!');
|
|
2515
|
+
Throw.if(!!option.id && !!option.where && !option.whereSql, 'id and where only one can set!');
|
|
2516
2516
|
option.mode ?? (option.mode = DeleteMode.Common);
|
|
2517
2517
|
const tableTemp = `${option?.tableName}_${Math.random()}`.replace(/\./, '');
|
|
2518
2518
|
const tableTempESC = tableTemp;
|