@palbase/backend 27.0.0 → 27.1.0

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 (48) hide show
  1. package/dist/bin/palbase-backend.cjs +32 -1
  2. package/dist/bin/palbase-backend.cjs.map +1 -1
  3. package/dist/bin/palbase-backend.js +4 -4
  4. package/dist/{chunk-I3C4PFIW.js → chunk-BQN723PL.js} +3 -3
  5. package/dist/{chunk-OO7R25AI.js → chunk-EB3TUX5J.js} +20 -5
  6. package/dist/chunk-EB3TUX5J.js.map +1 -0
  7. package/dist/{chunk-GYK6QYS4.js → chunk-JVZQCC77.js} +21 -1
  8. package/dist/chunk-JVZQCC77.js.map +1 -0
  9. package/dist/{chunk-DRZFQRJI.js → chunk-OZKSM3JW.js} +2 -2
  10. package/dist/chunk-OZKSM3JW.js.map +1 -0
  11. package/dist/{chunk-TS4U7NBD.js → chunk-XABHGMUT.js} +2 -2
  12. package/dist/db/index.cjs +26 -0
  13. package/dist/db/index.cjs.map +1 -1
  14. package/dist/db/index.d.cts +1 -1
  15. package/dist/db/index.d.ts +1 -1
  16. package/dist/db/index.js +3 -3
  17. package/dist/engine/index.cjs +32 -1
  18. package/dist/engine/index.cjs.map +1 -1
  19. package/dist/engine/index.d.cts +3 -3
  20. package/dist/engine/index.d.ts +3 -3
  21. package/dist/engine/index.js +4 -4
  22. package/dist/{index-NuzRCuxe.d.ts → index-CAKOgAlP.d.ts} +2 -2
  23. package/dist/{index-Bve7BBTL.d.cts → index-CgE4sVhg.d.cts} +32 -12
  24. package/dist/{index-VtToZmUm.d.cts → index-H-0qv5d4.d.cts} +2 -2
  25. package/dist/{index-BrvvxSpn.d.ts → index-V7QRh1wg.d.ts} +32 -12
  26. package/dist/index.cjs +26 -0
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.d.cts +6 -6
  29. package/dist/index.d.ts +6 -6
  30. package/dist/index.js +4 -4
  31. package/dist/openapi/index.d.cts +2 -2
  32. package/dist/openapi/index.d.ts +2 -2
  33. package/dist/{registry-B0eyOF9x.d.ts → registry-4EI8aaFs.d.ts} +1 -1
  34. package/dist/{registry-Bk9_rbNd.d.cts → registry-DHsPDY0_.d.cts} +1 -1
  35. package/dist/test/index.cjs +27 -0
  36. package/dist/test/index.cjs.map +1 -1
  37. package/dist/test/index.d.cts +1 -1
  38. package/dist/test/index.d.ts +1 -1
  39. package/dist/test/index.js +19 -1
  40. package/dist/test/index.js.map +1 -1
  41. package/docs/database.md +35 -1
  42. package/docs/llms-full.txt +35 -1
  43. package/package.json +1 -1
  44. package/dist/chunk-DRZFQRJI.js.map +0 -1
  45. package/dist/chunk-GYK6QYS4.js.map +0 -1
  46. package/dist/chunk-OO7R25AI.js.map +0 -1
  47. /package/dist/{chunk-I3C4PFIW.js.map → chunk-BQN723PL.js.map} +0 -0
  48. /package/dist/{chunk-TS4U7NBD.js.map → chunk-XABHGMUT.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { T as Token } from '../module-Dl1KFVtc.cjs';
2
- import { D as DBClient } from '../index-Bve7BBTL.cjs';
2
+ import { D as DBClient } from '../index-CgE4sVhg.cjs';
3
3
  import '../db/env.cjs';
4
4
  import '../stack.cjs';
5
5
  import 'zod';
@@ -1,5 +1,5 @@
1
1
  import { T as Token } from '../module-Dl1KFVtc.js';
2
- import { D as DBClient } from '../index-BrvvxSpn.js';
2
+ import { D as DBClient } from '../index-V7QRh1wg.js';
3
3
  import '../db/env.js';
4
4
  import '../stack.js';
5
5
  import 'zod';
@@ -4,8 +4,10 @@ import {
4
4
  assertUsableWriteValues,
5
5
  columnExprOf,
6
6
  isColRef,
7
+ isColumnExpr,
8
+ isNowExpr,
7
9
  isSqlFragment
8
- } from "../chunk-GYK6QYS4.js";
10
+ } from "../chunk-JVZQCC77.js";
9
11
  import {
10
12
  __name
11
13
  } from "../chunk-VXPNPVAG.js";
@@ -410,9 +412,25 @@ function cmp(a, b, op) {
410
412
  __name(cmp, "cmp");
411
413
  function matchesCell(caller, table, row, key, cond) {
412
414
  if (isColRef(cond)) return cmp(row[key], row[cond.$col], "eq");
415
+ if (isNowExpr(cond)) return cmp(row[key], (/* @__PURE__ */ new Date()).toISOString(), "eq");
413
416
  if (cond !== null && typeof cond === "object" && !Array.isArray(cond)) {
414
417
  return Object.entries(cond).every(([op, v]) => {
415
418
  const cell = row[key];
419
+ if (isNowExpr(v)) {
420
+ if (![
421
+ "neq",
422
+ "gt",
423
+ "gte",
424
+ "lt",
425
+ "lte"
426
+ ].includes(op)) {
427
+ throw new Error(`${caller}(${table}): where.${key}.${op} now() ile kullan\u0131lamaz`);
428
+ }
429
+ return cmp(cell, (/* @__PURE__ */ new Date()).toISOString(), op);
430
+ }
431
+ if (isColumnExpr(v)) {
432
+ throw new Error(`${caller}(${table}): where.${key}.${op} bir YAZMA ifadesi ald\u0131 (increment/decrement) \u2014 kar\u015F\u0131la\u015Ft\u0131rma de\u011Feri de\u011Fil. Sunucu saati i\xE7in now() kullan\u0131n.`);
433
+ }
416
434
  if (isColRef(v)) {
417
435
  if (![
418
436
  "neq",