baja-lite 1.4.11 → 1.4.13

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 (5) hide show
  1. package/object.d.ts +29 -0
  2. package/object.js +52 -7
  3. package/package.json +1 -1
  4. package/sql.d.ts +100 -93
  5. package/sql.js +95 -83
package/object.d.ts CHANGED
@@ -56,12 +56,41 @@ export declare const coverComplexBean: <T>(source: any, classType: any) => {
56
56
  export declare const fixEmptyPrototy: (target: any, source: {
57
57
  [key: string]: any;
58
58
  }) => Promise<void>;
59
+ /**
60
+ * 1. 统计array中某个字段key的数量:{ [k: string]: number }
61
+ *
62
+ * @param array T组成的array,数据源
63
+ * @param key 返回结果{ [k: string]: number }的key
64
+ * @param defKey 如果array中某个对象没有key字段,则归类到默认key中
65
+ * @returns
66
+ */
59
67
  export declare const mixArray: <T>(array: T[], key: keyof T, defKey?: string) => {
60
68
  [key: string]: number;
61
69
  };
70
+ /**
71
+ * 1. 将T组成的array按照某个字段(key)提取为{ [key: string]: V[] }
72
+ * @param array T组成的array,数据源
73
+ * @param key 返回结果{ [key: string]: V[] }的key
74
+ * @param value 返回结果{ [key: string]: V[] }中的V可以是T,也可以是T的某个字段(指定value参数)
75
+ * @param defKey 如果array中某个对象没有key字段,则归类到默认key中
76
+ * @returns
77
+ */
62
78
  export declare const mixList: <T, V = T>(array: T[], key: keyof T, value?: keyof T, defKey?: string) => {
63
79
  [key: string]: V[];
64
80
  };
81
+ /**
82
+ * ## 仿照Object.assign的数组方法
83
+ * ### 1. 用法参照
84
+ * ```
85
+ * // ID 是 数组中对象的关键字段,用来区分同一条记录.支持多个字段(联合主键场景)
86
+ * // 与assign的逻辑相同,后面的数组会覆盖前面数组的相同对象的同名字段
87
+ * const result = assignArray('ID', Array1, Array2, Array3...);
88
+ * ```
89
+ * @param key
90
+ * @param arrays
91
+ * @returns
92
+ */
93
+ export declare const assignArray: <T>(key: keyof T | (keyof T)[] | ((t1: T, t2: T) => boolean), ...arrays: T[][]) => T[];
65
94
  export declare const array2map: <T = string | number>(array: string[], v: T) => {
66
95
  [key: string]: T;
67
96
  };
package/object.js CHANGED
@@ -10,8 +10,7 @@ const iterate = ite.iterate;
10
10
  export const copyBean = (source, classType) => {
11
11
  const result = {};
12
12
  Object.keys(classType).forEach((key) => {
13
- result[key] =
14
- source[key] !== undefined ? source[key] : (result[key] = null);
13
+ result[key] = source[key] !== undefined ? source[key] : (result[key] = null);
15
14
  });
16
15
  return result;
17
16
  };
@@ -100,7 +99,7 @@ export const coverComplexBean = (source, classType) => {
100
99
  }
101
100
  return {
102
101
  data: convertBean(result, classType),
103
- array: arrayData
102
+ array: arrayData,
104
103
  };
105
104
  };
106
105
  /**
@@ -120,8 +119,16 @@ export const fixEmptyPrototy = async (target, source) => {
120
119
  }
121
120
  }
122
121
  };
122
+ /**
123
+ * 1. 统计array中某个字段key的数量:{ [k: string]: number }
124
+ *
125
+ * @param array T组成的array,数据源
126
+ * @param key 返回结果{ [k: string]: number }的key
127
+ * @param defKey 如果array中某个对象没有key字段,则归类到默认key中
128
+ * @returns
129
+ */
123
130
  export const mixArray = (array, key, defKey) => {
124
- const obj = array.map(item => item[key]);
131
+ const obj = array.map((item) => item[key]);
125
132
  const result = {};
126
133
  for (const i of obj) {
127
134
  let ki = '';
@@ -138,6 +145,14 @@ export const mixArray = (array, key, defKey) => {
138
145
  }
139
146
  return result;
140
147
  };
148
+ /**
149
+ * 1. 将T组成的array按照某个字段(key)提取为{ [key: string]: V[] }
150
+ * @param array T组成的array,数据源
151
+ * @param key 返回结果{ [key: string]: V[] }的key
152
+ * @param value 返回结果{ [key: string]: V[] }中的V可以是T,也可以是T的某个字段(指定value参数)
153
+ * @param defKey 如果array中某个对象没有key字段,则归类到默认key中
154
+ * @returns
155
+ */
141
156
  export const mixList = (array, key, value, defKey) => {
142
157
  const result = {};
143
158
  for (const i of array) {
@@ -160,6 +175,34 @@ export const mixList = (array, key, value, defKey) => {
160
175
  }
161
176
  return result;
162
177
  };
178
+ /**
179
+ * ## 仿照Object.assign的数组方法
180
+ * ### 1. 用法参照
181
+ * ```
182
+ * // ID 是 数组中对象的关键字段,用来区分同一条记录.支持多个字段(联合主键场景)
183
+ * // 与assign的逻辑相同,后面的数组会覆盖前面数组的相同对象的同名字段
184
+ * const result = assignArray('ID', Array1, Array2, Array3...);
185
+ * ```
186
+ * @param key
187
+ * @param arrays
188
+ * @returns
189
+ */
190
+ export const assignArray = (key, ...arrays) => {
191
+ const result = [];
192
+ const match = key instanceof Function ? key : key instanceof Array ? (t1, t2) => key.every((k) => t1[k] === t2[k]) : (t1, t2) => t1[key] === t2[key];
193
+ for (const array of arrays) {
194
+ for (const item of array) {
195
+ const find = result.find((i) => match(i, item));
196
+ if (find) {
197
+ Object.assign(find, item);
198
+ }
199
+ else {
200
+ result.push(item);
201
+ }
202
+ }
203
+ }
204
+ return result;
205
+ };
163
206
  export const array2map = (array, v) => {
164
207
  const ot = {};
165
208
  for (const item of array) {
@@ -195,9 +238,9 @@ export const arraySplit = (datas, { everyLength = 0, groupCount = 0 } = {}) => {
195
238
  }
196
239
  };
197
240
  const P2CEX = /[A-Z]/g;
198
- export const P2C = (pro, IF = true) => IF ? pro.replace(P2CEX, (a) => `_${a.toLowerCase()}`) : pro;
241
+ export const P2C = (pro, IF = true) => (IF ? pro.replace(P2CEX, (a) => `_${a.toLowerCase()}`) : pro);
199
242
  const C2PEX = /_([a-z])/g;
200
- export const C2P = (pro, IF = true) => IF ? pro.replace(C2PEX, (a, b) => `${b.toUpperCase()}`) : pro;
243
+ export const C2P = (pro, IF = true) => (IF ? pro.replace(C2PEX, (a, b) => `${b.toUpperCase()}`) : pro);
201
244
  export function C2P2(datas, hump, convert) {
202
245
  if (datas instanceof Array) {
203
246
  return iterate(datas)
@@ -233,7 +276,9 @@ export function C2P2(datas, hump, convert) {
233
276
  }
234
277
  export function P2C2(datas) {
235
278
  if (datas instanceof Array) {
236
- return iterate(datas).map((data) => Object.fromEntries(Object.entries(data).map(([K, V]) => [P2C(K), V]))).toArray();
279
+ return iterate(datas)
280
+ .map((data) => Object.fromEntries(Object.entries(data).map(([K, V]) => [P2C(K), V])))
281
+ .toArray();
237
282
  }
238
283
  else if (datas) {
239
284
  return Object.fromEntries(Object.entries(datas).map(([K, V]) => [P2C(K), V]));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baja-lite",
3
- "version": "1.4.11",
3
+ "version": "1.4.13",
4
4
  "description": "some util for self",
5
5
  "homepage": "https://github.com/void-soul/baja-lite",
6
6
  "repository": {
package/sql.d.ts CHANGED
@@ -918,7 +918,8 @@ export declare class SqlService<T extends object> {
918
918
  2. 支持实体类删除: 用于多个ID或者按实体类某些字段删除
919
919
  3. 两种模式:`mode`=`Common` 或者 `TempTable`
920
920
  3. 如果数据多,使用 `TempTable`模式
921
- 4. 当设置实体类的字段有 `logicDelete` ,将进行逻辑删除,除非设置 forceDelete = true
921
+ 4. 当设置实体类的字段有 `logicDelete` ,将进行逻辑删除,除非设置 `forceDelete` = true
922
+ 5. 支持`whereSql`直接拼接,此时必须传递`whereParams`,不建议直接使用这种方式!为了简化逻辑,它不会和ID、WHERE共存,且优先级更高。且不支持 `TempTable` Mode
922
923
  6. `tableName`: 默认使用service注解的`tableName`,可以在某个方法中覆盖
923
924
  7. `dbName`: 默认使用service注解的`dbName`,可以在某个方法中覆盖
924
925
  8. `conn`: 仅在开启事务时需要主动传入,传入示例:
@@ -935,6 +936,8 @@ export declare class SqlService<T extends object> {
935
936
  where?: Partial<T> | Array<Partial<T>>;
936
937
  mode?: DeleteMode;
937
938
  forceDelete?: boolean;
939
+ whereSql?: string;
940
+ whereParams?: Record<string, any>;
938
941
  }): Promise<number>;
939
942
  delete(option: MethodOption & {
940
943
  sync: SyncMode.Sync;
@@ -942,6 +945,8 @@ export declare class SqlService<T extends object> {
942
945
  where?: Partial<T> | Array<Partial<T>>;
943
946
  mode?: DeleteMode;
944
947
  forceDelete?: boolean;
948
+ whereSql?: string;
949
+ whereParams?: Record<string, any>;
945
950
  }): number;
946
951
  private _template;
947
952
  /**
@@ -1438,281 +1443,281 @@ declare class StreamQuery<T extends object> {
1438
1443
  * AND(key1 = :value OR key2 = :value)
1439
1444
  * @param keys [key1, key2, ...]
1440
1445
  */
1441
- eqs(keys: (keyof T)[], value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1446
+ eqs(keys: (keyof T)[], value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1442
1447
  paramName?: string | undefined;
1443
1448
  skipEmptyString?: boolean | undefined;
1444
- breakExcuteIfSkip?: boolean | undefined;
1449
+ breakExcuteIfEmpty?: boolean | undefined;
1445
1450
  }): this;
1446
1451
  /*** AND key = :value */
1447
- eq(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1452
+ eq(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1448
1453
  paramName?: string | undefined;
1449
1454
  skipEmptyString?: boolean | undefined;
1450
- breakExcuteIfSkip?: boolean | undefined;
1455
+ breakExcuteIfEmpty?: boolean | undefined;
1451
1456
  }): this;
1452
1457
  /*** AND key1 = :value1 AND key2 = :value2 */
1453
- eqT(t: Partial<T>, { name: paramName, breakExcuteIfSkip }?: {
1458
+ eqT(t: Partial<T>, { name: paramName, breakExcuteIfEmpty }?: {
1454
1459
  name?: string | undefined;
1455
- breakExcuteIfSkip?: boolean | undefined;
1460
+ breakExcuteIfEmpty?: boolean | undefined;
1456
1461
  }): this;
1457
1462
  /*** AND key <> :value */
1458
- notEq(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1463
+ notEq(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1459
1464
  paramName?: string | undefined;
1460
1465
  skipEmptyString?: boolean | undefined;
1461
- breakExcuteIfSkip?: boolean | undefined;
1466
+ breakExcuteIfEmpty?: boolean | undefined;
1462
1467
  }): this;
1463
1468
  /** AND key1 = key2 */
1464
1469
  eqWith(key1: keyof T, key2: keyof T): this;
1465
1470
  /** AND key1 <> key2 */
1466
1471
  notEqWith(key1: keyof T, key2: keyof T): this;
1467
1472
  /** AND key REGEXP :regexp */
1468
- regexp(key: keyof T, regexp: string, { paramName, breakExcuteIfSkip }?: {
1473
+ regexp(key: keyof T, regexp: string, { paramName, breakExcuteIfEmpty }?: {
1469
1474
  paramName?: string | undefined;
1470
- breakExcuteIfSkip?: boolean | undefined;
1475
+ breakExcuteIfEmpty?: boolean | undefined;
1471
1476
  }): this;
1472
1477
  /** AND key NOT REGEXP :regexp */
1473
- notRegexp(key: keyof T, regexp: string, { paramName, breakExcuteIfSkip }?: {
1478
+ notRegexp(key: keyof T, regexp: string, { paramName, breakExcuteIfEmpty }?: {
1474
1479
  paramName?: string | undefined;
1475
- breakExcuteIfSkip?: boolean | undefined;
1480
+ breakExcuteIfEmpty?: boolean | undefined;
1476
1481
  }): this;
1477
1482
  /** AND (key1 << 8) + key2 = value */
1478
- shiftEq(key1: keyof T, key2: keyof T, value: number, { paramName, breakExcuteIfSkip }?: {
1483
+ shiftEq(key1: keyof T, key2: keyof T, value: number, { paramName, breakExcuteIfEmpty }?: {
1479
1484
  paramName?: string | undefined;
1480
- breakExcuteIfSkip?: boolean | undefined;
1485
+ breakExcuteIfEmpty?: boolean | undefined;
1481
1486
  }): this;
1482
1487
  /** AND (key1 << 8) + key2 <> value */
1483
- shiftNotEq(key1: keyof T, key2: keyof T, value: number, { paramName, breakExcuteIfSkip }?: {
1488
+ shiftNotEq(key1: keyof T, key2: keyof T, value: number, { paramName, breakExcuteIfEmpty }?: {
1484
1489
  paramName?: string | undefined;
1485
- breakExcuteIfSkip?: boolean | undefined;
1490
+ breakExcuteIfEmpty?: boolean | undefined;
1486
1491
  }): this;
1487
1492
  /** AND key > :value */
1488
- grate(key: keyof T, value: string | number, { paramName, breakExcuteIfSkip }?: {
1493
+ grate(key: keyof T, value: string | number, { paramName, breakExcuteIfEmpty }?: {
1489
1494
  paramName?: string | undefined;
1490
- breakExcuteIfSkip?: boolean | undefined;
1495
+ breakExcuteIfEmpty?: boolean | undefined;
1491
1496
  }): this;
1492
1497
  /** AND key >= :value */
1493
- grateEq(key: keyof T, value: string | number, { paramName, breakExcuteIfSkip }?: {
1498
+ grateEq(key: keyof T, value: string | number, { paramName, breakExcuteIfEmpty }?: {
1494
1499
  paramName?: string | undefined;
1495
- breakExcuteIfSkip?: boolean | undefined;
1500
+ breakExcuteIfEmpty?: boolean | undefined;
1496
1501
  }): this;
1497
1502
  /** AND key1 > key2 */
1498
1503
  grateWith(key1: keyof T, key2: keyof T): this;
1499
1504
  /** AND key1 >= key2 */
1500
1505
  grateEqWith(key1: keyof T, key2: keyof T): this;
1501
1506
  /** AND key < :value */
1502
- less(key: keyof T, value: string | number, { paramName, breakExcuteIfSkip }?: {
1507
+ less(key: keyof T, value: string | number, { paramName, breakExcuteIfEmpty }?: {
1503
1508
  paramName?: string | undefined;
1504
- breakExcuteIfSkip?: boolean | undefined;
1509
+ breakExcuteIfEmpty?: boolean | undefined;
1505
1510
  }): this;
1506
1511
  /** AND key <= :value */
1507
- lessEq(key: keyof T, value: string | number, { paramName, breakExcuteIfSkip }?: {
1512
+ lessEq(key: keyof T, value: string | number, { paramName, breakExcuteIfEmpty }?: {
1508
1513
  paramName?: string | undefined;
1509
- breakExcuteIfSkip?: boolean | undefined;
1514
+ breakExcuteIfEmpty?: boolean | undefined;
1510
1515
  }): this;
1511
1516
  /** AND key1 < key2 */
1512
1517
  lessWith(key1: keyof T, key2: keyof T): this;
1513
1518
  /** AND key1 <= key2 */
1514
1519
  lessEqWith(key1: keyof T, key2: keyof T): this;
1515
1520
  /** AND key LIKE CONCAT('%', :value, '%') */
1516
- like(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1521
+ like(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1517
1522
  paramName?: string | undefined;
1518
1523
  skipEmptyString?: boolean | undefined;
1519
- breakExcuteIfSkip?: boolean | undefined;
1524
+ breakExcuteIfEmpty?: boolean | undefined;
1520
1525
  }): this;
1521
1526
  /** AND key NOT LIKE CONCAT('%', :value, '%') */
1522
- notLike(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1527
+ notLike(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1523
1528
  paramName?: string | undefined;
1524
1529
  skipEmptyString?: boolean | undefined;
1525
- breakExcuteIfSkip?: boolean | undefined;
1530
+ breakExcuteIfEmpty?: boolean | undefined;
1526
1531
  }): this;
1527
1532
  /** AND key NOT LIKE CONCAT('%', :value) */
1528
- leftLike(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1533
+ leftLike(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1529
1534
  paramName?: string | undefined;
1530
1535
  skipEmptyString?: boolean | undefined;
1531
- breakExcuteIfSkip?: boolean | undefined;
1536
+ breakExcuteIfEmpty?: boolean | undefined;
1532
1537
  }): this;
1533
1538
  /** AND key LIKE CONCAT('%', :value) */
1534
- notLeftLike(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1539
+ notLeftLike(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1535
1540
  paramName?: string | undefined;
1536
1541
  skipEmptyString?: boolean | undefined;
1537
- breakExcuteIfSkip?: boolean | undefined;
1542
+ breakExcuteIfEmpty?: boolean | undefined;
1538
1543
  }): this;
1539
1544
  /** AND key LIKE CONCAT(:value, '%') */
1540
- rightLike(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1545
+ rightLike(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1541
1546
  paramName?: string | undefined;
1542
1547
  skipEmptyString?: boolean | undefined;
1543
- breakExcuteIfSkip?: boolean | undefined;
1548
+ breakExcuteIfEmpty?: boolean | undefined;
1544
1549
  }): this;
1545
1550
  /** AND key NOT LIKE CONCAT(:value, '%') */
1546
- notRightLike(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1551
+ notRightLike(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1547
1552
  paramName?: string | undefined;
1548
1553
  skipEmptyString?: boolean | undefined;
1549
- breakExcuteIfSkip?: boolean | undefined;
1554
+ breakExcuteIfEmpty?: boolean | undefined;
1550
1555
  }): this;
1551
1556
  /** AND key NOT LIKE :value */
1552
- PreciseLike(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1557
+ PreciseLike(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1553
1558
  paramName?: string | undefined;
1554
1559
  skipEmptyString?: boolean | undefined;
1555
- breakExcuteIfSkip?: boolean | undefined;
1560
+ breakExcuteIfEmpty?: boolean | undefined;
1556
1561
  }): this;
1557
1562
  /** AND key LIKE :value */
1558
- notPreciseLike(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1563
+ notPreciseLike(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1559
1564
  paramName?: string | undefined;
1560
1565
  skipEmptyString?: boolean | undefined;
1561
- breakExcuteIfSkip?: boolean | undefined;
1566
+ breakExcuteIfEmpty?: boolean | undefined;
1562
1567
  }): this;
1563
1568
  /** AND key GLOB CONCAT('%', :value, '%') */
1564
- glob(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1569
+ glob(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1565
1570
  paramName?: string | undefined;
1566
1571
  skipEmptyString?: boolean | undefined;
1567
- breakExcuteIfSkip?: boolean | undefined;
1572
+ breakExcuteIfEmpty?: boolean | undefined;
1568
1573
  }): this;
1569
1574
  /** AND key NOT GLOB CONCAT('%', :value, '%') */
1570
- notGlob(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1575
+ notGlob(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1571
1576
  paramName?: string | undefined;
1572
1577
  skipEmptyString?: boolean | undefined;
1573
- breakExcuteIfSkip?: boolean | undefined;
1578
+ breakExcuteIfEmpty?: boolean | undefined;
1574
1579
  }): this;
1575
1580
  /** AND key GLOB CONCAT('%', :value) */
1576
- leftGlob(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1581
+ leftGlob(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1577
1582
  paramName?: string | undefined;
1578
1583
  skipEmptyString?: boolean | undefined;
1579
- breakExcuteIfSkip?: boolean | undefined;
1584
+ breakExcuteIfEmpty?: boolean | undefined;
1580
1585
  }): this;
1581
1586
  /** AND key NOT GLOB CONCAT('%', :value) */
1582
- notLeftGlob(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1587
+ notLeftGlob(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1583
1588
  paramName?: string | undefined;
1584
1589
  skipEmptyString?: boolean | undefined;
1585
- breakExcuteIfSkip?: boolean | undefined;
1590
+ breakExcuteIfEmpty?: boolean | undefined;
1586
1591
  }): this;
1587
1592
  /** AND key GLOB CONCAT(:value, '%') */
1588
- rightGlob(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1593
+ rightGlob(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1589
1594
  paramName?: string | undefined;
1590
1595
  skipEmptyString?: boolean | undefined;
1591
- breakExcuteIfSkip?: boolean | undefined;
1596
+ breakExcuteIfEmpty?: boolean | undefined;
1592
1597
  }): this;
1593
1598
  /** AND key NOT GLOB CONCAT(:value, '%') */
1594
- notRightGlob(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1599
+ notRightGlob(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1595
1600
  paramName?: string | undefined;
1596
1601
  skipEmptyString?: boolean | undefined;
1597
- breakExcuteIfSkip?: boolean | undefined;
1602
+ breakExcuteIfEmpty?: boolean | undefined;
1598
1603
  }): this;
1599
1604
  /** AND key GLOB :value */
1600
- PreciseGlob(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1605
+ PreciseGlob(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1601
1606
  paramName?: string | undefined;
1602
1607
  skipEmptyString?: boolean | undefined;
1603
- breakExcuteIfSkip?: boolean | undefined;
1608
+ breakExcuteIfEmpty?: boolean | undefined;
1604
1609
  }): this;
1605
1610
  /** AND key NOT GLOB :value */
1606
- notPreciseGlob(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1611
+ notPreciseGlob(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1607
1612
  paramName?: string | undefined;
1608
1613
  skipEmptyString?: boolean | undefined;
1609
- breakExcuteIfSkip?: boolean | undefined;
1614
+ breakExcuteIfEmpty?: boolean | undefined;
1610
1615
  }): this;
1611
1616
  /** AND key IN :value */
1612
- in(key: keyof T, value: Array<string | number>, { paramName, breakExcuteIfSkip }?: {
1617
+ in(key: keyof T, value: Array<string | number>, { paramName, breakExcuteIfEmpty }?: {
1613
1618
  paramName?: string | undefined;
1614
- breakExcuteIfSkip?: boolean | undefined;
1619
+ breakExcuteIfEmpty?: boolean | undefined;
1615
1620
  }): this;
1616
1621
  /** AND key NOT IN :value */
1617
- notIn(key: keyof T, value: Array<string | number>, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1622
+ notIn(key: keyof T, value: Array<string | number>, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1618
1623
  paramName?: string | undefined;
1619
1624
  skipEmptyString?: boolean | undefined;
1620
- breakExcuteIfSkip?: boolean | undefined;
1625
+ breakExcuteIfEmpty?: boolean | undefined;
1621
1626
  }): this;
1622
1627
  /** AND :value IN (key1, key2, ...) */
1623
- in2(key: (keyof T)[], value: string | number, { paramName, breakExcuteIfSkip }?: {
1628
+ in2(key: (keyof T)[], value: string | number, { paramName, breakExcuteIfEmpty }?: {
1624
1629
  paramName?: string | undefined;
1625
- breakExcuteIfSkip?: boolean | undefined;
1630
+ breakExcuteIfEmpty?: boolean | undefined;
1626
1631
  }): this;
1627
1632
  /** AND :value NOT IN (key1, key2, ...) */
1628
- notIn2(key: (keyof T)[], value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1633
+ notIn2(key: (keyof T)[], value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1629
1634
  paramName?: string | undefined;
1630
1635
  skipEmptyString?: boolean | undefined;
1631
- breakExcuteIfSkip?: boolean | undefined;
1636
+ breakExcuteIfEmpty?: boolean | undefined;
1632
1637
  }): this;
1633
1638
  /** AND key IS NULL */
1634
1639
  isNULL(key: keyof T): this;
1635
1640
  /** AND key IS NOT NULL */
1636
1641
  isNotNULL(key: keyof T): this;
1637
1642
  /** AND key BETWEEN :value1 AND :value2 */
1638
- between(key: keyof T, value1: string | number, value2: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1643
+ between(key: keyof T, value1: string | number, value2: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1639
1644
  paramName?: string | undefined;
1640
1645
  skipEmptyString?: boolean | undefined;
1641
- breakExcuteIfSkip?: boolean | undefined;
1646
+ breakExcuteIfEmpty?: boolean | undefined;
1642
1647
  }): this;
1643
1648
  /** AND key NOT BETWEEN :value1 AND :value2 */
1644
- notBetween(key: keyof T, value1: string | number, value2: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1649
+ notBetween(key: keyof T, value1: string | number, value2: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1645
1650
  paramName?: string | undefined;
1646
1651
  skipEmptyString?: boolean | undefined;
1647
- breakExcuteIfSkip?: boolean | undefined;
1652
+ breakExcuteIfEmpty?: boolean | undefined;
1648
1653
  }): this;
1649
1654
  /** AND POW(2, key) & :value */
1650
- pow(key: keyof T, value: number, { paramName, breakExcuteIfSkip }?: {
1655
+ pow(key: keyof T, value: number, { paramName, breakExcuteIfEmpty }?: {
1651
1656
  paramName?: string | undefined;
1652
- breakExcuteIfSkip?: boolean | undefined;
1657
+ breakExcuteIfEmpty?: boolean | undefined;
1653
1658
  }): this;
1654
1659
  /** AND NOT POW(2, key) & :value */
1655
- notPow(key: keyof T, value: number, { paramName, breakExcuteIfSkip }?: {
1660
+ notPow(key: keyof T, value: number, { paramName, breakExcuteIfEmpty }?: {
1656
1661
  paramName?: string | undefined;
1657
- breakExcuteIfSkip?: boolean | undefined;
1662
+ breakExcuteIfEmpty?: boolean | undefined;
1658
1663
  }): this;
1659
1664
  /** AND POW(2, key1) & key2 */
1660
- powWith(key: keyof T, values: Array<number | string>, { paramName, breakExcuteIfSkip }?: {
1665
+ powWith(key: keyof T, values: Array<number | string>, { paramName, breakExcuteIfEmpty }?: {
1661
1666
  paramName?: string | undefined;
1662
- breakExcuteIfSkip?: boolean | undefined;
1667
+ breakExcuteIfEmpty?: boolean | undefined;
1663
1668
  }): this;
1664
1669
  /** AND NOT POW(2, key1) & key2 */
1665
- notPowWith(key: keyof T, values: Array<number | string>, { paramName, breakExcuteIfSkip }?: {
1670
+ notPowWith(key: keyof T, values: Array<number | string>, { paramName, breakExcuteIfEmpty }?: {
1666
1671
  paramName?: string | undefined;
1667
- breakExcuteIfSkip?: boolean | undefined;
1672
+ breakExcuteIfEmpty?: boolean | undefined;
1668
1673
  }): this;
1669
1674
  /** AND MATCH(key1, key2, key3) AGAINST (:value) */
1670
- match(value: string, keys: (keyof T)[], { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1675
+ match(value: string, keys: (keyof T)[], { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1671
1676
  paramName?: string | undefined;
1672
1677
  skipEmptyString?: boolean | undefined;
1673
- breakExcuteIfSkip?: boolean | undefined;
1678
+ breakExcuteIfEmpty?: boolean | undefined;
1674
1679
  }): this;
1675
1680
  /** AND NOT MATCH(key1, key2, key3) AGAINST (:value) */
1676
- notMatch(value: string, keys: (keyof T)[], { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1681
+ notMatch(value: string, keys: (keyof T)[], { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1677
1682
  paramName?: string | undefined;
1678
1683
  skipEmptyString?: boolean | undefined;
1679
- breakExcuteIfSkip?: boolean | undefined;
1684
+ breakExcuteIfEmpty?: boolean | undefined;
1680
1685
  }): this;
1681
1686
  /** AND MATCH(key1, key2, key3) AGAINST (:value) IN BOOLEAN MODE*/
1682
- matchBoolean(value: string, keys: (keyof T)[], { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1687
+ matchBoolean(value: string, keys: (keyof T)[], { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1683
1688
  paramName?: string | undefined;
1684
1689
  skipEmptyString?: boolean | undefined;
1685
- breakExcuteIfSkip?: boolean | undefined;
1690
+ breakExcuteIfEmpty?: boolean | undefined;
1686
1691
  }): this;
1687
1692
  /** AND NOT MATCH(key1, key2, key3) AGAINST (:value) IN BOOLEAN MODE */
1688
- notMatchBoolean(value: string, keys: (keyof T)[], { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1693
+ notMatchBoolean(value: string, keys: (keyof T)[], { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1689
1694
  paramName?: string | undefined;
1690
1695
  skipEmptyString?: boolean | undefined;
1691
- breakExcuteIfSkip?: boolean | undefined;
1696
+ breakExcuteIfEmpty?: boolean | undefined;
1692
1697
  }): this;
1693
1698
  /** AND MATCH(key1, key2, key3) AGAINST (:value) WITH QUERY EXPANSION*/
1694
- matchQuery(value: string, keys: (keyof T)[], { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1699
+ matchQuery(value: string, keys: (keyof T)[], { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1695
1700
  paramName?: string | undefined;
1696
1701
  skipEmptyString?: boolean | undefined;
1697
- breakExcuteIfSkip?: boolean | undefined;
1702
+ breakExcuteIfEmpty?: boolean | undefined;
1698
1703
  }): this;
1699
1704
  /** AND NOT MATCH(key1, key2, key3) AGAINST (:value) WITH QUERY EXPANSION*/
1700
- notMatchQuery(value: string, keys: (keyof T)[], { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1705
+ notMatchQuery(value: string, keys: (keyof T)[], { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1701
1706
  paramName?: string | undefined;
1702
1707
  skipEmptyString?: boolean | undefined;
1703
- breakExcuteIfSkip?: boolean | undefined;
1708
+ breakExcuteIfEmpty?: boolean | undefined;
1704
1709
  }): this;
1705
1710
  /** AND NOT LOCATE(key, :value) > 0 */
1706
- includes(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1711
+ includes(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1707
1712
  paramName?: string | undefined;
1708
1713
  skipEmptyString?: boolean | undefined;
1709
- breakExcuteIfSkip?: boolean | undefined;
1714
+ breakExcuteIfEmpty?: boolean | undefined;
1710
1715
  }): this;
1711
1716
  /** AND NOT LOCATE(key, :value) = 0 */
1712
- notIncludes(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfSkip }?: {
1717
+ notIncludes(key: keyof T, value: string | number, { paramName, skipEmptyString, breakExcuteIfEmpty }?: {
1713
1718
  paramName?: string | undefined;
1714
1719
  skipEmptyString?: boolean | undefined;
1715
- breakExcuteIfSkip?: boolean | undefined;
1720
+ breakExcuteIfEmpty?: boolean | undefined;
1716
1721
  }): this;
1717
1722
  and(fn: StreamQuery<T> | ((stream: StreamQuery<T>) => boolean | void)): this;
1718
1723
  or(fn: StreamQuery<T> | ((stream: StreamQuery<T>) => boolean | void)): this;
@@ -1844,9 +1849,11 @@ declare class StreamQuery<T extends object> {
1844
1849
  }): number;
1845
1850
  excuteDelete(option?: MethodOption & {
1846
1851
  sync?: SyncMode.Async;
1852
+ forceDelete?: boolean;
1847
1853
  }): Promise<number>;
1848
1854
  excuteDelete(option: MethodOption & {
1849
1855
  sync: SyncMode.Sync;
1856
+ forceDelete?: boolean;
1850
1857
  }): number;
1851
1858
  private _where;
1852
1859
  private _;
package/sql.js CHANGED
@@ -2523,20 +2523,32 @@ export class SqlService {
2523
2523
  option.where = ids.map(i => ({ [idName]: i }));
2524
2524
  }
2525
2525
  const wheres = option.where instanceof Array ? option.where : [option.where];
2526
- if (wheres.length === 0) {
2526
+ if (wheres.length === 0 && (!option.whereSql || !option.whereParams)) {
2527
2527
  return 0;
2528
2528
  }
2529
+ if (option.whereSql && option.whereParams) {
2530
+ option.mode = DeleteMode.Common;
2531
+ }
2529
2532
  const sqls = [];
2530
2533
  if (option.mode === DeleteMode.Common) {
2531
- const params = new Array();
2532
- const whereSql = iterate(wheres).map(where => {
2533
- return `(
2534
- ${Object.entries(where).map(([K, V]) => {
2535
- params.push(V);
2536
- return `${this[_fields][K]?.C2()} = ?`;
2537
- }).join(' AND ')}
2538
- )`;
2539
- }).join(' OR ');
2534
+ let params;
2535
+ let whereSql;
2536
+ if (option.whereSql && option.whereParams) {
2537
+ const gen = this._generSql(option.dbType, option.whereSql, option.whereParams);
2538
+ whereSql = gen.sql;
2539
+ params = gen.params;
2540
+ }
2541
+ else {
2542
+ params = new Array();
2543
+ whereSql = iterate(wheres).map(where => {
2544
+ return `(
2545
+ ${Object.entries(where).map(([K, V]) => {
2546
+ params.push(V);
2547
+ return `${this[_fields][K]?.C2()} = ?`;
2548
+ }).join(' AND ')}
2549
+ )`;
2550
+ }).join(' OR ');
2551
+ }
2540
2552
  if (this[_stateFileName] !== undefined && option.forceDelete !== true) {
2541
2553
  params.unshift(this[_deleteState]);
2542
2554
  sqls.push({
@@ -3473,11 +3485,11 @@ class StreamQuery {
3473
3485
  * AND(key1 = :value OR key2 = :value)
3474
3486
  * @param keys [key1, key2, ...]
3475
3487
  */
3476
- eqs(keys, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this.__(keys, value, '=', { paramName, skipEmptyString, breakExcuteIfSkip }); }
3488
+ eqs(keys, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this.__(keys, value, '=', { paramName, skipEmptyString, breakExcuteIfEmpty }); }
3477
3489
  /*** AND key = :value */
3478
- eq(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._(key, value, '=', { paramName, skipEmptyString, breakExcuteIfSkip }); }
3490
+ eq(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._(key, value, '=', { paramName, skipEmptyString, breakExcuteIfEmpty }); }
3479
3491
  /*** AND key1 = :value1 AND key2 = :value2 */
3480
- eqT(t, { name: paramName = '', breakExcuteIfSkip = false } = {}) {
3492
+ eqT(t, { name: paramName = '', breakExcuteIfEmpty = true } = {}) {
3481
3493
  let exe = false;
3482
3494
  if (t) {
3483
3495
  t = this._service[_transformer](t, {
@@ -3509,113 +3521,113 @@ class StreamQuery {
3509
3521
  exe = true;
3510
3522
  }
3511
3523
  }
3512
- if (breakExcuteIfSkip && exe === false) {
3524
+ if (breakExcuteIfEmpty && exe === false) {
3513
3525
  this.if_exec = false;
3514
3526
  }
3515
3527
  return this;
3516
3528
  }
3517
3529
  /*** AND key <> :value */
3518
- notEq(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._(key, value, '<>', { paramName, skipEmptyString, breakExcuteIfSkip }); }
3530
+ notEq(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._(key, value, '<>', { paramName, skipEmptyString, breakExcuteIfEmpty }); }
3519
3531
  /** AND key1 = key2 */
3520
3532
  eqWith(key1, key2) { return this._key(key1, key2, '='); }
3521
3533
  /** AND key1 <> key2 */
3522
3534
  notEqWith(key1, key2) { return this._key(key1, key2, '<>'); }
3523
3535
  /** AND key REGEXP :regexp */
3524
- regexp(key, regexp, { paramName = '', breakExcuteIfSkip = false } = {}) { return this._(key, regexp, 'REGEXP', { paramName, skipEmptyString: true, breakExcuteIfSkip }); }
3536
+ regexp(key, regexp, { paramName = '', breakExcuteIfEmpty = true } = {}) { return this._(key, regexp, 'REGEXP', { paramName, skipEmptyString: true, breakExcuteIfEmpty }); }
3525
3537
  /** AND key NOT REGEXP :regexp */
3526
- notRegexp(key, regexp, { paramName = '', breakExcuteIfSkip = false } = {}) { return this._(key, regexp, 'REGEXP', { paramName, skipEmptyString: true, not: 'NOT', breakExcuteIfSkip }); }
3538
+ notRegexp(key, regexp, { paramName = '', breakExcuteIfEmpty = true } = {}) { return this._(key, regexp, 'REGEXP', { paramName, skipEmptyString: true, not: 'NOT', breakExcuteIfEmpty }); }
3527
3539
  /** AND (key1 << 8) + key2 = value */
3528
- shiftEq(key1, key2, value, { paramName = '', breakExcuteIfSkip = false } = {}) { return this._shift(key1, key2, value, '=', { paramName, breakExcuteIfSkip }); }
3540
+ shiftEq(key1, key2, value, { paramName = '', breakExcuteIfEmpty = true } = {}) { return this._shift(key1, key2, value, '=', { paramName, breakExcuteIfEmpty }); }
3529
3541
  /** AND (key1 << 8) + key2 <> value */
3530
- shiftNotEq(key1, key2, value, { paramName = '', breakExcuteIfSkip = false } = {}) { return this._shift(key1, key2, value, '<>', { paramName, breakExcuteIfSkip }); }
3542
+ shiftNotEq(key1, key2, value, { paramName = '', breakExcuteIfEmpty = true } = {}) { return this._shift(key1, key2, value, '<>', { paramName, breakExcuteIfEmpty }); }
3531
3543
  /** AND key > :value */
3532
- grate(key, value, { paramName = '', breakExcuteIfSkip = false } = {}) { return this._(key, value, '>', { paramName, skipEmptyString: true, breakExcuteIfSkip }); }
3544
+ grate(key, value, { paramName = '', breakExcuteIfEmpty = true } = {}) { return this._(key, value, '>', { paramName, skipEmptyString: true, breakExcuteIfEmpty }); }
3533
3545
  /** AND key >= :value */
3534
- grateEq(key, value, { paramName = '', breakExcuteIfSkip = false } = {}) { return this._(key, value, '>=', { paramName, skipEmptyString: true, breakExcuteIfSkip }); }
3546
+ grateEq(key, value, { paramName = '', breakExcuteIfEmpty = true } = {}) { return this._(key, value, '>=', { paramName, skipEmptyString: true, breakExcuteIfEmpty }); }
3535
3547
  /** AND key1 > key2 */
3536
3548
  grateWith(key1, key2) { return this._key(key1, key2, '>'); }
3537
3549
  /** AND key1 >= key2 */
3538
3550
  grateEqWith(key1, key2) { return this._key(key1, key2, '>='); }
3539
3551
  /** AND key < :value */
3540
- less(key, value, { paramName = '', breakExcuteIfSkip = false } = {}) { return this._(key, value, '<', { paramName, skipEmptyString: true, breakExcuteIfSkip }); }
3552
+ less(key, value, { paramName = '', breakExcuteIfEmpty = true } = {}) { return this._(key, value, '<', { paramName, skipEmptyString: true, breakExcuteIfEmpty }); }
3541
3553
  /** AND key <= :value */
3542
- lessEq(key, value, { paramName = '', breakExcuteIfSkip = false } = {}) { return this._(key, value, '<=', { paramName, skipEmptyString: true, breakExcuteIfSkip }); }
3554
+ lessEq(key, value, { paramName = '', breakExcuteIfEmpty = true } = {}) { return this._(key, value, '<=', { paramName, skipEmptyString: true, breakExcuteIfEmpty }); }
3543
3555
  /** AND key1 < key2 */
3544
3556
  lessWith(key1, key2) { return this._key(key1, key2, '<'); }
3545
3557
  /** AND key1 <= key2 */
3546
3558
  lessEqWith(key1, key2) { return this._key(key1, key2, '<='); }
3547
3559
  /** AND key LIKE CONCAT('%', :value, '%') */
3548
- like(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._like(key, value, { paramName, skipEmptyString, left: '%', right: '%', breakExcuteIfSkip }); }
3560
+ like(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._like(key, value, { paramName, skipEmptyString, left: '%', right: '%', breakExcuteIfEmpty }); }
3549
3561
  /** AND key NOT LIKE CONCAT('%', :value, '%') */
3550
- notLike(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._like(key, value, { paramName, skipEmptyString, left: '%', right: '%', not: 'NOT', breakExcuteIfSkip }); }
3562
+ notLike(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._like(key, value, { paramName, skipEmptyString, left: '%', right: '%', not: 'NOT', breakExcuteIfEmpty }); }
3551
3563
  /** AND key NOT LIKE CONCAT('%', :value) */
3552
- leftLike(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._like(key, value, { paramName, skipEmptyString, left: '%', breakExcuteIfSkip }); }
3564
+ leftLike(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._like(key, value, { paramName, skipEmptyString, left: '%', breakExcuteIfEmpty }); }
3553
3565
  /** AND key LIKE CONCAT('%', :value) */
3554
- notLeftLike(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._like(key, value, { paramName, skipEmptyString, left: '%', not: 'NOT', breakExcuteIfSkip }); }
3566
+ notLeftLike(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._like(key, value, { paramName, skipEmptyString, left: '%', not: 'NOT', breakExcuteIfEmpty }); }
3555
3567
  /** AND key LIKE CONCAT(:value, '%') */
3556
- rightLike(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._like(key, value, { paramName, skipEmptyString, right: '%', breakExcuteIfSkip }); }
3568
+ rightLike(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._like(key, value, { paramName, skipEmptyString, right: '%', breakExcuteIfEmpty }); }
3557
3569
  /** AND key NOT LIKE CONCAT(:value, '%') */
3558
- notRightLike(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._like(key, value, { paramName, skipEmptyString, right: '%', not: 'NOT', breakExcuteIfSkip }); }
3570
+ notRightLike(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._like(key, value, { paramName, skipEmptyString, right: '%', not: 'NOT', breakExcuteIfEmpty }); }
3559
3571
  /** AND key NOT LIKE :value */
3560
- PreciseLike(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._like(key, value, { paramName, skipEmptyString, breakExcuteIfSkip }); }
3572
+ PreciseLike(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._like(key, value, { paramName, skipEmptyString, breakExcuteIfEmpty }); }
3561
3573
  /** AND key LIKE :value */
3562
- notPreciseLike(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._like(key, value, { paramName, skipEmptyString, not: 'NOT', breakExcuteIfSkip }); }
3574
+ notPreciseLike(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._like(key, value, { paramName, skipEmptyString, not: 'NOT', breakExcuteIfEmpty }); }
3563
3575
  /** AND key GLOB CONCAT('%', :value, '%') */
3564
- glob(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._like(key, value, { paramName, skipEmptyString, left: '%', right: '%', breakExcuteIfSkip, op: 'GLOB' }); }
3576
+ glob(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._like(key, value, { paramName, skipEmptyString, left: '%', right: '%', breakExcuteIfEmpty, op: 'GLOB' }); }
3565
3577
  /** AND key NOT GLOB CONCAT('%', :value, '%') */
3566
- notGlob(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._like(key, value, { paramName, skipEmptyString, left: '%', right: '%', not: 'NOT', breakExcuteIfSkip, op: 'GLOB' }); }
3578
+ notGlob(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._like(key, value, { paramName, skipEmptyString, left: '%', right: '%', not: 'NOT', breakExcuteIfEmpty, op: 'GLOB' }); }
3567
3579
  /** AND key GLOB CONCAT('%', :value) */
3568
- leftGlob(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._like(key, value, { paramName, skipEmptyString, left: '%', breakExcuteIfSkip, op: 'GLOB' }); }
3580
+ leftGlob(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._like(key, value, { paramName, skipEmptyString, left: '%', breakExcuteIfEmpty, op: 'GLOB' }); }
3569
3581
  /** AND key NOT GLOB CONCAT('%', :value) */
3570
- notLeftGlob(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._like(key, value, { paramName, skipEmptyString, left: '%', not: 'NOT', breakExcuteIfSkip, op: 'GLOB' }); }
3582
+ notLeftGlob(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._like(key, value, { paramName, skipEmptyString, left: '%', not: 'NOT', breakExcuteIfEmpty, op: 'GLOB' }); }
3571
3583
  /** AND key GLOB CONCAT(:value, '%') */
3572
- rightGlob(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._like(key, value, { paramName, skipEmptyString, right: '%', breakExcuteIfSkip, op: 'GLOB' }); }
3584
+ rightGlob(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._like(key, value, { paramName, skipEmptyString, right: '%', breakExcuteIfEmpty, op: 'GLOB' }); }
3573
3585
  /** AND key NOT GLOB CONCAT(:value, '%') */
3574
- notRightGlob(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._like(key, value, { paramName, skipEmptyString, right: '%', not: 'NOT', breakExcuteIfSkip, op: 'GLOB' }); }
3586
+ notRightGlob(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._like(key, value, { paramName, skipEmptyString, right: '%', not: 'NOT', breakExcuteIfEmpty, op: 'GLOB' }); }
3575
3587
  /** AND key GLOB :value */
3576
- PreciseGlob(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._like(key, value, { paramName, skipEmptyString, breakExcuteIfSkip, op: 'GLOB' }); }
3588
+ PreciseGlob(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._like(key, value, { paramName, skipEmptyString, breakExcuteIfEmpty, op: 'GLOB' }); }
3577
3589
  /** AND key NOT GLOB :value */
3578
- notPreciseGlob(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._like(key, value, { paramName, skipEmptyString, not: 'NOT', breakExcuteIfSkip, op: 'GLOB' }); }
3590
+ notPreciseGlob(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._like(key, value, { paramName, skipEmptyString, not: 'NOT', breakExcuteIfEmpty, op: 'GLOB' }); }
3579
3591
  /** AND key IN :value */
3580
- in(key, value, { paramName = '', breakExcuteIfSkip = false } = {}) { return this._in(key, value, { paramName, breakExcuteIfSkip }); }
3592
+ in(key, value, { paramName = '', breakExcuteIfEmpty = true } = {}) { return this._in(key, value, { paramName, breakExcuteIfEmpty }); }
3581
3593
  /** AND key NOT IN :value */
3582
- notIn(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._in(key, value, { paramName, skipEmptyString, not: 'NOT', breakExcuteIfSkip }); }
3594
+ notIn(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._in(key, value, { paramName, skipEmptyString, not: 'NOT', breakExcuteIfEmpty }); }
3583
3595
  /** AND :value IN (key1, key2, ...) */
3584
- in2(key, value, { paramName = '', breakExcuteIfSkip = false } = {}) { return this._in2(key, value, { paramName, breakExcuteIfSkip }); }
3596
+ in2(key, value, { paramName = '', breakExcuteIfEmpty = true } = {}) { return this._in2(key, value, { paramName, breakExcuteIfEmpty }); }
3585
3597
  /** AND :value NOT IN (key1, key2, ...) */
3586
- notIn2(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._in2(key, value, { paramName, skipEmptyString, not: 'NOT', breakExcuteIfSkip }); }
3598
+ notIn2(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._in2(key, value, { paramName, skipEmptyString, not: 'NOT', breakExcuteIfEmpty }); }
3587
3599
  /** AND key IS NULL */
3588
3600
  isNULL(key) { return this._null(key); }
3589
3601
  /** AND key IS NOT NULL */
3590
3602
  isNotNULL(key) { return this._null(key, 'NOT'); }
3591
3603
  /** AND key BETWEEN :value1 AND :value2 */
3592
- between(key, value1, value2, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._between(key, value1, value2, { paramName, skipEmptyString, breakExcuteIfSkip }); }
3604
+ between(key, value1, value2, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._between(key, value1, value2, { paramName, skipEmptyString, breakExcuteIfEmpty }); }
3593
3605
  /** AND key NOT BETWEEN :value1 AND :value2 */
3594
- notBetween(key, value1, value2, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._between(key, value1, value2, { paramName, skipEmptyString, not: 'NOT', breakExcuteIfSkip }); }
3606
+ notBetween(key, value1, value2, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._between(key, value1, value2, { paramName, skipEmptyString, not: 'NOT', breakExcuteIfEmpty }); }
3595
3607
  /** AND POW(2, key) & :value */
3596
- pow(key, value, { paramName = '', breakExcuteIfSkip = false } = {}) { return this._pow(key, value, { paramName, breakExcuteIfSkip }); }
3608
+ pow(key, value, { paramName = '', breakExcuteIfEmpty = true } = {}) { return this._pow(key, value, { paramName, breakExcuteIfEmpty }); }
3597
3609
  /** AND NOT POW(2, key) & :value */
3598
- notPow(key, value, { paramName = '', breakExcuteIfSkip = false } = {}) { return this._pow(key, value, { paramName, not: 'NOT', breakExcuteIfSkip }); }
3610
+ notPow(key, value, { paramName = '', breakExcuteIfEmpty = true } = {}) { return this._pow(key, value, { paramName, not: 'NOT', breakExcuteIfEmpty }); }
3599
3611
  /** AND POW(2, key1) & key2 */
3600
- powWith(key, values, { paramName = '', breakExcuteIfSkip = false } = {}) { return this._pow(key, add(...values.map(value => Math.pow(2, +value))), { paramName, breakExcuteIfSkip }); }
3612
+ powWith(key, values, { paramName = '', breakExcuteIfEmpty = true } = {}) { return this._pow(key, add(...values.map(value => Math.pow(2, +value))), { paramName, breakExcuteIfEmpty }); }
3601
3613
  /** AND NOT POW(2, key1) & key2 */
3602
- notPowWith(key, values, { paramName = '', breakExcuteIfSkip = false } = {}) { return this._pow(key, add(...values.map(value => Math.pow(2, +value))), { paramName, not: 'NOT', breakExcuteIfSkip }); }
3614
+ notPowWith(key, values, { paramName = '', breakExcuteIfEmpty = true } = {}) { return this._pow(key, add(...values.map(value => Math.pow(2, +value))), { paramName, not: 'NOT', breakExcuteIfEmpty }); }
3603
3615
  /** AND MATCH(key1, key2, key3) AGAINST (:value) */
3604
- match(value, keys, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._match(value, keys, { paramName, skipEmptyString, breakExcuteIfSkip }); }
3616
+ match(value, keys, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._match(value, keys, { paramName, skipEmptyString, breakExcuteIfEmpty }); }
3605
3617
  /** AND NOT MATCH(key1, key2, key3) AGAINST (:value) */
3606
- notMatch(value, keys, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._match(value, keys, { paramName, skipEmptyString, not: 'NOT', breakExcuteIfSkip }); }
3618
+ notMatch(value, keys, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._match(value, keys, { paramName, skipEmptyString, not: 'NOT', breakExcuteIfEmpty }); }
3607
3619
  /** AND MATCH(key1, key2, key3) AGAINST (:value) IN BOOLEAN MODE*/
3608
- matchBoolean(value, keys, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._match(value, keys, { paramName, skipEmptyString, breakExcuteIfSkip, append: 'IN BOOLEAN MODE' }); }
3620
+ matchBoolean(value, keys, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._match(value, keys, { paramName, skipEmptyString, breakExcuteIfEmpty, append: 'IN BOOLEAN MODE' }); }
3609
3621
  /** AND NOT MATCH(key1, key2, key3) AGAINST (:value) IN BOOLEAN MODE */
3610
- notMatchBoolean(value, keys, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._match(value, keys, { paramName, skipEmptyString, breakExcuteIfSkip, not: 'NOT', append: 'IN BOOLEAN MODE' }); }
3622
+ notMatchBoolean(value, keys, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._match(value, keys, { paramName, skipEmptyString, breakExcuteIfEmpty, not: 'NOT', append: 'IN BOOLEAN MODE' }); }
3611
3623
  /** AND MATCH(key1, key2, key3) AGAINST (:value) WITH QUERY EXPANSION*/
3612
- matchQuery(value, keys, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._match(value, keys, { paramName, skipEmptyString, breakExcuteIfSkip, append: 'WITH QUERY EXPANSION' }); }
3624
+ matchQuery(value, keys, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._match(value, keys, { paramName, skipEmptyString, breakExcuteIfEmpty, append: 'WITH QUERY EXPANSION' }); }
3613
3625
  /** AND NOT MATCH(key1, key2, key3) AGAINST (:value) WITH QUERY EXPANSION*/
3614
- notMatchQuery(value, keys, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._match(value, keys, { paramName, skipEmptyString, breakExcuteIfSkip, not: 'NOT', append: 'WITH QUERY EXPANSION' }); }
3626
+ notMatchQuery(value, keys, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._match(value, keys, { paramName, skipEmptyString, breakExcuteIfEmpty, not: 'NOT', append: 'WITH QUERY EXPANSION' }); }
3615
3627
  /** AND NOT LOCATE(key, :value) > 0 */
3616
- includes(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._includes(key, value, { paramName, skipEmptyString, breakExcuteIfSkip }); }
3628
+ includes(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._includes(key, value, { paramName, skipEmptyString, breakExcuteIfEmpty }); }
3617
3629
  /** AND NOT LOCATE(key, :value) = 0 */
3618
- notIncludes(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) { return this._includes(key, value, { paramName, skipEmptyString, not: 'NOT', breakExcuteIfSkip }); }
3630
+ notIncludes(key, value, { paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) { return this._includes(key, value, { paramName, skipEmptyString, not: 'NOT', breakExcuteIfEmpty }); }
3619
3631
  and(fn) {
3620
3632
  if (fn instanceof StreamQuery) {
3621
3633
  this._andQuerys.push(fn);
@@ -3865,15 +3877,15 @@ class StreamQuery {
3865
3877
  option ?? (option = {});
3866
3878
  option.sync ?? (option.sync = SyncMode.Async);
3867
3879
  const { where, params } = this._where();
3868
- const sql = `DELETE FROM ${option.tableName ?? this._service[_tableName]}
3869
- ${where ? ' WHERE ' : ''}
3870
- ${where}
3871
- `;
3880
+ // const sql = `DELETE FROM ${option.tableName ?? this._service[_tableName]}
3881
+ // ${where ? ' WHERE ' : ''}
3882
+ // ${where}
3883
+ // `;
3872
3884
  if (option.sync === SyncMode.Async) {
3873
- return this._service.excute({ ...option, sync: SyncMode.Async, sql, params });
3885
+ return this._service.delete({ ...option, sync: SyncMode.Async, whereSql: where, whereParams: params });
3874
3886
  }
3875
3887
  else {
3876
- return this._service.excute({ ...option, sync: SyncMode.Sync, sql, params });
3888
+ return this._service.delete({ ...option, sync: SyncMode.Sync, whereSql: where, whereParams: params });
3877
3889
  }
3878
3890
  }
3879
3891
  _where() {
@@ -3902,11 +3914,11 @@ class StreamQuery {
3902
3914
  }
3903
3915
  return { where: wheres.join(' '), params: this._param };
3904
3916
  }
3905
- _(key, value, op, { not = '', paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) {
3917
+ _(key, value, op, { not = '', paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) {
3906
3918
  if (value === null
3907
3919
  || value === undefined
3908
3920
  || (emptyString(`${value ?? ''}`) && skipEmptyString)) {
3909
- if (breakExcuteIfSkip) {
3921
+ if (breakExcuteIfEmpty) {
3910
3922
  this.if_exec = false;
3911
3923
  }
3912
3924
  return this;
@@ -3924,11 +3936,11 @@ class StreamQuery {
3924
3936
  }
3925
3937
  return this;
3926
3938
  }
3927
- __(keys, value, op, { not = '', paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) {
3939
+ __(keys, value, op, { not = '', paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) {
3928
3940
  if (value === null
3929
3941
  || value === undefined
3930
3942
  || (emptyString(`${value ?? ''}`) && skipEmptyString)) {
3931
- if (breakExcuteIfSkip) {
3943
+ if (breakExcuteIfEmpty) {
3932
3944
  this.if_exec = false;
3933
3945
  }
3934
3946
  return this;
@@ -3954,14 +3966,14 @@ class StreamQuery {
3954
3966
  this._wheres.push(`AND ${this[_fields][String(key1)]?.C2()} ${not} ${op} ${this[_fields][String(key2)]?.C2()} `);
3955
3967
  return this;
3956
3968
  }
3957
- _between(key, value1, value2, { not = '', paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) {
3969
+ _between(key, value1, value2, { not = '', paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) {
3958
3970
  if (value1 === null
3959
3971
  || value1 === undefined
3960
3972
  || (emptyString(`${value1 ?? ''}`) && skipEmptyString)
3961
3973
  || value2 === null
3962
3974
  || value2 === undefined
3963
3975
  || (emptyString(`${value2 ?? ''}`) && skipEmptyString)) {
3964
- if (breakExcuteIfSkip) {
3976
+ if (breakExcuteIfEmpty) {
3965
3977
  this.if_exec = false;
3966
3978
  }
3967
3979
  return this;
@@ -3981,7 +3993,7 @@ class StreamQuery {
3981
3993
  }
3982
3994
  return this;
3983
3995
  }
3984
- _in(key, value, { not = '', paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) {
3996
+ _in(key, value, { not = '', paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) {
3985
3997
  if (value && value.length > 0 && skipEmptyString) {
3986
3998
  value = value.filter(v => !emptyString(`${v ?? ''}`));
3987
3999
  }
@@ -3998,12 +4010,12 @@ class StreamQuery {
3998
4010
  }
3999
4011
  }
4000
4012
  }
4001
- else if (breakExcuteIfSkip !== true) {
4013
+ else if (breakExcuteIfEmpty) {
4002
4014
  this.if_exec = false;
4003
4015
  }
4004
4016
  return this;
4005
4017
  }
4006
- _in2(key, value, { not = '', paramName = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) {
4018
+ _in2(key, value, { not = '', paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) {
4007
4019
  const skip = emptyString(`${value ?? ''}`) && skipEmptyString;
4008
4020
  if (!skip) {
4009
4021
  if (paramName !== undefined && this._paramKeys.hasOwnProperty(paramName)) {
@@ -4018,16 +4030,16 @@ class StreamQuery {
4018
4030
  }
4019
4031
  }
4020
4032
  }
4021
- else if (breakExcuteIfSkip !== true) {
4033
+ else if (breakExcuteIfEmpty) {
4022
4034
  this.if_exec = false;
4023
4035
  }
4024
4036
  return this;
4025
4037
  }
4026
- _shift(key1, key2, value, op, { not = '', paramName = '', breakExcuteIfSkip = false } = {}) {
4038
+ _shift(key1, key2, value, op, { not = '', paramName = '', breakExcuteIfEmpty = true } = {}) {
4027
4039
  if (value === null
4028
4040
  || value === undefined
4029
4041
  || emptyString(`${value ?? ''}`)) {
4030
- if (breakExcuteIfSkip) {
4042
+ if (breakExcuteIfEmpty) {
4031
4043
  this.if_exec = false;
4032
4044
  }
4033
4045
  return this;
@@ -4045,11 +4057,11 @@ class StreamQuery {
4045
4057
  }
4046
4058
  return this;
4047
4059
  }
4048
- _match(value, keys, { paramName = '', not = '', append = '', skipEmptyString = true, breakExcuteIfSkip = false } = {}) {
4060
+ _match(value, keys, { paramName = '', not = '', append = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) {
4049
4061
  if (value === null
4050
4062
  || value === undefined
4051
4063
  || emptyString(`${value ?? ''}`)) {
4052
- if (breakExcuteIfSkip) {
4064
+ if (breakExcuteIfEmpty) {
4053
4065
  this.if_exec = false;
4054
4066
  }
4055
4067
  return this;
@@ -4067,11 +4079,11 @@ class StreamQuery {
4067
4079
  }
4068
4080
  return this;
4069
4081
  }
4070
- _pow(key, value, { not = '', paramName = '', breakExcuteIfSkip = false } = {}) {
4082
+ _pow(key, value, { not = '', paramName = '', breakExcuteIfEmpty = true } = {}) {
4071
4083
  if (value === null
4072
4084
  || value === undefined
4073
4085
  || emptyString(`${value ?? ''}`)) {
4074
- if (breakExcuteIfSkip) {
4086
+ if (breakExcuteIfEmpty) {
4075
4087
  this.if_exec = false;
4076
4088
  }
4077
4089
  return this;
@@ -4089,11 +4101,11 @@ class StreamQuery {
4089
4101
  }
4090
4102
  return this;
4091
4103
  }
4092
- _like(key, value, { not = '', left = '', right = '', paramName = '', op = 'LIKE', skipEmptyString = true, breakExcuteIfSkip = false } = {}) {
4104
+ _like(key, value, { not = '', left = '', right = '', paramName = '', op = 'LIKE', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) {
4093
4105
  if (value === null
4094
4106
  || value === undefined
4095
4107
  || (emptyString(`${value ?? ''}`) && skipEmptyString)) {
4096
- if (breakExcuteIfSkip) {
4108
+ if (breakExcuteIfEmpty) {
4097
4109
  this.if_exec = false;
4098
4110
  }
4099
4111
  return this;
@@ -4111,11 +4123,11 @@ class StreamQuery {
4111
4123
  }
4112
4124
  return this;
4113
4125
  }
4114
- _includes(key, value, { not = '', paramName = '', skipEmptyString = true, breakExcuteIfSkip = true } = {}) {
4126
+ _includes(key, value, { not = '', paramName = '', skipEmptyString = true, breakExcuteIfEmpty = true } = {}) {
4115
4127
  if (value === null
4116
4128
  || value === undefined
4117
4129
  || (emptyString(`${value ?? ''}`) && skipEmptyString)) {
4118
- if (breakExcuteIfSkip) {
4130
+ if (breakExcuteIfEmpty) {
4119
4131
  this.if_exec = false;
4120
4132
  }
4121
4133
  return this;