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.mjs CHANGED
@@ -1170,6 +1170,17 @@ function runQuery(target) {
1170
1170
  }
1171
1171
 
1172
1172
  // src/packages/database/query/index.ts
1173
+ var CONDITIONS = /* @__PURE__ */ new Set([
1174
+ "where",
1175
+ "whereNot",
1176
+ "whereIn",
1177
+ "whereNotIn",
1178
+ "whereNull",
1179
+ "whereNotNull",
1180
+ "whereBetween",
1181
+ "whereNotBetween",
1182
+ "whereRaw"
1183
+ ]);
1173
1184
  var Query = class extends Promise {
1174
1185
  constructor(model) {
1175
1186
  let resolve2;
@@ -1362,12 +1373,11 @@ var Query = class extends Promise {
1362
1373
  return this;
1363
1374
  }
1364
1375
  count() {
1365
- const validName = /^(where(((Not)?(In)?)|(Raw)|(Between)))$/g;
1366
1376
  Object.assign(this, {
1367
1377
  shouldCount: true,
1368
1378
  snapshots: [
1369
1379
  ["count", "* as countAll"],
1370
- ...this.snapshots.filter(([name]) => validName.test(name))
1380
+ ...this.snapshots.filter(([name]) => CONDITIONS.has(name))
1371
1381
  ]
1372
1382
  });
1373
1383
  return this;