lumen-framework 3.1.0 → 3.1.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/dist/index.js CHANGED
@@ -1204,6 +1204,17 @@ function runQuery(target) {
1204
1204
  }
1205
1205
 
1206
1206
  // src/packages/database/query/index.ts
1207
+ var CONDITIONS = /* @__PURE__ */ new Set([
1208
+ "where",
1209
+ "whereNot",
1210
+ "whereIn",
1211
+ "whereNotIn",
1212
+ "whereNull",
1213
+ "whereNotNull",
1214
+ "whereBetween",
1215
+ "whereNotBetween",
1216
+ "whereRaw"
1217
+ ]);
1207
1218
  var Query = class extends Promise {
1208
1219
  constructor(model) {
1209
1220
  let resolve2;
@@ -1396,12 +1407,11 @@ var Query = class extends Promise {
1396
1407
  return this;
1397
1408
  }
1398
1409
  count() {
1399
- const validName = /^(where(((Not)?(In)?)|(Raw)|(Between)))$/g;
1400
1410
  Object.assign(this, {
1401
1411
  shouldCount: true,
1402
1412
  snapshots: [
1403
1413
  ["count", "* as countAll"],
1404
- ...this.snapshots.filter(([name]) => validName.test(name))
1414
+ ...this.snapshots.filter(([name]) => CONDITIONS.has(name))
1405
1415
  ]
1406
1416
  });
1407
1417
  return this;