@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
@@ -3,10 +3,10 @@ import {
3
3
  BootRefused,
4
4
  createApp,
5
5
  loadConfig
6
- } from "../chunk-OO7R25AI.js";
7
- import "../chunk-I3C4PFIW.js";
8
- import "../chunk-DRZFQRJI.js";
9
- import "../chunk-GYK6QYS4.js";
6
+ } from "../chunk-EB3TUX5J.js";
7
+ import "../chunk-BQN723PL.js";
8
+ import "../chunk-OZKSM3JW.js";
9
+ import "../chunk-JVZQCC77.js";
10
10
  import {
11
11
  getRegisteredControllers
12
12
  } from "../chunk-VVMJEVQP.js";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  qualifiedTableKey,
3
3
  withRetry
4
- } from "./chunk-DRZFQRJI.js";
4
+ } from "./chunk-OZKSM3JW.js";
5
5
  import {
6
6
  TxPlanBuilder,
7
7
  runTxPlan
8
- } from "./chunk-GYK6QYS4.js";
8
+ } from "./chunk-JVZQCC77.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-VXPNPVAG.js";
@@ -927,4 +927,4 @@ export {
927
927
  buildContainer,
928
928
  assertNoOrphanEntryPoints
929
929
  };
930
- //# sourceMappingURL=chunk-I3C4PFIW.js.map
930
+ //# sourceMappingURL=chunk-BQN723PL.js.map
@@ -5,21 +5,23 @@ import {
5
5
  assertNoOrphanEntryPoints,
6
6
  buildContainer,
7
7
  buildRelations
8
- } from "./chunk-I3C4PFIW.js";
8
+ } from "./chunk-BQN723PL.js";
9
9
  import {
10
10
  qualifiedTableKey
11
- } from "./chunk-DRZFQRJI.js";
11
+ } from "./chunk-OZKSM3JW.js";
12
12
  import {
13
13
  assertNoExpressionHandles,
14
14
  assertUsableFilter,
15
15
  assertUsableWriteValues,
16
16
  columnExprOf,
17
17
  isColRef,
18
+ isColumnExpr,
19
+ isNowExpr,
18
20
  isPlanRef,
19
21
  isSqlFragment,
20
22
  looksLikeUnbrandedPlanRef,
21
23
  looksLikeUnbrandedRef
22
- } from "./chunk-GYK6QYS4.js";
24
+ } from "./chunk-JVZQCC77.js";
23
25
  import {
24
26
  getRoutes,
25
27
  resolveEffectiveAuth
@@ -944,6 +946,10 @@ function compileWhereBare(table, colSet, where, add, caller = "search", alias =
944
946
  parts.push(`${q} = ${colRefSql(table, colSet, cond, caller, alias)}`);
945
947
  continue;
946
948
  }
949
+ if (isNowExpr(cond)) {
950
+ parts.push(`${q} = now()`);
951
+ continue;
952
+ }
947
953
  if (cond !== null && typeof cond === "object" && !Array.isArray(cond)) {
948
954
  for (const [op, v] of Object.entries(cond)) {
949
955
  if (op === "contains" || op === "icontains" || op === "startsWith" || op === "endsWith") {
@@ -972,6 +978,13 @@ function compileWhereBare(table, colSet, where, add, caller = "search", alias =
972
978
  continue;
973
979
  }
974
980
  parts.push(`${q} IN (${v.map((x) => bind(x)).join(", ")})`);
981
+ } else if (isNowExpr(v)) {
982
+ if (!(op in WHERE_OPS)) {
983
+ throw new Error(`${caller}(${table}): where.${col}.${op} now() ile kullan\u0131lamaz \u2014 e\u015Fitlik i\xE7in \xE7\u0131plak bi\xE7imi kullan\u0131n: { ${col}: now() }`);
984
+ }
985
+ parts.push(`${q} ${WHERE_OPS[op]} now()`);
986
+ } else if (isColumnExpr(v)) {
987
+ throw new Error(`${caller}(${table}): where.${col}.${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; say\u0131sal bir e\u015Fik i\xE7in de\u011Feri yaz\u0131n.`);
975
988
  } else if (isColRef(v)) {
976
989
  if (!(op in WHERE_OPS)) {
977
990
  throw new Error(`${caller}(${table}): where.${col}.${op} col() ile kullan\u0131lamaz \u2014 e\u015Fitlik i\xE7in \xE7\u0131plak bi\xE7imi kullan\u0131n: { ${col}: col("\u2026") }`);
@@ -979,7 +992,9 @@ function compileWhereBare(table, colSet, where, add, caller = "search", alias =
979
992
  parts.push(`${q} ${WHERE_OPS[op]} ${colRefSql(table, colSet, v, caller, alias)}`);
980
993
  } else if (looksLikeUnbrandedRef(v) !== null) {
981
994
  const kind = looksLikeUnbrandedRef(v);
982
- throw new Error(`${caller}(${table}): where.${col}.${op} bir ${kind === "col" ? "col()" : "sqlFragment"} TAKL\u0130D\u0130 ald\u0131 \u2014 bu nesne bu s\xFCre\xE7te ${kind === "col" ? "col()" : "sqlFragment"} ile \xFCretilmemi\u015F. \u0130stek g\xF6vdesinden gelen bir filtre i\u015Faret\xE7i TA\u015EIYAMAZ; kolon kar\u015F\u0131la\u015Ft\u0131rmas\u0131n\u0131 kendi kodunuzda ${kind === "col" ? 'col("kolon_ad\u0131")' : "sqlFragment`\u2026`"} ile kurun.`);
995
+ const made = kind === "col" ? "col()" : kind === "sql" ? "sqlFragment" : "now()";
996
+ const how = kind === "col" ? 'col("kolon_ad\u0131")' : kind === "sql" ? "sqlFragment`\u2026`" : "now()";
997
+ throw new Error(`${caller}(${table}): where.${col}.${op} bir ${made} TAKL\u0130D\u0130 ald\u0131 \u2014 bu nesne bu s\xFCre\xE7te ${made} ile \xFCretilmemi\u015F. \u0130stek g\xF6vdesinden gelen bir filtre i\u015Faret\xE7i TA\u015EIYAMAZ; ko\u015Fulu kendi kodunuzda ${how} ile kurun.`);
983
998
  } else if (op in WHERE_OPS) {
984
999
  if (v === null && op === "neq") {
985
1000
  parts.push(`${q} IS NOT NULL`);
@@ -3335,4 +3350,4 @@ export {
3335
3350
  installEgressFence,
3336
3351
  createApp
3337
3352
  };
3338
- //# sourceMappingURL=chunk-OO7R25AI.js.map
3353
+ //# sourceMappingURL=chunk-EB3TUX5J.js.map