@nicia-ai/typegraph 0.34.0 → 0.35.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/backend/postgres/index.cjs +29 -29
- package/dist/backend/postgres/index.d.cts +39 -7
- package/dist/backend/postgres/index.d.ts +39 -7
- package/dist/backend/postgres/index.js +16 -16
- package/dist/backend/postgres/pglite.cjs +21 -21
- package/dist/backend/postgres/pglite.d.cts +4 -4
- package/dist/backend/postgres/pglite.d.ts +4 -4
- package/dist/backend/postgres/pglite.js +16 -16
- package/dist/backend/sqlite/index.cjs +25 -26
- package/dist/backend/sqlite/index.d.cts +8 -8
- package/dist/backend/sqlite/index.d.ts +8 -8
- package/dist/backend/sqlite/index.js +13 -14
- package/dist/backend/sqlite/libsql.cjs +19 -19
- package/dist/backend/sqlite/libsql.d.cts +4 -4
- package/dist/backend/sqlite/libsql.d.ts +4 -4
- package/dist/backend/sqlite/libsql.js +15 -15
- package/dist/backend/sqlite/local.cjs +101 -21
- package/dist/backend/sqlite/local.cjs.map +1 -1
- package/dist/backend/sqlite/local.d.cts +95 -5
- package/dist/backend/sqlite/local.d.ts +95 -5
- package/dist/backend/sqlite/local.js +95 -16
- package/dist/backend/sqlite/local.js.map +1 -1
- package/dist/{chunk-ZV5N4DBG.js → chunk-3TWF3SH4.js} +300 -58
- package/dist/chunk-3TWF3SH4.js.map +1 -0
- package/dist/chunk-4JEZZJ6S.cjs +1271 -0
- package/dist/chunk-4JEZZJ6S.cjs.map +1 -0
- package/dist/{chunk-UNNPKQUG.cjs → chunk-4TOD4LBZ.cjs} +246 -155
- package/dist/chunk-4TOD4LBZ.cjs.map +1 -0
- package/dist/{chunk-QV245VMN.js → chunk-55MZDDZV.js} +100 -6
- package/dist/chunk-55MZDDZV.js.map +1 -0
- package/dist/{chunk-GQANNXXT.cjs → chunk-5A6FNS6N.cjs} +75 -20
- package/dist/chunk-5A6FNS6N.cjs.map +1 -0
- package/dist/{chunk-3Z6TW3CT.cjs → chunk-5AQIKK56.cjs} +65 -25
- package/dist/chunk-5AQIKK56.cjs.map +1 -0
- package/dist/{chunk-BVTWD66D.js → chunk-5SEGFTZX.js} +3 -3
- package/dist/{chunk-BVTWD66D.js.map → chunk-5SEGFTZX.js.map} +1 -1
- package/dist/{chunk-6GNSY7AV.js → chunk-6FR2MMS6.js} +7 -7
- package/dist/chunk-6FR2MMS6.js.map +1 -0
- package/dist/chunk-7YSP4V4R.cjs +69 -0
- package/dist/chunk-7YSP4V4R.cjs.map +1 -0
- package/dist/chunk-A42GCBGX.cjs +28 -0
- package/dist/chunk-A42GCBGX.cjs.map +1 -0
- package/dist/{chunk-RHZWOJVA.cjs → chunk-BLZDPRXT.cjs} +52 -4
- package/dist/chunk-BLZDPRXT.cjs.map +1 -0
- package/dist/chunk-BYPOGQWK.js +25 -0
- package/dist/chunk-BYPOGQWK.js.map +1 -0
- package/dist/{chunk-6HVOHZHS.cjs → chunk-CK5BVQOW.cjs} +213 -168
- package/dist/chunk-CK5BVQOW.cjs.map +1 -0
- package/dist/{chunk-JJRCLAUN.cjs → chunk-CTTSDJLY.cjs} +116 -10
- package/dist/chunk-CTTSDJLY.cjs.map +1 -0
- package/dist/chunk-CUHM5CWJ.cjs +12 -0
- package/dist/chunk-CUHM5CWJ.cjs.map +1 -0
- package/dist/{chunk-A7SZZFAG.js → chunk-CZQ3FO2Q.js} +409 -99
- package/dist/chunk-CZQ3FO2Q.js.map +1 -0
- package/dist/{chunk-2JXB3NYJ.cjs → chunk-D7ZEOS56.cjs} +25 -32
- package/dist/chunk-D7ZEOS56.cjs.map +1 -0
- package/dist/chunk-DFVLCOP6.js +10 -0
- package/dist/chunk-DFVLCOP6.js.map +1 -0
- package/dist/{chunk-UJLOZYKT.cjs → chunk-EM3CWPND.cjs} +441 -115
- package/dist/chunk-EM3CWPND.cjs.map +1 -0
- package/dist/chunk-EMF62TZG.cjs +1176 -0
- package/dist/chunk-EMF62TZG.cjs.map +1 -0
- package/dist/chunk-EOLERH7Y.cjs +40 -0
- package/dist/chunk-EOLERH7Y.cjs.map +1 -0
- package/dist/{chunk-TGJE22RM.cjs → chunk-FACJJWGF.cjs} +24 -6
- package/dist/chunk-FACJJWGF.cjs.map +1 -0
- package/dist/{chunk-HK5SATYM.cjs → chunk-FL472AMI.cjs} +16 -109
- package/dist/chunk-FL472AMI.cjs.map +1 -0
- package/dist/{chunk-WVC2Q2FD.cjs → chunk-FN35DLCN.cjs} +31 -9
- package/dist/chunk-FN35DLCN.cjs.map +1 -0
- package/dist/{chunk-KUTNI6SI.js → chunk-FPIZFYHE.js} +10 -18
- package/dist/chunk-FPIZFYHE.js.map +1 -0
- package/dist/{chunk-VCGO4V26.js → chunk-FRV5Q5IO.js} +64 -9
- package/dist/chunk-FRV5Q5IO.js.map +1 -0
- package/dist/{chunk-K5P5OZXS.js → chunk-G6Q5UM7U.js} +2 -2
- package/dist/{chunk-K5P5OZXS.js.map → chunk-G6Q5UM7U.js.map} +1 -1
- package/dist/chunk-GSQ6NPH6.cjs +100 -0
- package/dist/chunk-GSQ6NPH6.cjs.map +1 -0
- package/dist/chunk-GUR2FNB5.cjs +12 -0
- package/dist/{chunk-HMFK4BXR.cjs.map → chunk-GUR2FNB5.cjs.map} +1 -1
- package/dist/{chunk-JQGIPGVL.cjs → chunk-H7YNSMA7.cjs} +43 -2
- package/dist/chunk-H7YNSMA7.cjs.map +1 -0
- package/dist/{chunk-2MRAX3UE.js → chunk-I7ZUZKFD.js} +47 -4
- package/dist/chunk-I7ZUZKFD.js.map +1 -0
- package/dist/{chunk-3BRVBQQD.cjs → chunk-J7WFGBJR.cjs} +2445 -2367
- package/dist/chunk-J7WFGBJR.cjs.map +1 -0
- package/dist/{chunk-V3QNTB7Z.js → chunk-JBTOYDMN.js} +194 -114
- package/dist/chunk-JBTOYDMN.js.map +1 -0
- package/dist/{chunk-K2TGS3EN.js → chunk-K3PPLHY7.js} +138 -89
- package/dist/chunk-K3PPLHY7.js.map +1 -0
- package/dist/{chunk-Z5XBMDXU.js → chunk-KBGQIPRQ.js} +42 -3
- package/dist/chunk-KBGQIPRQ.js.map +1 -0
- package/dist/chunk-KMI7LYAF.js +1252 -0
- package/dist/chunk-KMI7LYAF.js.map +1 -0
- package/dist/{chunk-JIEJCTDS.cjs → chunk-LGEALRC6.cjs} +21 -4
- package/dist/chunk-LGEALRC6.cjs.map +1 -0
- package/dist/{chunk-TQOYM4LN.js → chunk-MP2JQKSG.js} +21 -5
- package/dist/chunk-MP2JQKSG.js.map +1 -0
- package/dist/{chunk-ZP5WHI4C.cjs → chunk-O7UN7OXA.cjs} +358 -116
- package/dist/chunk-O7UN7OXA.cjs.map +1 -0
- package/dist/chunk-OHMP6N2J.js +47 -0
- package/dist/chunk-OHMP6N2J.js.map +1 -0
- package/dist/{chunk-4DIBPQNJ.js → chunk-OR5ZA5WP.js} +135 -25
- package/dist/chunk-OR5ZA5WP.js.map +1 -0
- package/dist/{chunk-DEQFL35G.js → chunk-Q5TEXCTB.js} +61 -7
- package/dist/chunk-Q5TEXCTB.js.map +1 -0
- package/dist/chunk-QNKSQTKQ.js +1312 -0
- package/dist/chunk-QNKSQTKQ.js.map +1 -0
- package/dist/{chunk-ZURTTSCM.js → chunk-QOTI55H7.js} +6 -94
- package/dist/chunk-QOTI55H7.js.map +1 -0
- package/dist/{chunk-CHXTTSC6.js → chunk-QWEUYILR.js} +104 -5
- package/dist/chunk-QWEUYILR.js.map +1 -0
- package/dist/{chunk-LANHCOXB.js → chunk-RGP33ZJ5.js} +485 -83
- package/dist/chunk-RGP33ZJ5.js.map +1 -0
- package/dist/chunk-RGPG7EOJ.js +94 -0
- package/dist/chunk-RGPG7EOJ.js.map +1 -0
- package/dist/{chunk-G6SOJEDI.cjs → chunk-S55OV6PW.cjs} +15 -15
- package/dist/chunk-S55OV6PW.cjs.map +1 -0
- package/dist/{chunk-3E7SNSIA.cjs → chunk-SJDMVITW.cjs} +4 -4
- package/dist/{chunk-3E7SNSIA.cjs.map → chunk-SJDMVITW.cjs.map} +1 -1
- package/dist/{chunk-XLUNB2TZ.js → chunk-SNXVDZAJ.js} +3 -3
- package/dist/{chunk-XLUNB2TZ.js.map → chunk-SNXVDZAJ.js.map} +1 -1
- package/dist/{chunk-RBV7YCQD.js → chunk-T2WUSPDA.js} +49 -9
- package/dist/chunk-T2WUSPDA.js.map +1 -0
- package/dist/{chunk-KGC4LY5T.cjs → chunk-TCOCYN2P.cjs} +75 -21
- package/dist/chunk-TCOCYN2P.cjs.map +1 -0
- package/dist/{chunk-FLRCVI2G.cjs → chunk-TDXIBCGY.cjs} +2 -2
- package/dist/{chunk-FLRCVI2G.cjs.map → chunk-TDXIBCGY.cjs.map} +1 -1
- package/dist/{chunk-ZY4GXIVN.cjs → chunk-TEDRJXOG.cjs} +5 -5
- package/dist/{chunk-ZY4GXIVN.cjs.map → chunk-TEDRJXOG.cjs.map} +1 -1
- package/dist/{chunk-WLRIWYHQ.js → chunk-UES55P7G.js} +1863 -1785
- package/dist/chunk-UES55P7G.js.map +1 -0
- package/dist/{chunk-WL2SG7ZV.cjs → chunk-UMDVATGY.cjs} +6 -6
- package/dist/{chunk-WL2SG7ZV.cjs.map → chunk-UMDVATGY.cjs.map} +1 -1
- package/dist/chunk-UT3S4SEN.js +31 -0
- package/dist/chunk-UT3S4SEN.js.map +1 -0
- package/dist/{chunk-RRKQAKD6.cjs → chunk-UUT7UN2N.cjs} +149 -39
- package/dist/chunk-UUT7UN2N.cjs.map +1 -0
- package/dist/{chunk-SHLY4MCM.js → chunk-UZV3AZKF.js} +21 -3
- package/dist/chunk-UZV3AZKF.js.map +1 -0
- package/dist/{chunk-CYX2JTDG.js → chunk-VHMPG6UL.js} +29 -7
- package/dist/chunk-VHMPG6UL.js.map +1 -0
- package/dist/{chunk-T6SPUYLX.cjs → chunk-VPYHY3LJ.cjs} +116 -10
- package/dist/chunk-VPYHY3LJ.cjs.map +1 -0
- package/dist/{chunk-T46GR2VY.js → chunk-VSPCZAXF.js} +3 -3
- package/dist/{chunk-T46GR2VY.js.map → chunk-VSPCZAXF.js.map} +1 -1
- package/dist/{chunk-K34OPSJK.js → chunk-W63OVYY4.js} +3 -3
- package/dist/{chunk-K34OPSJK.js.map → chunk-W63OVYY4.js.map} +1 -1
- package/dist/{chunk-RY2VIWAM.js → chunk-WDBCBWC4.js} +355 -32
- package/dist/chunk-WDBCBWC4.js.map +1 -0
- package/dist/chunk-WJT7OU7E.cjs +1334 -0
- package/dist/chunk-WJT7OU7E.cjs.map +1 -0
- package/dist/{chunk-5IQIX7LU.cjs → chunk-XOX22WHL.cjs} +476 -163
- package/dist/chunk-XOX22WHL.cjs.map +1 -0
- package/dist/{ddl-BrmPg61z.d.ts → ddl-C2rZ-Aen.d.ts} +4 -4
- package/dist/{ddl-j1-sH6lE.d.cts → ddl-CZz7a0E8.d.cts} +4 -4
- package/dist/{extension-types-YGFJPrzK.d.cts → extension-types-ixRpJVUp.d.cts} +24 -1
- package/dist/{extension-types-YGFJPrzK.d.ts → extension-types-ixRpJVUp.d.ts} +24 -1
- package/dist/{types-DkNnF-7K.d.cts → fulltext-strategy-B57yvC5Q.d.ts} +2562 -2133
- package/dist/{types-D1Sqeyxy.d.ts → fulltext-strategy-CDkSSYhq.d.cts} +2562 -2133
- package/dist/graph-extension/index.cjs +20 -19
- package/dist/graph-extension/index.d.cts +4 -4
- package/dist/graph-extension/index.d.ts +4 -4
- package/dist/graph-extension/index.js +5 -4
- package/dist/graph-merge/index.cjs +255 -164
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +63 -33
- package/dist/graph-merge/index.d.ts +63 -33
- package/dist/graph-merge/index.js +135 -44
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/{index-DGX6D9j1.d.ts → index-6CSUAq-x.d.ts} +234 -93
- package/dist/{index-SEvUHDA6.d.cts → index-Bks_3HHK.d.cts} +234 -93
- package/dist/index.cjs +208 -188
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +33 -33
- package/dist/indexes/index.cjs +19 -20
- package/dist/indexes/index.d.cts +5 -5
- package/dist/indexes/index.d.ts +5 -5
- package/dist/indexes/index.js +10 -11
- package/dist/interchange/index.cjs +47 -26
- package/dist/interchange/index.d.cts +126 -12
- package/dist/interchange/index.d.ts +126 -12
- package/dist/interchange/index.js +14 -13
- package/dist/{manager-ms9cKdc6.d.cts → manager-DwQi8eV0.d.cts} +9 -2
- package/dist/{manager-BZUeN_BU.d.ts → manager-ejUCB52T.d.ts} +9 -2
- package/dist/{materialize-indexes-D20xNluI.d.cts → materialize-indexes-B4e9360H.d.cts} +20 -4
- package/dist/{materialize-indexes-CAkIYFV-.d.ts → materialize-indexes-te9TPMMJ.d.ts} +20 -4
- package/dist/{postgres-BhpxGMC5.d.cts → postgres-CfEqsRMp.d.cts} +152 -1
- package/dist/{postgres-CWHLwNl1.d.ts → postgres-DQ5R6rzV.d.ts} +152 -1
- package/dist/profiler/index.cjs +11 -11
- package/dist/profiler/index.d.cts +7 -7
- package/dist/profiler/index.d.ts +7 -7
- package/dist/profiler/index.js +4 -4
- package/dist/provenance/index.cjs +40 -41
- package/dist/provenance/index.cjs.map +1 -1
- package/dist/provenance/index.d.cts +5 -5
- package/dist/provenance/index.d.ts +5 -5
- package/dist/provenance/index.js +11 -12
- package/dist/provenance/index.js.map +1 -1
- package/dist/schema/index.cjs +53 -40
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +57 -57
- package/dist/schema/index.d.ts +57 -57
- package/dist/schema/index.js +28 -15
- package/dist/schema/index.js.map +1 -1
- package/dist/{sqlite-XrDxNaa7.d.cts → sqlite-D7zBinNR.d.cts} +92 -1
- package/dist/{sqlite-CGu5SLsw.d.ts → sqlite-DvQndLky.d.ts} +92 -1
- package/dist/{store-view-D09po4H6.d.cts → store-view-BSpqvAxK.d.cts} +415 -44
- package/dist/{store-view-BlgnhEYf.d.ts → store-view-CKbHFRnn.d.ts} +415 -44
- package/dist/{types-DiE1AO7p.d.cts → types-Bv9DcS_E.d.cts} +2 -2
- package/dist/{types-B1TbZJYS.d.ts → types-CoxuV7EJ.d.ts} +2 -2
- package/dist/{where-DKjuofPr.d.cts → where-7RKFOsXt.d.ts} +2 -2
- package/dist/{where-DrUIIWHb.d.ts → where-DdMIXOtH.d.cts} +2 -2
- package/package.json +14 -13
- package/dist/chunk-2EBMPJBO.js +0 -16
- package/dist/chunk-2EBMPJBO.js.map +0 -1
- package/dist/chunk-2JXB3NYJ.cjs.map +0 -1
- package/dist/chunk-2MRAX3UE.js.map +0 -1
- package/dist/chunk-3BRVBQQD.cjs.map +0 -1
- package/dist/chunk-3EUKJEQ3.js +0 -77
- package/dist/chunk-3EUKJEQ3.js.map +0 -1
- package/dist/chunk-3Z6TW3CT.cjs.map +0 -1
- package/dist/chunk-4DIBPQNJ.js.map +0 -1
- package/dist/chunk-4S2FXGBJ.js +0 -9
- package/dist/chunk-4S2FXGBJ.js.map +0 -1
- package/dist/chunk-5IQIX7LU.cjs.map +0 -1
- package/dist/chunk-6GNSY7AV.js.map +0 -1
- package/dist/chunk-6HVOHZHS.cjs.map +0 -1
- package/dist/chunk-6SCVW4AS.js +0 -20
- package/dist/chunk-6SCVW4AS.js.map +0 -1
- package/dist/chunk-A7SZZFAG.js.map +0 -1
- package/dist/chunk-CHXTTSC6.js.map +0 -1
- package/dist/chunk-CYX2JTDG.js.map +0 -1
- package/dist/chunk-DEQFL35G.js.map +0 -1
- package/dist/chunk-G6SOJEDI.cjs.map +0 -1
- package/dist/chunk-GQANNXXT.cjs.map +0 -1
- package/dist/chunk-GZCNZ7QW.js +0 -24
- package/dist/chunk-GZCNZ7QW.js.map +0 -1
- package/dist/chunk-HK5SATYM.cjs.map +0 -1
- package/dist/chunk-HMFK4BXR.cjs +0 -12
- package/dist/chunk-HTGDWIDE.cjs +0 -89
- package/dist/chunk-HTGDWIDE.cjs.map +0 -1
- package/dist/chunk-JIEJCTDS.cjs.map +0 -1
- package/dist/chunk-JJRCLAUN.cjs.map +0 -1
- package/dist/chunk-JQGIPGVL.cjs.map +0 -1
- package/dist/chunk-K2TGS3EN.js.map +0 -1
- package/dist/chunk-KGC4LY5T.cjs.map +0 -1
- package/dist/chunk-KNHYNQQ3.cjs +0 -663
- package/dist/chunk-KNHYNQQ3.cjs.map +0 -1
- package/dist/chunk-KUTNI6SI.js.map +0 -1
- package/dist/chunk-LANHCOXB.js.map +0 -1
- package/dist/chunk-N6WTUSBV.cjs +0 -23
- package/dist/chunk-N6WTUSBV.cjs.map +0 -1
- package/dist/chunk-NAUA4PW5.cjs +0 -28
- package/dist/chunk-NAUA4PW5.cjs.map +0 -1
- package/dist/chunk-QV245VMN.js.map +0 -1
- package/dist/chunk-RBV7YCQD.js.map +0 -1
- package/dist/chunk-RHZWOJVA.cjs.map +0 -1
- package/dist/chunk-RRKQAKD6.cjs.map +0 -1
- package/dist/chunk-RY2VIWAM.js.map +0 -1
- package/dist/chunk-SHLY4MCM.js.map +0 -1
- package/dist/chunk-T2DWPQNE.js +0 -649
- package/dist/chunk-T2DWPQNE.js.map +0 -1
- package/dist/chunk-T6SPUYLX.cjs.map +0 -1
- package/dist/chunk-TGJE22RM.cjs.map +0 -1
- package/dist/chunk-TOTPVGOG.cjs +0 -774
- package/dist/chunk-TOTPVGOG.cjs.map +0 -1
- package/dist/chunk-TQOYM4LN.js.map +0 -1
- package/dist/chunk-UJLOZYKT.cjs.map +0 -1
- package/dist/chunk-UNNPKQUG.cjs.map +0 -1
- package/dist/chunk-V3QNTB7Z.js.map +0 -1
- package/dist/chunk-VCGO4V26.js.map +0 -1
- package/dist/chunk-WLRIWYHQ.js.map +0 -1
- package/dist/chunk-WVC2Q2FD.cjs.map +0 -1
- package/dist/chunk-XXVEULWX.js +0 -39
- package/dist/chunk-XXVEULWX.js.map +0 -1
- package/dist/chunk-YAZE7QZR.cjs +0 -32
- package/dist/chunk-YAZE7QZR.cjs.map +0 -1
- package/dist/chunk-YC6PWTHY.cjs +0 -44
- package/dist/chunk-YC6PWTHY.cjs.map +0 -1
- package/dist/chunk-Z5HBYM7U.cjs +0 -11
- package/dist/chunk-Z5HBYM7U.cjs.map +0 -1
- package/dist/chunk-Z5XBMDXU.js.map +0 -1
- package/dist/chunk-ZP5WHI4C.cjs.map +0 -1
- package/dist/chunk-ZURTTSCM.js.map +0 -1
- package/dist/chunk-ZV5N4DBG.js.map +0 -1
|
@@ -1,9 +1,186 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { nowIso } from './chunk-I7ZUZKFD.js';
|
|
2
|
+
import { likeEscapeClause, LIKE_ESCAPE_CHARACTER } from './chunk-OHMP6N2J.js';
|
|
3
|
+
import { resolveFieldTypeInfoAtJsonPointer } from './chunk-SNXVDZAJ.js';
|
|
4
|
+
import { ConfigurationError, UnsupportedPredicateError, CompilerInvariantError } from './chunk-MP2JQKSG.js';
|
|
5
|
+
import { normalizeJsonPointer, joinJsonPointers, jsonPointer } from './chunk-G6Q5UM7U.js';
|
|
5
6
|
import { sql } from 'drizzle-orm';
|
|
6
7
|
|
|
8
|
+
// src/backend/types.ts
|
|
9
|
+
function rowPropsToObject(props) {
|
|
10
|
+
return typeof props === "string" ? JSON.parse(props) : props;
|
|
11
|
+
}
|
|
12
|
+
function rowPropsToJsonText(props) {
|
|
13
|
+
return typeof props === "string" ? props : JSON.stringify(props);
|
|
14
|
+
}
|
|
15
|
+
function isLiveNodeRow(row) {
|
|
16
|
+
return row.deleted_at === void 0;
|
|
17
|
+
}
|
|
18
|
+
function isTombstonedNodeRow(row) {
|
|
19
|
+
return row.deleted_at !== void 0;
|
|
20
|
+
}
|
|
21
|
+
function createBackendOverlay(target, overlay) {
|
|
22
|
+
const boundTargetMethods = /* @__PURE__ */ new Map();
|
|
23
|
+
function hasOverlayProperty(property) {
|
|
24
|
+
return Object.hasOwn(overlay, property);
|
|
25
|
+
}
|
|
26
|
+
function targetValue(targetObject, property) {
|
|
27
|
+
const value = Reflect.get(targetObject, property, targetObject);
|
|
28
|
+
if (typeof value !== "function") return value;
|
|
29
|
+
const cached = boundTargetMethods.get(property);
|
|
30
|
+
if (cached !== void 0) return cached;
|
|
31
|
+
const method = value;
|
|
32
|
+
const bound = method.bind(targetObject);
|
|
33
|
+
boundTargetMethods.set(property, bound);
|
|
34
|
+
return bound;
|
|
35
|
+
}
|
|
36
|
+
return new Proxy(target, {
|
|
37
|
+
get(targetObject, property) {
|
|
38
|
+
if (hasOverlayProperty(property)) {
|
|
39
|
+
return Reflect.get(overlay, property, overlay);
|
|
40
|
+
}
|
|
41
|
+
return targetValue(targetObject, property);
|
|
42
|
+
},
|
|
43
|
+
has(targetObject, property) {
|
|
44
|
+
return hasOverlayProperty(property) || Reflect.has(targetObject, property);
|
|
45
|
+
},
|
|
46
|
+
ownKeys(targetObject) {
|
|
47
|
+
return [
|
|
48
|
+
.../* @__PURE__ */ new Set([
|
|
49
|
+
...Reflect.ownKeys(targetObject),
|
|
50
|
+
...Reflect.ownKeys(overlay)
|
|
51
|
+
])
|
|
52
|
+
];
|
|
53
|
+
},
|
|
54
|
+
getOwnPropertyDescriptor(targetObject, property) {
|
|
55
|
+
if (hasOverlayProperty(property)) {
|
|
56
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(overlay, property);
|
|
57
|
+
if (descriptor === void 0) return;
|
|
58
|
+
return { ...descriptor, configurable: true };
|
|
59
|
+
}
|
|
60
|
+
return Reflect.getOwnPropertyDescriptor(targetObject, property);
|
|
61
|
+
},
|
|
62
|
+
set(targetObject, property, value) {
|
|
63
|
+
if (hasOverlayProperty(property)) {
|
|
64
|
+
return Reflect.set(overlay, property, value, overlay);
|
|
65
|
+
}
|
|
66
|
+
return Reflect.set(targetObject, property, value, targetObject);
|
|
67
|
+
},
|
|
68
|
+
defineProperty(targetObject, property, attributes) {
|
|
69
|
+
if (hasOverlayProperty(property)) {
|
|
70
|
+
return Reflect.defineProperty(overlay, property, attributes);
|
|
71
|
+
}
|
|
72
|
+
return Reflect.defineProperty(targetObject, property, attributes);
|
|
73
|
+
},
|
|
74
|
+
deleteProperty(targetObject, property) {
|
|
75
|
+
if (hasOverlayProperty(property)) {
|
|
76
|
+
return Reflect.deleteProperty(overlay, property);
|
|
77
|
+
}
|
|
78
|
+
return Reflect.deleteProperty(targetObject, property);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function wrapWithManagedClose(backend, teardown) {
|
|
83
|
+
let isClosed = false;
|
|
84
|
+
return createBackendOverlay(backend, {
|
|
85
|
+
async close() {
|
|
86
|
+
if (isClosed) return;
|
|
87
|
+
isClosed = true;
|
|
88
|
+
await backend.close();
|
|
89
|
+
await teardown();
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
async function runOptionallyInTransaction(backend, fn, fallback) {
|
|
94
|
+
if ("transaction" in backend && backend.capabilities.transactions) {
|
|
95
|
+
return backend.transaction((tx) => fn(tx));
|
|
96
|
+
}
|
|
97
|
+
return fn(fallback ?? backend);
|
|
98
|
+
}
|
|
99
|
+
var SQLITE_MAX_BIND_PARAMETERS = 999;
|
|
100
|
+
var MODERN_SQLITE_MAX_BIND_PARAMETERS = 32766;
|
|
101
|
+
var D1_MAX_BIND_PARAMETERS = 100;
|
|
102
|
+
var POSTGRES_MAX_BIND_PARAMETERS = 65535;
|
|
103
|
+
var SQLITE_CAPABILITIES = {
|
|
104
|
+
transactions: true,
|
|
105
|
+
// SQLite supports transactions
|
|
106
|
+
windowFunctions: true,
|
|
107
|
+
// SQLite has supported window functions since 3.25.0
|
|
108
|
+
returning: true,
|
|
109
|
+
// SQLite has supported RETURNING since 3.35.0
|
|
110
|
+
maxBindParameters: SQLITE_MAX_BIND_PARAMETERS
|
|
111
|
+
};
|
|
112
|
+
var POSTGRES_CAPABILITIES = {
|
|
113
|
+
transactions: true,
|
|
114
|
+
// PostgreSQL supports transactions
|
|
115
|
+
windowFunctions: true,
|
|
116
|
+
// PostgreSQL supports ROW_NUMBER() and related windows
|
|
117
|
+
returning: true,
|
|
118
|
+
// PostgreSQL has supported RETURNING since 8.2
|
|
119
|
+
maxBindParameters: POSTGRES_MAX_BIND_PARAMETERS
|
|
120
|
+
};
|
|
121
|
+
var pinnedReadInstant;
|
|
122
|
+
function withPinnedReadInstant(emit) {
|
|
123
|
+
if (pinnedReadInstant !== void 0) return emit();
|
|
124
|
+
pinnedReadInstant = nowIso();
|
|
125
|
+
try {
|
|
126
|
+
return emit();
|
|
127
|
+
} finally {
|
|
128
|
+
pinnedReadInstant = void 0;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
function currentReadInstant() {
|
|
132
|
+
return sql`${pinnedReadInstant ?? nowIso()}`;
|
|
133
|
+
}
|
|
134
|
+
var CURRENT_READ_INSTANT_PLACEHOLDER = "__typegraph_current_read_instant__";
|
|
135
|
+
function currentReadInstantPlaceholder() {
|
|
136
|
+
return sql`${sql.placeholder(CURRENT_READ_INSTANT_PLACEHOLDER)}`;
|
|
137
|
+
}
|
|
138
|
+
function currentReadInstantFor(mode) {
|
|
139
|
+
return mode === "placeholder" ? currentReadInstantPlaceholder() : currentReadInstant();
|
|
140
|
+
}
|
|
141
|
+
function compileTemporalFilter(options) {
|
|
142
|
+
const { mode, asOf, tableAlias, currentTimestamp, recordedAsOf } = options;
|
|
143
|
+
const prefix = tableAlias ? sql.raw(`${tableAlias}.`) : sql.raw("");
|
|
144
|
+
const deletedAt = sql`${prefix}deleted_at`;
|
|
145
|
+
const validFrom = sql`${prefix}valid_from`;
|
|
146
|
+
const validTo = sql`${prefix}valid_to`;
|
|
147
|
+
const validFilter = (() => {
|
|
148
|
+
switch (mode) {
|
|
149
|
+
case "current": {
|
|
150
|
+
const now = recordedAsOf === void 0 ? currentTimestamp ?? currentReadInstant() : sql`${recordedAsOf}`;
|
|
151
|
+
return sql`${deletedAt} IS NULL AND (${validFrom} IS NULL OR ${validFrom} <= ${now}) AND (${validTo} IS NULL OR ${validTo} > ${now})`;
|
|
152
|
+
}
|
|
153
|
+
case "asOf": {
|
|
154
|
+
if (asOf === void 0) {
|
|
155
|
+
throw new Error(
|
|
156
|
+
`asOf timestamp is required for temporal mode "asOf"`
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
const timestamp = asOf;
|
|
160
|
+
return sql`${deletedAt} IS NULL AND (${validFrom} IS NULL OR ${validFrom} <= ${timestamp}) AND (${validTo} IS NULL OR ${validTo} > ${timestamp})`;
|
|
161
|
+
}
|
|
162
|
+
case "includeEnded": {
|
|
163
|
+
return sql`${deletedAt} IS NULL`;
|
|
164
|
+
}
|
|
165
|
+
case "includeTombstones": {
|
|
166
|
+
return sql.raw("1=1");
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
})();
|
|
170
|
+
if (recordedAsOf === void 0) return validFilter;
|
|
171
|
+
const recordedFrom = sql`${prefix}recorded_from`;
|
|
172
|
+
const recordedTo = sql`${prefix}recorded_to`;
|
|
173
|
+
return sql`(${validFilter}) AND ${recordedFrom} <= ${recordedAsOf} AND ${recordedAsOf} < ${recordedTo}`;
|
|
174
|
+
}
|
|
175
|
+
function extractTemporalOptions(ast, tableAlias) {
|
|
176
|
+
return {
|
|
177
|
+
mode: ast.temporalMode.mode,
|
|
178
|
+
asOf: ast.temporalMode.asOf,
|
|
179
|
+
recordedAsOf: ast.recordedAsOf,
|
|
180
|
+
tableAlias
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
|
|
7
184
|
// src/query/subquery-utils.ts
|
|
8
185
|
function normalizeValueType(valueType) {
|
|
9
186
|
if (valueType === void 0 || valueType === "unknown") {
|
|
@@ -80,6 +257,12 @@ function predicate(expr) {
|
|
|
80
257
|
};
|
|
81
258
|
}
|
|
82
259
|
function param(name) {
|
|
260
|
+
if (name === CURRENT_READ_INSTANT_PLACEHOLDER) {
|
|
261
|
+
throw new ConfigurationError(
|
|
262
|
+
`Parameter name "${name}" is reserved for internal use`,
|
|
263
|
+
{ parameterName: name }
|
|
264
|
+
);
|
|
265
|
+
}
|
|
83
266
|
return { __type: "parameter", name };
|
|
84
267
|
}
|
|
85
268
|
function isParameterRef(value) {
|
|
@@ -312,7 +495,10 @@ function vectorSimilarity(field, queryEmbedding, limit, options) {
|
|
|
312
495
|
// here would mis-rank l2/inner_product fields and bypass their ANN index.
|
|
313
496
|
...options?.metric !== void 0 && { metric: options.metric },
|
|
314
497
|
limit,
|
|
315
|
-
...options?.minScore !== void 0 && { minScore: options.minScore }
|
|
498
|
+
...options?.minScore !== void 0 && { minScore: options.minScore },
|
|
499
|
+
...options?.approximate !== void 0 && {
|
|
500
|
+
approximate: options.approximate
|
|
501
|
+
}
|
|
316
502
|
};
|
|
317
503
|
return predicate(expr);
|
|
318
504
|
}
|
|
@@ -539,112 +725,6 @@ function assertCompatibleSubqueryValueTypes(field, subquery) {
|
|
|
539
725
|
}
|
|
540
726
|
);
|
|
541
727
|
}
|
|
542
|
-
|
|
543
|
-
// src/backend/types.ts
|
|
544
|
-
function isLiveNodeRow(row) {
|
|
545
|
-
return row.deleted_at === void 0;
|
|
546
|
-
}
|
|
547
|
-
function isTombstonedNodeRow(row) {
|
|
548
|
-
return row.deleted_at !== void 0;
|
|
549
|
-
}
|
|
550
|
-
function createBackendOverlay(target, overlay) {
|
|
551
|
-
const boundTargetMethods = /* @__PURE__ */ new Map();
|
|
552
|
-
function hasOverlayProperty(property) {
|
|
553
|
-
return Object.hasOwn(overlay, property);
|
|
554
|
-
}
|
|
555
|
-
function targetValue(targetObject, property) {
|
|
556
|
-
const value = Reflect.get(targetObject, property, targetObject);
|
|
557
|
-
if (typeof value !== "function") return value;
|
|
558
|
-
const cached = boundTargetMethods.get(property);
|
|
559
|
-
if (cached !== void 0) return cached;
|
|
560
|
-
const method = value;
|
|
561
|
-
const bound = method.bind(targetObject);
|
|
562
|
-
boundTargetMethods.set(property, bound);
|
|
563
|
-
return bound;
|
|
564
|
-
}
|
|
565
|
-
return new Proxy(target, {
|
|
566
|
-
get(targetObject, property) {
|
|
567
|
-
if (hasOverlayProperty(property)) {
|
|
568
|
-
return Reflect.get(overlay, property, overlay);
|
|
569
|
-
}
|
|
570
|
-
return targetValue(targetObject, property);
|
|
571
|
-
},
|
|
572
|
-
has(targetObject, property) {
|
|
573
|
-
return hasOverlayProperty(property) || Reflect.has(targetObject, property);
|
|
574
|
-
},
|
|
575
|
-
ownKeys(targetObject) {
|
|
576
|
-
return [
|
|
577
|
-
.../* @__PURE__ */ new Set([
|
|
578
|
-
...Reflect.ownKeys(targetObject),
|
|
579
|
-
...Reflect.ownKeys(overlay)
|
|
580
|
-
])
|
|
581
|
-
];
|
|
582
|
-
},
|
|
583
|
-
getOwnPropertyDescriptor(targetObject, property) {
|
|
584
|
-
if (hasOverlayProperty(property)) {
|
|
585
|
-
const descriptor = Reflect.getOwnPropertyDescriptor(overlay, property);
|
|
586
|
-
if (descriptor === void 0) return;
|
|
587
|
-
return { ...descriptor, configurable: true };
|
|
588
|
-
}
|
|
589
|
-
return Reflect.getOwnPropertyDescriptor(targetObject, property);
|
|
590
|
-
},
|
|
591
|
-
set(targetObject, property, value) {
|
|
592
|
-
if (hasOverlayProperty(property)) {
|
|
593
|
-
return Reflect.set(overlay, property, value, overlay);
|
|
594
|
-
}
|
|
595
|
-
return Reflect.set(targetObject, property, value, targetObject);
|
|
596
|
-
},
|
|
597
|
-
defineProperty(targetObject, property, attributes) {
|
|
598
|
-
if (hasOverlayProperty(property)) {
|
|
599
|
-
return Reflect.defineProperty(overlay, property, attributes);
|
|
600
|
-
}
|
|
601
|
-
return Reflect.defineProperty(targetObject, property, attributes);
|
|
602
|
-
},
|
|
603
|
-
deleteProperty(targetObject, property) {
|
|
604
|
-
if (hasOverlayProperty(property)) {
|
|
605
|
-
return Reflect.deleteProperty(overlay, property);
|
|
606
|
-
}
|
|
607
|
-
return Reflect.deleteProperty(targetObject, property);
|
|
608
|
-
}
|
|
609
|
-
});
|
|
610
|
-
}
|
|
611
|
-
function wrapWithManagedClose(backend, teardown) {
|
|
612
|
-
let isClosed = false;
|
|
613
|
-
return createBackendOverlay(backend, {
|
|
614
|
-
async close() {
|
|
615
|
-
if (isClosed) return;
|
|
616
|
-
isClosed = true;
|
|
617
|
-
await backend.close();
|
|
618
|
-
await teardown();
|
|
619
|
-
}
|
|
620
|
-
});
|
|
621
|
-
}
|
|
622
|
-
async function runOptionallyInTransaction(backend, fn, fallback) {
|
|
623
|
-
if ("transaction" in backend && backend.capabilities.transactions) {
|
|
624
|
-
return backend.transaction((tx) => fn(tx));
|
|
625
|
-
}
|
|
626
|
-
return fn(fallback ?? backend);
|
|
627
|
-
}
|
|
628
|
-
var SQLITE_MAX_BIND_PARAMETERS = 999;
|
|
629
|
-
var POSTGRES_MAX_BIND_PARAMETERS = 65535;
|
|
630
|
-
var SQLITE_CAPABILITIES = {
|
|
631
|
-
transactions: true,
|
|
632
|
-
// SQLite supports transactions
|
|
633
|
-
windowFunctions: true,
|
|
634
|
-
// SQLite has supported window functions since 3.25.0
|
|
635
|
-
returning: true,
|
|
636
|
-
// SQLite has supported RETURNING since 3.35.0
|
|
637
|
-
maxBindParameters: SQLITE_MAX_BIND_PARAMETERS
|
|
638
|
-
};
|
|
639
|
-
var POSTGRES_CAPABILITIES = {
|
|
640
|
-
transactions: true,
|
|
641
|
-
// PostgreSQL supports transactions
|
|
642
|
-
windowFunctions: true,
|
|
643
|
-
// PostgreSQL supports ROW_NUMBER() and related windows
|
|
644
|
-
returning: true,
|
|
645
|
-
// PostgreSQL has supported RETURNING since 8.2
|
|
646
|
-
maxBindParameters: POSTGRES_MAX_BIND_PARAMETERS
|
|
647
|
-
};
|
|
648
728
|
var COMPARISON_OP_SQL = {
|
|
649
729
|
eq: "=",
|
|
650
730
|
neq: "!=",
|
|
@@ -1346,6 +1426,6 @@ function isPresent(value) {
|
|
|
1346
1426
|
return value !== null && value !== void 0;
|
|
1347
1427
|
}
|
|
1348
1428
|
|
|
1349
|
-
export { POSTGRES_CAPABILITIES, POSTGRES_MAX_BIND_PARAMETERS, SQLITE_CAPABILITIES, SQLITE_MAX_BIND_PARAMETERS, arrayField, baseField, buildFieldBuilderForTypeInfo, buildPredicateIndex, chunk, compileFieldValue, compileKindFilter, compilePredicateClauses, compilePredicateExpression, createBackendOverlay, createFulltextAccessor, dateField, exists, extractFulltextMatchPredicates, extractVectorSimilarityPredicates, fieldRef, getHybridTargetAlias, getNodeKindsForAlias, getPredicatesForAlias, groupBy, inSubquery, isLiveNodeRow, isParameterRef, isPresent, isTombstonedNodeRow, notExists, notInSubquery, numberField, objectField, param, runOptionallyInTransaction, sqlValueList, stringField, wrapWithManagedClose };
|
|
1350
|
-
//# sourceMappingURL=chunk-
|
|
1351
|
-
//# sourceMappingURL=chunk-
|
|
1429
|
+
export { CURRENT_READ_INSTANT_PLACEHOLDER, D1_MAX_BIND_PARAMETERS, MODERN_SQLITE_MAX_BIND_PARAMETERS, POSTGRES_CAPABILITIES, POSTGRES_MAX_BIND_PARAMETERS, SQLITE_CAPABILITIES, SQLITE_MAX_BIND_PARAMETERS, arrayField, baseField, buildFieldBuilderForTypeInfo, buildPredicateIndex, chunk, compileFieldValue, compileKindFilter, compilePredicateClauses, compilePredicateExpression, compileTemporalFilter, createBackendOverlay, createFulltextAccessor, currentReadInstant, currentReadInstantFor, dateField, exists, extractFulltextMatchPredicates, extractTemporalOptions, extractVectorSimilarityPredicates, fieldRef, getFieldPointer, getHybridTargetAlias, getNodeKindsForAlias, getPredicatesForAlias, groupBy, inSubquery, isLiveNodeRow, isParameterRef, isPresent, isTombstonedNodeRow, notExists, notInSubquery, numberField, objectField, param, rowPropsToJsonText, rowPropsToObject, runOptionallyInTransaction, sqlValueList, stringField, withPinnedReadInstant, wrapWithManagedClose };
|
|
1430
|
+
//# sourceMappingURL=chunk-JBTOYDMN.js.map
|
|
1431
|
+
//# sourceMappingURL=chunk-JBTOYDMN.js.map
|