@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.
- package/dist/bin/palbase-backend.cjs +32 -1
- package/dist/bin/palbase-backend.cjs.map +1 -1
- package/dist/bin/palbase-backend.js +4 -4
- package/dist/{chunk-I3C4PFIW.js → chunk-BQN723PL.js} +3 -3
- package/dist/{chunk-OO7R25AI.js → chunk-EB3TUX5J.js} +20 -5
- package/dist/chunk-EB3TUX5J.js.map +1 -0
- package/dist/{chunk-GYK6QYS4.js → chunk-JVZQCC77.js} +21 -1
- package/dist/chunk-JVZQCC77.js.map +1 -0
- package/dist/{chunk-DRZFQRJI.js → chunk-OZKSM3JW.js} +2 -2
- package/dist/chunk-OZKSM3JW.js.map +1 -0
- package/dist/{chunk-TS4U7NBD.js → chunk-XABHGMUT.js} +2 -2
- package/dist/db/index.cjs +26 -0
- package/dist/db/index.cjs.map +1 -1
- package/dist/db/index.d.cts +1 -1
- package/dist/db/index.d.ts +1 -1
- package/dist/db/index.js +3 -3
- package/dist/engine/index.cjs +32 -1
- package/dist/engine/index.cjs.map +1 -1
- package/dist/engine/index.d.cts +3 -3
- package/dist/engine/index.d.ts +3 -3
- package/dist/engine/index.js +4 -4
- package/dist/{index-NuzRCuxe.d.ts → index-CAKOgAlP.d.ts} +2 -2
- package/dist/{index-Bve7BBTL.d.cts → index-CgE4sVhg.d.cts} +32 -12
- package/dist/{index-VtToZmUm.d.cts → index-H-0qv5d4.d.cts} +2 -2
- package/dist/{index-BrvvxSpn.d.ts → index-V7QRh1wg.d.ts} +32 -12
- package/dist/index.cjs +26 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +4 -4
- package/dist/openapi/index.d.cts +2 -2
- package/dist/openapi/index.d.ts +2 -2
- package/dist/{registry-B0eyOF9x.d.ts → registry-4EI8aaFs.d.ts} +1 -1
- package/dist/{registry-Bk9_rbNd.d.cts → registry-DHsPDY0_.d.cts} +1 -1
- package/dist/test/index.cjs +27 -0
- package/dist/test/index.cjs.map +1 -1
- package/dist/test/index.d.cts +1 -1
- package/dist/test/index.d.ts +1 -1
- package/dist/test/index.js +19 -1
- package/dist/test/index.js.map +1 -1
- package/docs/database.md +35 -1
- package/docs/llms-full.txt +35 -1
- package/package.json +1 -1
- package/dist/chunk-DRZFQRJI.js.map +0 -1
- package/dist/chunk-GYK6QYS4.js.map +0 -1
- package/dist/chunk-OO7R25AI.js.map +0 -1
- /package/dist/{chunk-I3C4PFIW.js.map → chunk-BQN723PL.js.map} +0 -0
- /package/dist/{chunk-TS4U7NBD.js.map → chunk-XABHGMUT.js.map} +0 -0
package/dist/test/index.d.cts
CHANGED
package/dist/test/index.d.ts
CHANGED
package/dist/test/index.js
CHANGED
|
@@ -4,8 +4,10 @@ import {
|
|
|
4
4
|
assertUsableWriteValues,
|
|
5
5
|
columnExprOf,
|
|
6
6
|
isColRef,
|
|
7
|
+
isColumnExpr,
|
|
8
|
+
isNowExpr,
|
|
7
9
|
isSqlFragment
|
|
8
|
-
} from "../chunk-
|
|
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",
|