@nicia-ai/typegraph 0.50.0 → 0.51.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/README.md +12 -0
- package/dist/backend/drizzle/indexes.cjs +10 -8
- package/dist/backend/drizzle/indexes.d.cts +1 -1
- package/dist/backend/drizzle/indexes.d.ts +1 -1
- package/dist/backend/drizzle/indexes.js +6 -4
- package/dist/backend/index.cjs +183 -50
- package/dist/backend/index.d.cts +90 -4
- package/dist/backend/index.d.ts +90 -4
- package/dist/backend/index.js +6 -9
- package/dist/backend/postgres/index.cjs +30 -28
- package/dist/backend/postgres/index.d.cts +7 -7
- package/dist/backend/postgres/index.d.ts +7 -7
- package/dist/backend/postgres/index.js +16 -14
- package/dist/backend/postgres/pglite-store.cjs +6 -62
- package/dist/backend/postgres/pglite-store.cjs.map +1 -1
- package/dist/backend/postgres/pglite-store.d.cts +8 -8
- package/dist/backend/postgres/pglite-store.d.ts +8 -8
- package/dist/backend/postgres/pglite-store.js +6 -62
- package/dist/backend/postgres/pglite-store.js.map +1 -1
- package/dist/backend/postgres/pglite.cjs +18 -16
- package/dist/backend/postgres/pglite.d.cts +3 -3
- package/dist/backend/postgres/pglite.d.ts +3 -3
- package/dist/backend/postgres/pglite.js +17 -15
- package/dist/backend/sqlite/index.cjs +27 -25
- package/dist/backend/sqlite/index.d.cts +7 -7
- package/dist/backend/sqlite/index.d.ts +7 -7
- package/dist/backend/sqlite/index.js +14 -12
- package/dist/backend/sqlite/libsql.cjs +21 -19
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +3 -3
- package/dist/backend/sqlite/libsql.d.ts +3 -3
- package/dist/backend/sqlite/libsql.js +16 -14
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +8 -64
- package/dist/backend/sqlite/local-store.cjs.map +1 -1
- package/dist/backend/sqlite/local-store.d.cts +8 -8
- package/dist/backend/sqlite/local-store.d.ts +8 -8
- package/dist/backend/sqlite/local-store.js +7 -64
- package/dist/backend/sqlite/local-store.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +22 -19
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +18 -15
- package/dist/{chunk-TUVD4DFR.cjs → chunk-2CVDZCXH.cjs} +122 -51
- package/dist/chunk-2CVDZCXH.cjs.map +1 -0
- package/dist/{chunk-I5C6OTKR.js → chunk-2DWTBNSH.js} +3 -3
- package/dist/{chunk-I5C6OTKR.js.map → chunk-2DWTBNSH.js.map} +1 -1
- package/dist/{chunk-C76WFIVZ.cjs → chunk-2KCTP3U2.cjs} +180 -127
- package/dist/chunk-2KCTP3U2.cjs.map +1 -0
- package/dist/{chunk-BYBDM423.cjs → chunk-322TBTOQ.cjs} +48 -48
- package/dist/{chunk-BYBDM423.cjs.map → chunk-322TBTOQ.cjs.map} +1 -1
- package/dist/chunk-36SX6QXP.cjs +186 -0
- package/dist/chunk-36SX6QXP.cjs.map +1 -0
- package/dist/{chunk-H3XP6BAV.js → chunk-36VYWVQU.js} +3 -3
- package/dist/{chunk-H3XP6BAV.js.map → chunk-36VYWVQU.js.map} +1 -1
- package/dist/{chunk-VTJVMP4I.js → chunk-4DKY6RIU.js} +102 -31
- package/dist/chunk-4DKY6RIU.js.map +1 -0
- package/dist/chunk-4QKOZYMV.js +9 -0
- package/dist/chunk-4QKOZYMV.js.map +1 -0
- package/dist/{chunk-U3Z7XKAG.js → chunk-57JM6NW3.js} +8 -18
- package/dist/chunk-57JM6NW3.js.map +1 -0
- package/dist/{chunk-WCLMKNQE.cjs → chunk-5FVZSE3B.cjs} +1356 -1108
- package/dist/chunk-5FVZSE3B.cjs.map +1 -0
- package/dist/{chunk-XMY2SXOH.cjs → chunk-5WWEYV4H.cjs} +2208 -579
- package/dist/chunk-5WWEYV4H.cjs.map +1 -0
- package/dist/{chunk-WQBAQZHR.js → chunk-6NLYIMJO.js} +4 -4
- package/dist/{chunk-WQBAQZHR.js.map → chunk-6NLYIMJO.js.map} +1 -1
- package/dist/{chunk-G2TLHH6T.cjs → chunk-7B7I7YAW.cjs} +6 -6
- package/dist/{chunk-G2TLHH6T.cjs.map → chunk-7B7I7YAW.cjs.map} +1 -1
- package/dist/{chunk-EDLKIQRI.js → chunk-7G5IYROL.js} +6 -548
- package/dist/chunk-7G5IYROL.js.map +1 -0
- package/dist/{chunk-46UGOVRW.js → chunk-7QFRK6PU.js} +3 -7
- package/dist/chunk-7QFRK6PU.js.map +1 -0
- package/dist/chunk-A4C4NJ5U.cjs +12 -0
- package/dist/chunk-A4C4NJ5U.cjs.map +1 -0
- package/dist/{chunk-7CCMCMJO.cjs → chunk-AOGOC6JF.cjs} +77 -68
- package/dist/chunk-AOGOC6JF.cjs.map +1 -0
- package/dist/{chunk-TYGGUWMS.cjs → chunk-B3MN7EJR.cjs} +177 -137
- package/dist/chunk-B3MN7EJR.cjs.map +1 -0
- package/dist/{chunk-K6VKTBST.cjs → chunk-BZ5MVITP.cjs} +4 -4
- package/dist/{chunk-K6VKTBST.cjs.map → chunk-BZ5MVITP.cjs.map} +1 -1
- package/dist/{chunk-ZAQUKCUC.js → chunk-CBOD7TXH.js} +5 -5
- package/dist/{chunk-ZAQUKCUC.js.map → chunk-CBOD7TXH.js.map} +1 -1
- package/dist/{chunk-LLVOQOWE.cjs → chunk-CRZ56SZU.cjs} +6 -5
- package/dist/chunk-CRZ56SZU.cjs.map +1 -0
- package/dist/{chunk-ON47CBE4.cjs → chunk-D3GWARN7.cjs} +47 -47
- package/dist/{chunk-ON47CBE4.cjs.map → chunk-D3GWARN7.cjs.map} +1 -1
- package/dist/{chunk-W5SOCUBL.js → chunk-D3OUDFU7.js} +5 -5
- package/dist/{chunk-W5SOCUBL.js.map → chunk-D3OUDFU7.js.map} +1 -1
- package/dist/chunk-EKG2UXNX.cjs +23 -0
- package/dist/chunk-EKG2UXNX.cjs.map +1 -0
- package/dist/{chunk-2Q45FAIE.js → chunk-EVYW3532.js} +28 -19
- package/dist/chunk-EVYW3532.js.map +1 -0
- package/dist/{chunk-7PRMDZIA.cjs → chunk-FMMW3KX7.cjs} +21 -55
- package/dist/chunk-FMMW3KX7.cjs.map +1 -0
- package/dist/chunk-H2VWDQWC.cjs +571 -0
- package/dist/chunk-H2VWDQWC.cjs.map +1 -0
- package/dist/chunk-H4FY6OZK.js +13 -0
- package/dist/chunk-H4FY6OZK.js.map +1 -0
- package/dist/{chunk-OJHD3LXJ.cjs → chunk-H5IJSROF.cjs} +2 -8
- package/dist/chunk-H5IJSROF.cjs.map +1 -0
- package/dist/{chunk-U5EL6JUV.js → chunk-I5IOSA27.js} +101 -103
- package/dist/chunk-I5IOSA27.js.map +1 -0
- package/dist/{chunk-SHC7BCG5.cjs → chunk-I7YAY2VQ.cjs} +7 -7
- package/dist/{chunk-SHC7BCG5.cjs.map → chunk-I7YAY2VQ.cjs.map} +1 -1
- package/dist/chunk-IRCWIA3R.js +20 -0
- package/dist/chunk-IRCWIA3R.js.map +1 -0
- package/dist/chunk-IVQBLXBK.cjs +55 -0
- package/dist/chunk-IVQBLXBK.cjs.map +1 -0
- package/dist/{chunk-5PP4KRPV.js → chunk-IZD4HTCP.js} +5 -5
- package/dist/{chunk-5PP4KRPV.js.map → chunk-IZD4HTCP.js.map} +1 -1
- package/dist/{chunk-RDP6ZRSM.cjs → chunk-JQKMEKKW.cjs} +261 -204
- package/dist/chunk-JQKMEKKW.cjs.map +1 -0
- package/dist/chunk-JVA3KDEA.cjs +691 -0
- package/dist/chunk-JVA3KDEA.cjs.map +1 -0
- package/dist/{chunk-JG5XIJDY.js → chunk-K67P5DLL.js} +62 -22
- package/dist/chunk-K67P5DLL.js.map +1 -0
- package/dist/{chunk-MX7EKQPM.js → chunk-K6OZIHKI.js} +345 -97
- package/dist/chunk-K6OZIHKI.js.map +1 -0
- package/dist/{chunk-CS6JTQQ2.cjs → chunk-KACEYDYV.cjs} +94 -62
- package/dist/chunk-KACEYDYV.cjs.map +1 -0
- package/dist/{chunk-5OWHU7Z7.cjs → chunk-L6EVYIID.cjs} +248 -210
- package/dist/chunk-L6EVYIID.cjs.map +1 -0
- package/dist/{chunk-7OWE7WD6.js → chunk-LI4K2KEJ.js} +4 -4
- package/dist/{chunk-7OWE7WD6.js.map → chunk-LI4K2KEJ.js.map} +1 -1
- package/dist/chunk-LKZDQ2B4.js +1581 -0
- package/dist/chunk-LKZDQ2B4.js.map +1 -0
- package/dist/{chunk-45YZXI6X.cjs → chunk-LLFPQOBA.cjs} +27 -27
- package/dist/{chunk-45YZXI6X.cjs.map → chunk-LLFPQOBA.cjs.map} +1 -1
- package/dist/{chunk-ZRJTM7MT.js → chunk-LZMQ3SFK.js} +3 -3
- package/dist/{chunk-ZRJTM7MT.js.map → chunk-LZMQ3SFK.js.map} +1 -1
- package/dist/{chunk-DI6VC62F.js → chunk-M3VTS3F6.js} +3 -3
- package/dist/{chunk-DI6VC62F.js.map → chunk-M3VTS3F6.js.map} +1 -1
- package/dist/{chunk-MZ34E2GN.js → chunk-NBOS7BY3.js} +60 -21
- package/dist/chunk-NBOS7BY3.js.map +1 -0
- package/dist/{chunk-YA36ABIL.js → chunk-NGQDGL5X.js} +14 -48
- package/dist/chunk-NGQDGL5X.js.map +1 -0
- package/dist/{chunk-ZBFZGLZE.cjs → chunk-NLX5OWK7.cjs} +6 -2
- package/dist/chunk-NLX5OWK7.cjs.map +1 -0
- package/dist/chunk-NUQ2YFFH.cjs +1637 -0
- package/dist/chunk-NUQ2YFFH.cjs.map +1 -0
- package/dist/{chunk-TTCOPKUL.cjs → chunk-OGL4X4PH.cjs} +182 -184
- package/dist/chunk-OGL4X4PH.cjs.map +1 -0
- package/dist/{chunk-HY5BNOUN.cjs → chunk-OTNTGEXR.cjs} +4 -4
- package/dist/{chunk-HY5BNOUN.cjs.map → chunk-OTNTGEXR.cjs.map} +1 -1
- package/dist/chunk-OTWE63BW.js +53 -0
- package/dist/chunk-OTWE63BW.js.map +1 -0
- package/dist/chunk-PC5NGH5A.js +549 -0
- package/dist/chunk-PC5NGH5A.js.map +1 -0
- package/dist/{chunk-IPRP6TDL.cjs → chunk-PS3TUWJM.cjs} +7 -7
- package/dist/{chunk-IPRP6TDL.cjs.map → chunk-PS3TUWJM.cjs.map} +1 -1
- package/dist/{chunk-V76FGHY3.js → chunk-PVFFH7TL.js} +5 -5
- package/dist/{chunk-V76FGHY3.js.map → chunk-PVFFH7TL.js.map} +1 -1
- package/dist/chunk-QCD5JKU4.cjs +15 -0
- package/dist/chunk-QCD5JKU4.cjs.map +1 -0
- package/dist/{chunk-IRPYOHRC.js → chunk-QG5VEOKX.js} +6 -2
- package/dist/chunk-QG5VEOKX.js.map +1 -0
- package/dist/{chunk-2CYI5HRH.js → chunk-RI7RJH4G.js} +49 -17
- package/dist/chunk-RI7RJH4G.js.map +1 -0
- package/dist/{chunk-5LKOVCPP.js → chunk-RVUL2HXY.js} +6 -5
- package/dist/chunk-RVUL2HXY.js.map +1 -0
- package/dist/{chunk-WK23PGTP.cjs → chunk-S5GU4LUN.cjs} +11 -11
- package/dist/{chunk-WK23PGTP.cjs.map → chunk-S5GU4LUN.cjs.map} +1 -1
- package/dist/{chunk-S33YQEL7.js → chunk-SDPWO2Z5.js} +6 -6
- package/dist/{chunk-S33YQEL7.js.map → chunk-SDPWO2Z5.js.map} +1 -1
- package/dist/{chunk-6S3PTHL4.js → chunk-SLGGT2XD.js} +3 -3
- package/dist/{chunk-6S3PTHL4.js.map → chunk-SLGGT2XD.js.map} +1 -1
- package/dist/{chunk-HSEZ7X6Y.cjs → chunk-TIJUA4I6.cjs} +45 -45
- package/dist/{chunk-HSEZ7X6Y.cjs.map → chunk-TIJUA4I6.cjs.map} +1 -1
- package/dist/{chunk-CSNOYIB4.cjs → chunk-TM54OBHX.cjs} +13 -13
- package/dist/{chunk-CSNOYIB4.cjs.map → chunk-TM54OBHX.cjs.map} +1 -1
- package/dist/{chunk-MM3JHVKZ.cjs → chunk-TUWSVL6I.cjs} +4 -4
- package/dist/{chunk-MM3JHVKZ.cjs.map → chunk-TUWSVL6I.cjs.map} +1 -1
- package/dist/{chunk-2GIV5X4P.js → chunk-TYEYRCXL.js} +86 -33
- package/dist/chunk-TYEYRCXL.js.map +1 -0
- package/dist/{chunk-MJPZNEJZ.js → chunk-UKOVGCRN.js} +2095 -496
- package/dist/chunk-UKOVGCRN.js.map +1 -0
- package/dist/chunk-UYKDYE5D.cjs +12 -0
- package/dist/{chunk-KWNWG4RC.cjs.map → chunk-UYKDYE5D.cjs.map} +1 -1
- package/dist/{chunk-FX5ZW6PN.js → chunk-VAAC7L57.js} +95 -40
- package/dist/chunk-VAAC7L57.js.map +1 -0
- package/dist/{chunk-ISKCIQF2.cjs → chunk-VKHXYVN7.cjs} +14 -25
- package/dist/chunk-VKHXYVN7.cjs.map +1 -0
- package/dist/chunk-VUQZNUHU.js +171 -0
- package/dist/chunk-VUQZNUHU.js.map +1 -0
- package/dist/{chunk-K2XYLVVB.cjs → chunk-WDM5WQK4.cjs} +175 -136
- package/dist/chunk-WDM5WQK4.cjs.map +1 -0
- package/dist/{chunk-GVYVGGPJ.js → chunk-WFSYYU4W.js} +66 -28
- package/dist/chunk-WFSYYU4W.js.map +1 -0
- package/dist/{chunk-R7MRFE5P.js → chunk-WS5MT2UJ.js} +3 -3
- package/dist/{chunk-R7MRFE5P.js.map → chunk-WS5MT2UJ.js.map} +1 -1
- package/dist/chunk-XORONCV3.js +202 -0
- package/dist/chunk-XORONCV3.js.map +1 -0
- package/dist/chunk-ZGVTNKTX.cjs +217 -0
- package/dist/chunk-ZGVTNKTX.cjs.map +1 -0
- package/dist/core/index.cjs +20 -20
- package/dist/core/index.d.cts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +4 -4
- package/dist/{ddl-B49O7dB_.d.ts → ddl-BvcbgzHo.d.ts} +3 -3
- package/dist/{ddl-DcZG660s.d.cts → ddl-Ufebz5q5.d.cts} +3 -3
- package/dist/graph-extension/index.d.cts +2 -4
- package/dist/graph-extension/index.d.ts +2 -4
- package/dist/graph-merge/index.cjs +140 -125
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +8 -9
- package/dist/graph-merge/index.d.ts +8 -9
- package/dist/graph-merge/index.js +42 -27
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/index.cjs +144 -143
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -12
- package/dist/index.d.ts +11 -12
- package/dist/index.js +30 -29
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +14 -12
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/indexes/index.js +7 -5
- package/dist/{ingestion-import-target-CI8OWIkM.d.ts → ingestion-import-target-CAs1OX-l.d.cts} +1 -1
- package/dist/{ingestion-import-target-DCpfM1PX.d.cts → ingestion-import-target-DCQSPfNx.d.ts} +1 -1
- package/dist/interchange/index.cjs +41 -39
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +8 -8
- package/dist/interchange/index.d.ts +8 -8
- package/dist/interchange/index.js +16 -14
- package/dist/interchange/index.js.map +1 -1
- package/dist/local-store-impl-JC7OBRAW.js +75 -0
- package/dist/local-store-impl-JC7OBRAW.js.map +1 -0
- package/dist/local-store-impl-UOS2LUIG.cjs +77 -0
- package/dist/local-store-impl-UOS2LUIG.cjs.map +1 -0
- package/dist/{manager-Cfg1ENj1.d.ts → manager-B68OrPR2.d.ts} +1 -2
- package/dist/{manager-D348fa6W.d.cts → manager-D_t7oK69.d.cts} +1 -2
- package/dist/pglite-store-impl-J5J5AA52.cjs +75 -0
- package/dist/pglite-store-impl-J5J5AA52.cjs.map +1 -0
- package/dist/pglite-store-impl-LDRH2DUH.js +73 -0
- package/dist/pglite-store-impl-LDRH2DUH.js.map +1 -0
- package/dist/{postgres-UStOycLI.d.ts → postgres-BPLSVyHM.d.ts} +1 -1
- package/dist/{postgres-CH1kkM5J.d.cts → postgres-CqvtFC2y.d.cts} +1 -1
- package/dist/profiler/index.d.cts +9 -9
- package/dist/profiler/index.d.ts +9 -9
- package/dist/provenance/index.cjs +33 -20
- package/dist/provenance/index.cjs.map +1 -1
- package/dist/provenance/index.d.cts +7 -7
- package/dist/provenance/index.d.ts +7 -7
- package/dist/provenance/index.js +24 -11
- package/dist/provenance/index.js.map +1 -1
- package/dist/{repair-validity-windows-aWX7VNvv.d.cts → repair-validity-windows-DEzCKAdy.d.cts} +7 -3
- package/dist/{repair-validity-windows-BtOEe2pS.d.ts → repair-validity-windows-GMdaS2AH.d.ts} +7 -3
- package/dist/resolve-D_H8MHtq.d.ts +1805 -0
- package/dist/resolve-WEW8gWws.d.cts +1805 -0
- package/dist/schema/index.cjs +42 -40
- package/dist/schema/index.d.cts +4 -6
- package/dist/schema/index.d.ts +4 -6
- package/dist/schema/index.js +15 -13
- package/dist/{searchable-z4BiFfHI.d.ts → searchable-C_UREI9K.d.ts} +1 -1
- package/dist/{searchable-C8-RrL3l.d.cts → searchable-ClgET_i7.d.cts} +1 -1
- package/dist/{sqlite-axLw5Lo5.d.ts → sqlite-D1mXO9Kp.d.cts} +2 -1
- package/dist/{sqlite-Cyx9j9o6.d.cts → sqlite-MZA3oZNB.d.ts} +2 -1
- package/dist/{store-CTfQ9taw.d.ts → store-CuFX7fCx.d.cts} +38 -41
- package/dist/{store-DR9J7JVB.d.cts → store-D-ZjXQpW.d.ts} +38 -41
- package/dist/{temporal-CBOrERz5.d.ts → temporal-CpyEiRY8.d.cts} +1 -1
- package/dist/{temporal-B4Ky4wzh.d.cts → temporal-y0Aep9Su.d.ts} +1 -1
- package/dist/{types-CWg4dTjj.d.ts → types-6yf0Vv-_.d.cts} +1672 -1
- package/dist/{types-CWg4dTjj.d.cts → types-6yf0Vv-_.d.ts} +1672 -1
- package/dist/{types-BScHXVM7.d.ts → types-DzJ4dlzk.d.cts} +1 -1
- package/dist/{types-BE921wRl.d.cts → types-_vVSB9k-.d.ts} +1 -1
- package/dist/{where-BWXUPV3C.d.ts → where-DuG2LCLe.d.ts} +1 -1
- package/dist/{where-CNtx1aLc.d.cts → where-Mhf_yyKX.d.cts} +1 -1
- package/package.json +5 -1
- package/dist/chunk-2CYI5HRH.js.map +0 -1
- package/dist/chunk-2GIV5X4P.js.map +0 -1
- package/dist/chunk-2Q45FAIE.js.map +0 -1
- package/dist/chunk-46UGOVRW.js.map +0 -1
- package/dist/chunk-5LKOVCPP.js.map +0 -1
- package/dist/chunk-5OWHU7Z7.cjs.map +0 -1
- package/dist/chunk-6LEOAIIB.js +0 -1160
- package/dist/chunk-6LEOAIIB.js.map +0 -1
- package/dist/chunk-7CCMCMJO.cjs.map +0 -1
- package/dist/chunk-7PRMDZIA.cjs.map +0 -1
- package/dist/chunk-C76WFIVZ.cjs.map +0 -1
- package/dist/chunk-CS6JTQQ2.cjs.map +0 -1
- package/dist/chunk-EDLKIQRI.js.map +0 -1
- package/dist/chunk-EH3JZJUM.cjs +0 -567
- package/dist/chunk-EH3JZJUM.cjs.map +0 -1
- package/dist/chunk-FX5ZW6PN.js.map +0 -1
- package/dist/chunk-GHZPZNFC.cjs +0 -132
- package/dist/chunk-GHZPZNFC.cjs.map +0 -1
- package/dist/chunk-GVYVGGPJ.js.map +0 -1
- package/dist/chunk-IHK5KA2Q.cjs +0 -262
- package/dist/chunk-IHK5KA2Q.cjs.map +0 -1
- package/dist/chunk-IRPYOHRC.js.map +0 -1
- package/dist/chunk-ISKCIQF2.cjs.map +0 -1
- package/dist/chunk-JG5XIJDY.js.map +0 -1
- package/dist/chunk-K2XYLVVB.cjs.map +0 -1
- package/dist/chunk-KWNWG4RC.cjs +0 -12
- package/dist/chunk-LLVOQOWE.cjs.map +0 -1
- package/dist/chunk-MJPZNEJZ.js.map +0 -1
- package/dist/chunk-MX7EKQPM.js.map +0 -1
- package/dist/chunk-MZ34E2GN.js.map +0 -1
- package/dist/chunk-OJHD3LXJ.cjs.map +0 -1
- package/dist/chunk-PALYTHGM.js +0 -114
- package/dist/chunk-PALYTHGM.js.map +0 -1
- package/dist/chunk-RDP6ZRSM.cjs.map +0 -1
- package/dist/chunk-S3SDEQMC.js +0 -532
- package/dist/chunk-S3SDEQMC.js.map +0 -1
- package/dist/chunk-TEC24ZDA.cjs +0 -1254
- package/dist/chunk-TEC24ZDA.cjs.map +0 -1
- package/dist/chunk-TP4NJTI3.cjs +0 -1192
- package/dist/chunk-TP4NJTI3.cjs.map +0 -1
- package/dist/chunk-TTCOPKUL.cjs.map +0 -1
- package/dist/chunk-TUVD4DFR.cjs.map +0 -1
- package/dist/chunk-TYGGUWMS.cjs.map +0 -1
- package/dist/chunk-U3Z7XKAG.js.map +0 -1
- package/dist/chunk-U5EL6JUV.js.map +0 -1
- package/dist/chunk-VTJVMP4I.js.map +0 -1
- package/dist/chunk-WCLMKNQE.cjs.map +0 -1
- package/dist/chunk-XMY2SXOH.cjs.map +0 -1
- package/dist/chunk-Y55DLLEG.js +0 -247
- package/dist/chunk-Y55DLLEG.js.map +0 -1
- package/dist/chunk-YA36ABIL.js.map +0 -1
- package/dist/chunk-ZBFZGLZE.cjs.map +0 -1
- package/dist/index-B0PrmE3K.d.cts +0 -1146
- package/dist/index-CwcXsL5R.d.ts +0 -1146
- package/dist/materialize-indexes-C9GG3O3C.d.ts +0 -266
- package/dist/materialize-indexes-CrSiW_lT.d.cts +0 -266
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var chunkOJHD3LXJ_cjs = require('./chunk-OJHD3LXJ.cjs');
|
|
3
|
+
var chunk5WWEYV4H_cjs = require('./chunk-5WWEYV4H.cjs');
|
|
4
|
+
var chunkLLFPQOBA_cjs = require('./chunk-LLFPQOBA.cjs');
|
|
5
|
+
var chunkTIJUA4I6_cjs = require('./chunk-TIJUA4I6.cjs');
|
|
6
|
+
var chunk36SX6QXP_cjs = require('./chunk-36SX6QXP.cjs');
|
|
7
|
+
var chunkNLX5OWK7_cjs = require('./chunk-NLX5OWK7.cjs');
|
|
8
|
+
var chunkNUQ2YFFH_cjs = require('./chunk-NUQ2YFFH.cjs');
|
|
9
|
+
var chunkH2VWDQWC_cjs = require('./chunk-H2VWDQWC.cjs');
|
|
10
|
+
var chunkH5IJSROF_cjs = require('./chunk-H5IJSROF.cjs');
|
|
12
11
|
var chunkX4GDXBOP_cjs = require('./chunk-X4GDXBOP.cjs');
|
|
13
12
|
var chunkN66HCGCY_cjs = require('./chunk-N66HCGCY.cjs');
|
|
14
13
|
var drizzleOrm = require('drizzle-orm');
|
|
@@ -53,7 +52,7 @@ var DEFAULT_POSTGRES_STATEMENT_CACHE_MAX = 256;
|
|
|
53
52
|
var STATEMENT_NAME_CACHE = /* @__PURE__ */ new Map();
|
|
54
53
|
var nextStatementId = 0;
|
|
55
54
|
function statementNameFor(sqlText, cacheMax) {
|
|
56
|
-
return
|
|
55
|
+
return chunk5WWEYV4H_cjs.getOrCreateLru(STATEMENT_NAME_CACHE, sqlText, cacheMax, () => {
|
|
57
56
|
const name = `tg_${nextStatementId}`;
|
|
58
57
|
nextStatementId += 1;
|
|
59
58
|
return name;
|
|
@@ -167,7 +166,7 @@ function createPostgresExecutionAdapter(db, options = {}) {
|
|
|
167
166
|
options.useTransactionClient ?? false
|
|
168
167
|
);
|
|
169
168
|
function compile(query) {
|
|
170
|
-
return
|
|
169
|
+
return chunkLLFPQOBA_cjs.compileQueryWithDialect(db, query, "PostgreSQL");
|
|
171
170
|
}
|
|
172
171
|
function assertCompiledWithinBindParameterLimit(compiledQuery) {
|
|
173
172
|
assertWithinBindParameterLimit(
|
|
@@ -182,7 +181,7 @@ function createPostgresExecutionAdapter(db, options = {}) {
|
|
|
182
181
|
assertCompiledWithinBindParameterLimit(compile(query));
|
|
183
182
|
return executeDrizzleQuery(
|
|
184
183
|
db,
|
|
185
|
-
|
|
184
|
+
chunkH5IJSROF_cjs.isSqlFragment(query) ? chunkLLFPQOBA_cjs.toDrizzleSql(query, "postgres") : query
|
|
186
185
|
);
|
|
187
186
|
}
|
|
188
187
|
};
|
|
@@ -201,7 +200,7 @@ function createPostgresExecutionAdapter(db, options = {}) {
|
|
|
201
200
|
async execute(query) {
|
|
202
201
|
const compiled = compile(query);
|
|
203
202
|
assertCompiledWithinBindParameterLimit(compiled);
|
|
204
|
-
if (
|
|
203
|
+
if (chunkH5IJSROF_cjs.isSqlFragment(query) && chunkH5IJSROF_cjs.shouldForceCustomPlan(query)) {
|
|
205
204
|
const result = await pgQueryClient.queryUnnamed(
|
|
206
205
|
compiled.sql,
|
|
207
206
|
compiled.params
|
|
@@ -310,11 +309,11 @@ function computePostgresBatchChunkSizes(maxBindParameters) {
|
|
|
310
309
|
),
|
|
311
310
|
embeddingUpsertBatchSize: Math.max(
|
|
312
311
|
1,
|
|
313
|
-
Math.floor(maxBindParameters /
|
|
312
|
+
Math.floor(maxBindParameters / chunk5WWEYV4H_cjs.EMBEDDING_UPSERT_PARAM_COUNT)
|
|
314
313
|
),
|
|
315
314
|
findEdgesEndpointChunkSize: Math.max(
|
|
316
315
|
1,
|
|
317
|
-
maxBindParameters -
|
|
316
|
+
maxBindParameters - chunk5WWEYV4H_cjs.FIND_EDGES_ENDPOINT_FIXED_PARAM_COUNT
|
|
318
317
|
),
|
|
319
318
|
fulltextDeleteChunkSize: Math.max(
|
|
320
319
|
1,
|
|
@@ -352,11 +351,16 @@ var IDENTITY_TABLE_LOGICAL_NAMES = /* @__PURE__ */ new Set([
|
|
|
352
351
|
"identityClosure",
|
|
353
352
|
"identitySeparation"
|
|
354
353
|
]);
|
|
354
|
+
var RECORDED_TABLE_LOGICAL_NAMES = /* @__PURE__ */ new Set([
|
|
355
|
+
"recordedNodes",
|
|
356
|
+
"recordedEdges",
|
|
357
|
+
"recordedClock"
|
|
358
|
+
]);
|
|
355
359
|
async function withConcurrentCreateRetry(run) {
|
|
356
360
|
try {
|
|
357
361
|
return await run();
|
|
358
362
|
} catch (error) {
|
|
359
|
-
if (!
|
|
363
|
+
if (!chunkNLX5OWK7_cjs.isPostgresConcurrentDdlRaceError(error)) throw error;
|
|
360
364
|
return await run();
|
|
361
365
|
}
|
|
362
366
|
}
|
|
@@ -397,7 +401,7 @@ function reportParallelWorkerResetFailure(tableName, resetError) {
|
|
|
397
401
|
async function resetVectorParallelWorkers(execute, tableName) {
|
|
398
402
|
try {
|
|
399
403
|
await execute(
|
|
400
|
-
|
|
404
|
+
chunkH5IJSROF_cjs.sql`ALTER TABLE ${chunkH5IJSROF_cjs.sql.identifier(tableName)} RESET (parallel_workers)`
|
|
401
405
|
);
|
|
402
406
|
} catch (resetError) {
|
|
403
407
|
throw parallelWorkerResetError(tableName, resetError);
|
|
@@ -408,7 +412,7 @@ async function runVectorIndexBuildWithSerialFallback(execute, tableName, indexSt
|
|
|
408
412
|
try {
|
|
409
413
|
await execute(indexStatement);
|
|
410
414
|
} catch (error) {
|
|
411
|
-
if (!
|
|
415
|
+
if (!chunkNLX5OWK7_cjs.isInsufficientResourcesError(error)) throw error;
|
|
412
416
|
if (dropStatement !== void 0) {
|
|
413
417
|
try {
|
|
414
418
|
await execute(dropStatement);
|
|
@@ -429,7 +433,7 @@ async function runVectorIndexBuildWithSerialFallback(execute, tableName, indexSt
|
|
|
429
433
|
}
|
|
430
434
|
}
|
|
431
435
|
async function runPostgresVectorIndexBuild(vectorStrategy, execute, tableName, indexStatement, dropStatement) {
|
|
432
|
-
if (vectorStrategy !==
|
|
436
|
+
if (vectorStrategy !== chunkTIJUA4I6_cjs.pgvectorStrategy) {
|
|
433
437
|
await execute(indexStatement);
|
|
434
438
|
return;
|
|
435
439
|
}
|
|
@@ -441,9 +445,9 @@ async function runPostgresVectorIndexBuild(vectorStrategy, execute, tableName, i
|
|
|
441
445
|
);
|
|
442
446
|
}
|
|
443
447
|
async function runSerialVectorIndexBuild(execute, tableName, indexStatement, parallelBuildError) {
|
|
444
|
-
const table =
|
|
448
|
+
const table = chunkH5IJSROF_cjs.sql.identifier(tableName);
|
|
445
449
|
try {
|
|
446
|
-
await execute(
|
|
450
|
+
await execute(chunkH5IJSROF_cjs.sql`ALTER TABLE ${table} SET (parallel_workers = 0)`);
|
|
447
451
|
} catch (setError) {
|
|
448
452
|
if (parallelBuildError === void 0) throw setError;
|
|
449
453
|
throw vectorSerialFallbackPreparationError(
|
|
@@ -459,7 +463,7 @@ async function runSerialVectorIndexBuild(execute, tableName, indexStatement, par
|
|
|
459
463
|
buildFailure = { error };
|
|
460
464
|
}
|
|
461
465
|
try {
|
|
462
|
-
await execute(
|
|
466
|
+
await execute(chunkH5IJSROF_cjs.sql`ALTER TABLE ${table} RESET (parallel_workers)`);
|
|
463
467
|
} catch (resetError) {
|
|
464
468
|
if (buildFailure === void 0) {
|
|
465
469
|
throw parallelWorkerResetError(tableName, resetError);
|
|
@@ -468,27 +472,27 @@ async function runSerialVectorIndexBuild(execute, tableName, indexStatement, par
|
|
|
468
472
|
}
|
|
469
473
|
if (buildFailure !== void 0) throw buildFailure.error;
|
|
470
474
|
}
|
|
471
|
-
var toNodeRow =
|
|
472
|
-
var toEdgeRow =
|
|
473
|
-
var toUniqueRow =
|
|
474
|
-
var toSchemaVersionRow =
|
|
475
|
-
|
|
475
|
+
var toNodeRow = chunk36SX6QXP_cjs.createNodeRowMapper(chunk36SX6QXP_cjs.POSTGRES_ROW_MAPPER_CONFIG);
|
|
476
|
+
var toEdgeRow = chunk36SX6QXP_cjs.createEdgeRowMapper(chunk36SX6QXP_cjs.POSTGRES_ROW_MAPPER_CONFIG);
|
|
477
|
+
var toUniqueRow = chunk36SX6QXP_cjs.createUniqueRowMapper(chunk36SX6QXP_cjs.POSTGRES_ROW_MAPPER_CONFIG);
|
|
478
|
+
var toSchemaVersionRow = chunk36SX6QXP_cjs.createSchemaVersionRowMapper(
|
|
479
|
+
chunk36SX6QXP_cjs.POSTGRES_ROW_MAPPER_CONFIG
|
|
476
480
|
);
|
|
477
481
|
function buildPostgresCapabilities(fulltextStrategy, vectorStrategy) {
|
|
478
482
|
return {
|
|
479
|
-
...
|
|
480
|
-
...vectorStrategy === void 0 ? {} : { vector:
|
|
481
|
-
fulltext:
|
|
483
|
+
...chunkNUQ2YFFH_cjs.POSTGRES_CAPABILITIES,
|
|
484
|
+
...vectorStrategy === void 0 ? {} : { vector: chunkH2VWDQWC_cjs.buildVectorCapabilities(vectorStrategy) },
|
|
485
|
+
fulltext: chunkH2VWDQWC_cjs.buildFulltextCapabilities(fulltextStrategy)
|
|
482
486
|
};
|
|
483
487
|
}
|
|
484
488
|
function createPostgresBackend(db, options = {}) {
|
|
485
|
-
const resourceAudit =
|
|
489
|
+
const resourceAudit = chunkNLX5OWK7_cjs.resolveDeclaredBackendResource(
|
|
486
490
|
getSerializedPostgresClient(db),
|
|
487
491
|
options.serializedResource
|
|
488
492
|
);
|
|
489
|
-
const tables2 = options.tables ??
|
|
490
|
-
const fulltextStrategy = options.fulltext ??
|
|
491
|
-
const vectorStrategy = options.vector === false ? void 0 : options.vector ??
|
|
493
|
+
const tables2 = options.tables ?? chunk5WWEYV4H_cjs.tables;
|
|
494
|
+
const fulltextStrategy = options.fulltext ?? chunkH2VWDQWC_cjs.tsvectorStrategy;
|
|
495
|
+
const vectorStrategy = options.vector === false ? void 0 : options.vector ?? chunkTIJUA4I6_cjs.pgvectorStrategy;
|
|
492
496
|
const iterativeScanProbe = createIterativeScanProbe();
|
|
493
497
|
const baseCapabilities = buildPostgresCapabilities(
|
|
494
498
|
fulltextStrategy,
|
|
@@ -501,35 +505,37 @@ function createPostgresBackend(db, options = {}) {
|
|
|
501
505
|
supported: false
|
|
502
506
|
}
|
|
503
507
|
} : {};
|
|
504
|
-
const configuredMaxBindParameters = options.capabilities?.maxBindParameters ??
|
|
508
|
+
const configuredMaxBindParameters = options.capabilities?.maxBindParameters ?? chunkNUQ2YFFH_cjs.POSTGRES_MAX_BIND_PARAMETERS;
|
|
505
509
|
const driverBindParameterOverrides = isPgliteDatabase(db) ? {
|
|
506
510
|
maxBindParameters: Math.min(
|
|
507
511
|
configuredMaxBindParameters,
|
|
508
512
|
PGLITE_MAX_BIND_PARAMETERS
|
|
509
513
|
)
|
|
510
514
|
} : {};
|
|
511
|
-
const declaredCapabilities =
|
|
515
|
+
const declaredCapabilities = chunkNUQ2YFFH_cjs.normalizeGraphAnalyticsCapabilities({
|
|
512
516
|
...baseCapabilities,
|
|
513
517
|
...httpOnlyOverrides,
|
|
514
518
|
...options.capabilities,
|
|
515
519
|
...driverBindParameterOverrides
|
|
516
520
|
});
|
|
517
|
-
const capabilities =
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
521
|
+
const capabilities = chunk5WWEYV4H_cjs.assertBundledCapabilityDeclarations(
|
|
522
|
+
{
|
|
523
|
+
...declaredCapabilities,
|
|
524
|
+
contributions: {
|
|
525
|
+
supported: true,
|
|
526
|
+
probe: true,
|
|
527
|
+
rebuild: chunk5WWEYV4H_cjs.contributionRebuildSupported(
|
|
528
|
+
fulltextStrategy,
|
|
529
|
+
tables2.fulltextTableName,
|
|
530
|
+
declaredCapabilities.transactions
|
|
531
|
+
)
|
|
532
|
+
}
|
|
527
533
|
}
|
|
528
|
-
|
|
534
|
+
);
|
|
529
535
|
const adapterOptions = {
|
|
530
536
|
...options.prepareStatements === void 0 ? {} : { prepareStatements: options.prepareStatements },
|
|
531
537
|
...options.preparedStatementCacheMax === void 0 ? {} : { preparedStatementCacheMax: options.preparedStatementCacheMax },
|
|
532
|
-
maxBindParameters: capabilities.maxBindParameters ??
|
|
538
|
+
maxBindParameters: capabilities.maxBindParameters ?? chunkNUQ2YFFH_cjs.POSTGRES_MAX_BIND_PARAMETERS
|
|
533
539
|
};
|
|
534
540
|
const executionAdapter = createPostgresExecutionAdapter(db, adapterOptions);
|
|
535
541
|
const tableNames = {
|
|
@@ -553,8 +559,8 @@ function createPostgresBackend(db, options = {}) {
|
|
|
553
559
|
drizzleOrm.getTableName(tables2.uniques),
|
|
554
560
|
tableNames.fulltext
|
|
555
561
|
].map(
|
|
556
|
-
(name) =>
|
|
557
|
-
|
|
562
|
+
(name) => chunkLLFPQOBA_cjs.toDrizzleSql(
|
|
563
|
+
chunkH5IJSROF_cjs.sql`ANALYZE (SKIP_LOCKED) ${chunkH5IJSROF_cjs.sql.identifier(name)}`,
|
|
558
564
|
"postgres"
|
|
559
565
|
)
|
|
560
566
|
);
|
|
@@ -567,11 +573,11 @@ function createPostgresBackend(db, options = {}) {
|
|
|
567
573
|
tableNames.identityClosure,
|
|
568
574
|
tableNames.identitySeparation
|
|
569
575
|
];
|
|
570
|
-
const operationStrategy =
|
|
576
|
+
const operationStrategy = chunk5WWEYV4H_cjs.createPostgresOperationStrategy(
|
|
571
577
|
tables2,
|
|
572
578
|
fulltextStrategy
|
|
573
579
|
);
|
|
574
|
-
const guardedTableExists =
|
|
580
|
+
const guardedTableExists = chunk5WWEYV4H_cjs.createCachedTableExistence(
|
|
575
581
|
async (tableName) => {
|
|
576
582
|
const rows = await executionAdapter.execute(
|
|
577
583
|
operationStrategy.buildTableExists(tableName)
|
|
@@ -588,18 +594,18 @@ function createPostgresBackend(db, options = {}) {
|
|
|
588
594
|
});
|
|
589
595
|
}
|
|
590
596
|
async function ensureTableWithConcurrentCreateRetry(table) {
|
|
591
|
-
await executeConcurrentCreateDdl(
|
|
597
|
+
await executeConcurrentCreateDdl(chunk5WWEYV4H_cjs.generatePgCreateTableSQL(table));
|
|
592
598
|
}
|
|
593
599
|
async function ensureDatabaseExtension(name) {
|
|
594
|
-
const validated =
|
|
600
|
+
const validated = chunkNUQ2YFFH_cjs.DATABASE_EXTENSION_NAMES.find(
|
|
595
601
|
(candidate) => candidate === name
|
|
596
602
|
);
|
|
597
603
|
if (validated === void 0) {
|
|
598
604
|
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
599
605
|
`Unsupported database extension "${name}".`,
|
|
600
|
-
{ extension: name, supported:
|
|
606
|
+
{ extension: name, supported: chunkNUQ2YFFH_cjs.DATABASE_EXTENSION_NAMES },
|
|
601
607
|
{
|
|
602
|
-
suggestion: `Request one of: ${
|
|
608
|
+
suggestion: `Request one of: ${chunkNUQ2YFFH_cjs.DATABASE_EXTENSION_NAMES.join(", ")}.`
|
|
603
609
|
}
|
|
604
610
|
);
|
|
605
611
|
}
|
|
@@ -621,16 +627,26 @@ function createPostgresBackend(db, options = {}) {
|
|
|
621
627
|
await ensureTableWithConcurrentCreateRetry(matTable);
|
|
622
628
|
}
|
|
623
629
|
function identityContributionsFor(identityTableNames) {
|
|
624
|
-
const identityTables =
|
|
630
|
+
const identityTables = chunk5WWEYV4H_cjs.createPostgresTables({
|
|
625
631
|
identityAssertions: identityTableNames.identityAssertions,
|
|
626
632
|
recordedIdentityAssertions: identityTableNames.recordedIdentityAssertions,
|
|
627
633
|
identityClosure: identityTableNames.identityClosure,
|
|
628
634
|
identitySeparation: identityTableNames.identitySeparation
|
|
629
635
|
});
|
|
630
|
-
return
|
|
636
|
+
return chunk5WWEYV4H_cjs.postgresContributions(identityTables, fulltextStrategy).filter(
|
|
631
637
|
(contribution) => IDENTITY_TABLE_LOGICAL_NAMES.has(contribution.logicalName)
|
|
632
638
|
);
|
|
633
639
|
}
|
|
640
|
+
function recordedContributionsFor(recordedTableNames) {
|
|
641
|
+
const recordedTables = chunk5WWEYV4H_cjs.createPostgresTables({
|
|
642
|
+
recordedNodes: recordedTableNames.recordedNodes,
|
|
643
|
+
recordedEdges: recordedTableNames.recordedEdges,
|
|
644
|
+
recordedClock: recordedTableNames.recordedClock
|
|
645
|
+
});
|
|
646
|
+
return chunk5WWEYV4H_cjs.postgresContributions(recordedTables, fulltextStrategy).filter(
|
|
647
|
+
(contribution) => RECORDED_TABLE_LOGICAL_NAMES.has(contribution.logicalName)
|
|
648
|
+
);
|
|
649
|
+
}
|
|
634
650
|
async function getContributionMaterializationRow(identity) {
|
|
635
651
|
const rows = await db.select().from(matTable).where(
|
|
636
652
|
drizzleOrm.and(
|
|
@@ -642,25 +658,25 @@ function createPostgresBackend(db, options = {}) {
|
|
|
642
658
|
);
|
|
643
659
|
const row = rows[0];
|
|
644
660
|
if (row === void 0) return void 0;
|
|
645
|
-
return
|
|
661
|
+
return chunk5WWEYV4H_cjs.mapContributionMaterializationRow(
|
|
646
662
|
row,
|
|
647
|
-
|
|
663
|
+
chunk5WWEYV4H_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.decode
|
|
648
664
|
);
|
|
649
665
|
}
|
|
650
666
|
async function getContributionMaterializationRows(graphId) {
|
|
651
667
|
const rows = await db.select().from(matTable).where(drizzleOrm.eq(matTable.graphId, graphId));
|
|
652
668
|
return rows.map(
|
|
653
|
-
(row) =>
|
|
669
|
+
(row) => chunk5WWEYV4H_cjs.mapContributionMaterializationRow(
|
|
654
670
|
row,
|
|
655
|
-
|
|
671
|
+
chunk5WWEYV4H_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.decode
|
|
656
672
|
)
|
|
657
673
|
);
|
|
658
674
|
}
|
|
659
675
|
async function recordContributionMaterializationRow(params) {
|
|
660
676
|
await db.insert(matTable).values(
|
|
661
|
-
|
|
677
|
+
chunk5WWEYV4H_cjs.buildContributionInsertValues(
|
|
662
678
|
params,
|
|
663
|
-
|
|
679
|
+
chunk5WWEYV4H_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.encode
|
|
664
680
|
)
|
|
665
681
|
).onConflictDoUpdate({
|
|
666
682
|
target: [
|
|
@@ -669,7 +685,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
669
685
|
matTable.owner,
|
|
670
686
|
matTable.tableName
|
|
671
687
|
],
|
|
672
|
-
set:
|
|
688
|
+
set: chunk5WWEYV4H_cjs.buildContributionOnConflictSet(
|
|
673
689
|
matTable.materializedAt,
|
|
674
690
|
params.materializedAt
|
|
675
691
|
)
|
|
@@ -689,10 +705,11 @@ function createPostgresBackend(db, options = {}) {
|
|
|
689
705
|
const rows = await executionAdapter.execute(
|
|
690
706
|
operationStrategy.buildTableExists(tableName)
|
|
691
707
|
);
|
|
692
|
-
return
|
|
708
|
+
return chunk5WWEYV4H_cjs.tableExistsFromRow(rows[0]);
|
|
693
709
|
}
|
|
694
|
-
const contributionMaterializer =
|
|
710
|
+
const contributionMaterializer = chunk5WWEYV4H_cjs.createContributionMaterializer({
|
|
695
711
|
dialect: "postgres",
|
|
712
|
+
fenceTarget: chunkNUQ2YFFH_cjs.markFirstPartyFactory({ dialect: "postgres", capabilities }),
|
|
696
713
|
fulltextStrategy,
|
|
697
714
|
fulltextTableName: tables2.fulltextTableName,
|
|
698
715
|
vectorStrategy,
|
|
@@ -783,7 +800,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
783
800
|
schemaVersionsTable: tables2.schemaVersions
|
|
784
801
|
});
|
|
785
802
|
return {
|
|
786
|
-
backend:
|
|
803
|
+
backend: chunk5WWEYV4H_cjs.gateFulltext(
|
|
787
804
|
backend2,
|
|
788
805
|
contributionMaterializer.assertInitialized,
|
|
789
806
|
contributionMaterializer.refuseUnavailableFulltext
|
|
@@ -812,28 +829,28 @@ function createPostgresBackend(db, options = {}) {
|
|
|
812
829
|
{ capability: "trustedImport", dialect: "postgres" }
|
|
813
830
|
);
|
|
814
831
|
}
|
|
815
|
-
const trustedTx =
|
|
832
|
+
const trustedTx = chunkNLX5OWK7_cjs.deriveBackend(tx, {
|
|
816
833
|
executeRaw(sqlText, params) {
|
|
817
834
|
return executeCompiled({ params, sql: sqlText });
|
|
818
835
|
}
|
|
819
836
|
});
|
|
820
|
-
await
|
|
821
|
-
await
|
|
822
|
-
const indexDefinitions = await
|
|
837
|
+
await chunk5WWEYV4H_cjs.lockPostgresTrustedImportTables(trustedTx, tableNames);
|
|
838
|
+
await chunk5WWEYV4H_cjs.assertTrustedImportDatabaseEmpty(trustedTx, tableNames);
|
|
839
|
+
const indexDefinitions = await chunk5WWEYV4H_cjs.suspendPostgresSecondaryIndexes(
|
|
823
840
|
trustedTx,
|
|
824
841
|
tableNames
|
|
825
842
|
);
|
|
826
843
|
const result = await fn(
|
|
827
|
-
|
|
844
|
+
chunk5WWEYV4H_cjs.createPostgresTrustedImportSession(trustedTx, tableNames)
|
|
828
845
|
);
|
|
829
|
-
await
|
|
830
|
-
await
|
|
846
|
+
await chunk5WWEYV4H_cjs.restoreSecondaryIndexes(trustedTx, indexDefinitions);
|
|
847
|
+
await chunk5WWEYV4H_cjs.analyzeImportedTables(trustedTx, tableNames);
|
|
831
848
|
return result;
|
|
832
849
|
});
|
|
833
850
|
}
|
|
834
851
|
} : {},
|
|
835
852
|
async bootstrapTables() {
|
|
836
|
-
const statements =
|
|
853
|
+
const statements = chunk5WWEYV4H_cjs.generatePostgresDDL(tables2, fulltextStrategy);
|
|
837
854
|
for (const statement of statements) {
|
|
838
855
|
await executeConcurrentCreateDdl(statement);
|
|
839
856
|
}
|
|
@@ -863,12 +880,34 @@ function createPostgresBackend(db, options = {}) {
|
|
|
863
880
|
(contribution) => [...contribution.createDdl]
|
|
864
881
|
);
|
|
865
882
|
},
|
|
883
|
+
recordedTableDdl(recordedTableNames) {
|
|
884
|
+
const contributions = recordedContributionsFor(recordedTableNames);
|
|
885
|
+
function ddlFor(logicalName) {
|
|
886
|
+
const contribution = chunkN66HCGCY_cjs.requireDefined(
|
|
887
|
+
contributions.find((entry) => entry.logicalName === logicalName),
|
|
888
|
+
`recordedTableDdl: no contribution for ${logicalName}.`
|
|
889
|
+
);
|
|
890
|
+
return {
|
|
891
|
+
createTable: chunkN66HCGCY_cjs.requireDefined(
|
|
892
|
+
contribution.createDdl[0],
|
|
893
|
+
`recordedTableDdl: empty DDL for ${logicalName}.`
|
|
894
|
+
),
|
|
895
|
+
indexes: contribution.createDdl.slice(1),
|
|
896
|
+
primaryKeyConstraintName: `${contribution.tableName}_pkey`
|
|
897
|
+
};
|
|
898
|
+
}
|
|
899
|
+
return {
|
|
900
|
+
recordedClock: ddlFor("recordedClock"),
|
|
901
|
+
recordedEdges: ddlFor("recordedEdges"),
|
|
902
|
+
recordedNodes: ddlFor("recordedNodes")
|
|
903
|
+
};
|
|
904
|
+
},
|
|
866
905
|
// Every fulltext-touching method asserts the durable marker instead
|
|
867
906
|
// of lazily emitting DDL. Steady state performs zero ensure; an
|
|
868
907
|
// uninitialized database throws `StoreNotInitializedError` loudly
|
|
869
908
|
// rather than self-healing on a read/write path (#135). Shared
|
|
870
909
|
// verbatim with the tx-scoped gate via `gateFulltextMethods`.
|
|
871
|
-
...
|
|
910
|
+
...chunk5WWEYV4H_cjs.gateFulltextMethods(
|
|
872
911
|
operations,
|
|
873
912
|
contributionMaterializer.assertInitialized,
|
|
874
913
|
contributionMaterializer.refuseUnavailableFulltext
|
|
@@ -928,26 +967,26 @@ function createPostgresBackend(db, options = {}) {
|
|
|
928
967
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.indexName, indexName));
|
|
929
968
|
const row = rows[0];
|
|
930
969
|
if (row === void 0) return void 0;
|
|
931
|
-
return
|
|
970
|
+
return chunk5WWEYV4H_cjs.mapMaterializationRow(row, chunk5WWEYV4H_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.decode);
|
|
932
971
|
},
|
|
933
972
|
async getIndexMaterializations(statusKeys) {
|
|
934
973
|
if (statusKeys.length === 0) return [];
|
|
935
974
|
const t = tables2.indexMaterializations;
|
|
936
975
|
const rows = await db.select().from(t).where(drizzleOrm.inArray(t.indexName, [...statusKeys]));
|
|
937
976
|
return rows.map(
|
|
938
|
-
(row) =>
|
|
977
|
+
(row) => chunk5WWEYV4H_cjs.mapMaterializationRow(row, chunk5WWEYV4H_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.decode)
|
|
939
978
|
);
|
|
940
979
|
},
|
|
941
980
|
async recordIndexMaterialization(params) {
|
|
942
981
|
const t = tables2.indexMaterializations;
|
|
943
982
|
await db.insert(t).values(
|
|
944
|
-
|
|
983
|
+
chunk5WWEYV4H_cjs.buildMaterializationInsertValues(
|
|
945
984
|
params,
|
|
946
|
-
|
|
985
|
+
chunk5WWEYV4H_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.encode
|
|
947
986
|
)
|
|
948
987
|
).onConflictDoUpdate({
|
|
949
988
|
target: t.indexName,
|
|
950
|
-
set:
|
|
989
|
+
set: chunk5WWEYV4H_cjs.buildMaterializationOnConflictSet(params.materializedAt)
|
|
951
990
|
});
|
|
952
991
|
},
|
|
953
992
|
async ensureContributionMaterializationsTable() {
|
|
@@ -969,26 +1008,26 @@ function createPostgresBackend(db, options = {}) {
|
|
|
969
1008
|
const t = tables2.kindRemovals;
|
|
970
1009
|
const rows = await db.select().from(t).where(drizzleOrm.and(drizzleOrm.eq(t.graphId, graphId), drizzleOrm.isNull(t.removedAt)));
|
|
971
1010
|
return rows.map(
|
|
972
|
-
(row) =>
|
|
1011
|
+
(row) => chunk5WWEYV4H_cjs.mapKindRemovalRow(row, chunk5WWEYV4H_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
973
1012
|
);
|
|
974
1013
|
},
|
|
975
1014
|
async getAllKindRemovals(graphId) {
|
|
976
1015
|
const t = tables2.kindRemovals;
|
|
977
1016
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.graphId, graphId));
|
|
978
1017
|
return rows.map(
|
|
979
|
-
(row) =>
|
|
1018
|
+
(row) => chunk5WWEYV4H_cjs.mapKindRemovalRow(row, chunk5WWEYV4H_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
980
1019
|
);
|
|
981
1020
|
},
|
|
982
1021
|
async recordKindRemoval(params) {
|
|
983
1022
|
const t = tables2.kindRemovals;
|
|
984
1023
|
await db.insert(t).values(
|
|
985
|
-
|
|
1024
|
+
chunk5WWEYV4H_cjs.buildKindRemovalInsertValues(
|
|
986
1025
|
params,
|
|
987
|
-
|
|
1026
|
+
chunk5WWEYV4H_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.encode
|
|
988
1027
|
)
|
|
989
1028
|
).onConflictDoUpdate({
|
|
990
1029
|
target: [t.graphId, t.kindName, t.entity, t.schemaVersion],
|
|
991
|
-
set:
|
|
1030
|
+
set: chunk5WWEYV4H_cjs.buildKindRemovalOnConflictSet(t.removedAt, params.removedAt)
|
|
992
1031
|
});
|
|
993
1032
|
},
|
|
994
1033
|
async ensureReconciliationMarkersTable() {
|
|
@@ -1067,8 +1106,8 @@ function createPostgresBackend(db, options = {}) {
|
|
|
1067
1106
|
const presentGuardedTables = tablePresence.filter((entry) => entry.exists).map((entry) => entry.tableName);
|
|
1068
1107
|
for (const tableName of presentGuardedTables) {
|
|
1069
1108
|
await db.execute(
|
|
1070
|
-
|
|
1071
|
-
|
|
1109
|
+
chunkLLFPQOBA_cjs.toDrizzleSql(
|
|
1110
|
+
chunkH5IJSROF_cjs.sql`ANALYZE (SKIP_LOCKED) ${chunkH5IJSROF_cjs.sql.identifier(tableName)}`,
|
|
1072
1111
|
"postgres"
|
|
1073
1112
|
)
|
|
1074
1113
|
);
|
|
@@ -1083,7 +1122,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
1083
1122
|
async commitSchemaVersionIfKindsEmpty(params, probes) {
|
|
1084
1123
|
return runSchemaWriteTransaction(
|
|
1085
1124
|
params.graphId,
|
|
1086
|
-
(target) =>
|
|
1125
|
+
(target) => chunk5WWEYV4H_cjs.commitSchemaVersionIfKindsEmpty(target, params, probes)
|
|
1087
1126
|
);
|
|
1088
1127
|
},
|
|
1089
1128
|
async commitSchemaVersionWithPreflight(params, preflight) {
|
|
@@ -1105,7 +1144,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
1105
1144
|
return backend.transactionWithNative((tx) => fn(tx), options2);
|
|
1106
1145
|
},
|
|
1107
1146
|
async transactionWithNative(fn, options2) {
|
|
1108
|
-
const temporaryWrites = options2?.temporaryWrites ===
|
|
1147
|
+
const temporaryWrites = options2?.temporaryWrites === chunkNUQ2YFFH_cjs.INTERNAL_TEMPORARY_WRITES;
|
|
1109
1148
|
if (temporaryWrites && options2.accessMode !== "read_only") {
|
|
1110
1149
|
throw new chunkX4GDXBOP_cjs.ConfigurationError(
|
|
1111
1150
|
"Temporary-write transactions must be semantically read-only.",
|
|
@@ -1140,7 +1179,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
1140
1179
|
}
|
|
1141
1180
|
);
|
|
1142
1181
|
}
|
|
1143
|
-
|
|
1182
|
+
chunk5WWEYV4H_cjs.assertAdoptedDialect(
|
|
1144
1183
|
externalTx,
|
|
1145
1184
|
pgCore.PgTransaction,
|
|
1146
1185
|
"postgres"
|
|
@@ -1150,7 +1189,8 @@ function createPostgresBackend(db, options = {}) {
|
|
|
1150
1189
|
async close() {
|
|
1151
1190
|
}
|
|
1152
1191
|
};
|
|
1153
|
-
|
|
1192
|
+
chunkNLX5OWK7_cjs.auditBackendResource(backend, resourceAudit);
|
|
1193
|
+
chunkNUQ2YFFH_cjs.markFirstPartyFactory(backend);
|
|
1154
1194
|
return backend;
|
|
1155
1195
|
}
|
|
1156
1196
|
function getSerializedPostgresClient(db) {
|
|
@@ -1257,10 +1297,10 @@ function createPostgresOperationBackend(options) {
|
|
|
1257
1297
|
}
|
|
1258
1298
|
async function vectorSearchGucOverrides(params) {
|
|
1259
1299
|
const overrides = [];
|
|
1260
|
-
const efSearchParameter =
|
|
1300
|
+
const efSearchParameter = chunkH2VWDQWC_cjs.resolveEfSearchOverride({
|
|
1261
1301
|
efSearch: params.efSearch,
|
|
1262
1302
|
indexType: params.indexType,
|
|
1263
|
-
tuning:
|
|
1303
|
+
tuning: chunkH2VWDQWC_cjs.vectorSearchFrontierTuning(vectorStrategy),
|
|
1264
1304
|
transactions: capabilities.transactions,
|
|
1265
1305
|
dialect: "PostgreSQL",
|
|
1266
1306
|
engine: vectorStrategy?.name ?? "this backend"
|
|
@@ -1329,17 +1369,17 @@ function createPostgresOperationBackend(options) {
|
|
|
1329
1369
|
});
|
|
1330
1370
|
}
|
|
1331
1371
|
const batchConfig = computePostgresBatchChunkSizes(
|
|
1332
|
-
capabilities.maxBindParameters ??
|
|
1372
|
+
capabilities.maxBindParameters ?? chunkNUQ2YFFH_cjs.POSTGRES_MAX_BIND_PARAMETERS
|
|
1333
1373
|
);
|
|
1334
|
-
const commonOperationMembers =
|
|
1374
|
+
const commonOperationMembers = chunk5WWEYV4H_cjs.createCommonOperationBackend({
|
|
1335
1375
|
batchConfig,
|
|
1336
1376
|
execution: {
|
|
1337
1377
|
execAll,
|
|
1338
1378
|
execGet,
|
|
1339
1379
|
execRun
|
|
1340
1380
|
},
|
|
1341
|
-
nowIso:
|
|
1342
|
-
maxBindParameters: capabilities.maxBindParameters ??
|
|
1381
|
+
nowIso: chunk36SX6QXP_cjs.nowIso,
|
|
1382
|
+
maxBindParameters: capabilities.maxBindParameters ?? chunkNUQ2YFFH_cjs.POSTGRES_MAX_BIND_PARAMETERS,
|
|
1343
1383
|
operationStrategy,
|
|
1344
1384
|
rowMappers: {
|
|
1345
1385
|
toEdgeRow,
|
|
@@ -1357,28 +1397,28 @@ function createPostgresOperationBackend(options) {
|
|
|
1357
1397
|
};
|
|
1358
1398
|
const vectorEmbeddingMethods = vectorStrategy === void 0 ? {} : {
|
|
1359
1399
|
async upsertEmbedding(params) {
|
|
1360
|
-
const slot =
|
|
1400
|
+
const slot = chunk5WWEYV4H_cjs.vectorSlotFromParams(params);
|
|
1361
1401
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
1362
|
-
const statements = vectorStrategy.buildUpsert(slot, params,
|
|
1402
|
+
const statements = vectorStrategy.buildUpsert(slot, params, chunk36SX6QXP_cjs.nowIso());
|
|
1363
1403
|
try {
|
|
1364
1404
|
for (const statement of statements) {
|
|
1365
1405
|
await execRun(statement);
|
|
1366
1406
|
}
|
|
1367
1407
|
} catch (error) {
|
|
1368
|
-
throw
|
|
1408
|
+
throw chunk5WWEYV4H_cjs.mapVectorWriteError(error, params);
|
|
1369
1409
|
}
|
|
1370
1410
|
},
|
|
1371
1411
|
async upsertEmbeddingBatch(params) {
|
|
1372
1412
|
if (params.rows.length === 0) return;
|
|
1373
|
-
const slot =
|
|
1413
|
+
const slot = chunk5WWEYV4H_cjs.vectorSlotFromParams(params);
|
|
1374
1414
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
1375
1415
|
const rowsById = new Map(
|
|
1376
1416
|
params.rows.map((row) => [row.nodeId, row])
|
|
1377
1417
|
);
|
|
1378
1418
|
const rows = [...rowsById.values()];
|
|
1379
|
-
const timestamp =
|
|
1419
|
+
const timestamp = chunk36SX6QXP_cjs.nowIso();
|
|
1380
1420
|
try {
|
|
1381
|
-
for (const chunk2 of
|
|
1421
|
+
for (const chunk2 of chunkNLX5OWK7_cjs.chunk(
|
|
1382
1422
|
rows,
|
|
1383
1423
|
batchConfig.embeddingUpsertBatchSize
|
|
1384
1424
|
)) {
|
|
@@ -1407,11 +1447,11 @@ function createPostgresOperationBackend(options) {
|
|
|
1407
1447
|
}
|
|
1408
1448
|
}
|
|
1409
1449
|
} catch (error) {
|
|
1410
|
-
throw
|
|
1450
|
+
throw chunk5WWEYV4H_cjs.mapVectorWriteError(error, params);
|
|
1411
1451
|
}
|
|
1412
1452
|
},
|
|
1413
1453
|
async deleteEmbedding(params) {
|
|
1414
|
-
const slot =
|
|
1454
|
+
const slot = chunk5WWEYV4H_cjs.vectorSlotFromParams(params);
|
|
1415
1455
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
1416
1456
|
const statements = vectorStrategy.buildDelete(slot, params);
|
|
1417
1457
|
for (const statement of statements) {
|
|
@@ -1420,9 +1460,9 @@ function createPostgresOperationBackend(options) {
|
|
|
1420
1460
|
},
|
|
1421
1461
|
async deleteEmbeddingBatch(params) {
|
|
1422
1462
|
if (params.nodeIds.length === 0) return;
|
|
1423
|
-
const slot =
|
|
1463
|
+
const slot = chunk5WWEYV4H_cjs.vectorSlotFromParams(params);
|
|
1424
1464
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
1425
|
-
for (const nodeIds of
|
|
1465
|
+
for (const nodeIds of chunkNLX5OWK7_cjs.chunk(
|
|
1426
1466
|
[...new Set(params.nodeIds)],
|
|
1427
1467
|
batchConfig.embeddingUpsertBatchSize
|
|
1428
1468
|
)) {
|
|
@@ -1434,19 +1474,19 @@ function createPostgresOperationBackend(options) {
|
|
|
1434
1474
|
}
|
|
1435
1475
|
},
|
|
1436
1476
|
async vectorSearch(params) {
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
const slot =
|
|
1477
|
+
chunkH2VWDQWC_cjs.assertVectorSearchLimit(params.limit);
|
|
1478
|
+
chunkTIJUA4I6_cjs.assertPgvectorEfSearch(params.efSearch);
|
|
1479
|
+
const slot = chunk5WWEYV4H_cjs.vectorSlotFromParams(params);
|
|
1440
1480
|
const query = vectorStrategy.buildSearch(
|
|
1441
1481
|
slot,
|
|
1442
1482
|
params,
|
|
1443
1483
|
// Store-compiled candidates (predicates + subclass + currency)
|
|
1444
1484
|
// take precedence; the live-node default covers direct backend use.
|
|
1445
|
-
params.candidates ??
|
|
1485
|
+
params.candidates ?? chunk5WWEYV4H_cjs.buildLiveNodeCandidates(
|
|
1446
1486
|
tableNames.nodes,
|
|
1447
1487
|
params.graphId,
|
|
1448
1488
|
params.nodeKind,
|
|
1449
|
-
|
|
1489
|
+
chunk36SX6QXP_cjs.nowIso()
|
|
1450
1490
|
)
|
|
1451
1491
|
);
|
|
1452
1492
|
const gucOverrides = await vectorSearchGucOverrides(params);
|
|
@@ -1454,7 +1494,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1454
1494
|
try {
|
|
1455
1495
|
rows = await runVectorSearch(gucOverrides, query);
|
|
1456
1496
|
} catch (error) {
|
|
1457
|
-
throw
|
|
1497
|
+
throw chunk5WWEYV4H_cjs.mapVectorWriteError(error, params);
|
|
1458
1498
|
}
|
|
1459
1499
|
return rows.map((row) => ({
|
|
1460
1500
|
nodeId: row.node_id,
|
|
@@ -1466,10 +1506,10 @@ function createPostgresOperationBackend(options) {
|
|
|
1466
1506
|
// multi-statement fallback by simply not exposing the member.
|
|
1467
1507
|
...capabilities.windowFunctions ? {
|
|
1468
1508
|
async hybridSearch(params) {
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
const slot =
|
|
1509
|
+
chunkH2VWDQWC_cjs.assertVectorSearchLimit(params.limit);
|
|
1510
|
+
chunkH2VWDQWC_cjs.assertVectorSearchLimit(params.vector.k);
|
|
1511
|
+
chunkTIJUA4I6_cjs.assertPgvectorEfSearch(params.vector.efSearch);
|
|
1512
|
+
const slot = chunk5WWEYV4H_cjs.vectorSlotFromParams({
|
|
1473
1513
|
graphId: params.graphId,
|
|
1474
1514
|
nodeKind: params.nodeKind,
|
|
1475
1515
|
fieldPath: params.vector.fieldPath,
|
|
@@ -1477,11 +1517,11 @@ function createPostgresOperationBackend(options) {
|
|
|
1477
1517
|
metric: params.vector.metric,
|
|
1478
1518
|
indexType: params.vector.indexType
|
|
1479
1519
|
});
|
|
1480
|
-
const candidates = params.candidates ??
|
|
1520
|
+
const candidates = params.candidates ?? chunk5WWEYV4H_cjs.buildLiveNodeCandidates(
|
|
1481
1521
|
tableNames.nodes,
|
|
1482
1522
|
params.graphId,
|
|
1483
1523
|
params.nodeKind,
|
|
1484
|
-
|
|
1524
|
+
chunk36SX6QXP_cjs.nowIso()
|
|
1485
1525
|
);
|
|
1486
1526
|
const vectorParams = {
|
|
1487
1527
|
graphId: params.graphId,
|
|
@@ -1497,11 +1537,11 @@ function createPostgresOperationBackend(options) {
|
|
|
1497
1537
|
const vectorSql = vectorStrategy.buildSearch(
|
|
1498
1538
|
slot,
|
|
1499
1539
|
vectorParams,
|
|
1500
|
-
|
|
1540
|
+
chunkH5IJSROF_cjs.sql.raw("SELECT node_id FROM tg_hybrid_cand")
|
|
1501
1541
|
);
|
|
1502
1542
|
const statement = operationStrategy.buildHybridSearch(
|
|
1503
1543
|
{ ...params, candidates },
|
|
1504
|
-
|
|
1544
|
+
chunkLLFPQOBA_cjs.toDrizzleSql(vectorSql, "postgres"),
|
|
1505
1545
|
params.vector.metric === "cosine"
|
|
1506
1546
|
);
|
|
1507
1547
|
const gucOverrides = await vectorSearchGucOverrides({
|
|
@@ -1515,9 +1555,9 @@ function createPostgresOperationBackend(options) {
|
|
|
1515
1555
|
statement
|
|
1516
1556
|
);
|
|
1517
1557
|
} catch (error) {
|
|
1518
|
-
throw
|
|
1558
|
+
throw chunk5WWEYV4H_cjs.mapVectorWriteError(error, vectorParams);
|
|
1519
1559
|
}
|
|
1520
|
-
return raw.map((row) =>
|
|
1560
|
+
return raw.map((row) => chunk5WWEYV4H_cjs.mapHybridSearchRow(row, toNodeRow));
|
|
1521
1561
|
}
|
|
1522
1562
|
} : {}
|
|
1523
1563
|
};
|
|
@@ -1582,7 +1622,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1582
1622
|
}
|
|
1583
1623
|
const locked = await lockActiveSchemaVersion(params.graphId);
|
|
1584
1624
|
if (locked !== void 0) {
|
|
1585
|
-
|
|
1625
|
+
chunk5WWEYV4H_cjs.assertActiveSchemaVersion(
|
|
1586
1626
|
params.graphId,
|
|
1587
1627
|
params.expectedVersion,
|
|
1588
1628
|
locked
|
|
@@ -1601,7 +1641,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1601
1641
|
// === Vector Index Operations ===
|
|
1602
1642
|
async createVectorIndex(params) {
|
|
1603
1643
|
if (vectorStrategy === void 0) return;
|
|
1604
|
-
const slot =
|
|
1644
|
+
const slot = chunk5WWEYV4H_cjs.vectorSlotFromCreateIndexParams(params);
|
|
1605
1645
|
await contributionMaterializer.ensureVectorSlot(slot);
|
|
1606
1646
|
const indexStatement = vectorStrategy.buildCreateIndex?.(slot, {
|
|
1607
1647
|
concurrent: params.concurrent === true
|
|
@@ -1623,7 +1663,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1623
1663
|
},
|
|
1624
1664
|
// === Fulltext Operations ===
|
|
1625
1665
|
async upsertFulltext(params) {
|
|
1626
|
-
const timestamp =
|
|
1666
|
+
const timestamp = chunk36SX6QXP_cjs.nowIso();
|
|
1627
1667
|
const statements = operationStrategy.buildUpsertFulltext(
|
|
1628
1668
|
params,
|
|
1629
1669
|
timestamp
|
|
@@ -1640,8 +1680,8 @@ function createPostgresOperationBackend(options) {
|
|
|
1640
1680
|
},
|
|
1641
1681
|
async upsertFulltextBatch(params) {
|
|
1642
1682
|
if (params.rows.length === 0) return;
|
|
1643
|
-
const timestamp =
|
|
1644
|
-
for (const rows of
|
|
1683
|
+
const timestamp = chunk36SX6QXP_cjs.nowIso();
|
|
1684
|
+
for (const rows of chunkNLX5OWK7_cjs.chunk(
|
|
1645
1685
|
params.rows,
|
|
1646
1686
|
batchConfig.fulltextUpsertBatchSize
|
|
1647
1687
|
)) {
|
|
@@ -1656,7 +1696,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1656
1696
|
},
|
|
1657
1697
|
async deleteFulltextBatch(params) {
|
|
1658
1698
|
if (params.nodeIds.length === 0) return;
|
|
1659
|
-
for (const nodeIds of
|
|
1699
|
+
for (const nodeIds of chunkNLX5OWK7_cjs.chunk(
|
|
1660
1700
|
params.nodeIds,
|
|
1661
1701
|
batchConfig.fulltextDeleteChunkSize
|
|
1662
1702
|
)) {
|
|
@@ -1674,25 +1714,25 @@ function createPostgresOperationBackend(options) {
|
|
|
1674
1714
|
const rows = await execAll(query);
|
|
1675
1715
|
return rows.map((row, index) => ({
|
|
1676
1716
|
nodeId: row.node_id,
|
|
1677
|
-
score:
|
|
1717
|
+
score: chunk36SX6QXP_cjs.coerceNumericScore(row.score),
|
|
1678
1718
|
rank: index + 1,
|
|
1679
1719
|
...row.snippet === null ? {} : { snippet: row.snippet }
|
|
1680
1720
|
}));
|
|
1681
1721
|
},
|
|
1682
1722
|
async dropVectorIndex(params) {
|
|
1683
1723
|
if (vectorStrategy === void 0) return;
|
|
1684
|
-
const slot =
|
|
1724
|
+
const slot = chunk5WWEYV4H_cjs.vectorSlotFromDropIndexParams(params);
|
|
1685
1725
|
const dropStatement = vectorStrategy.buildDropIndex?.(slot);
|
|
1686
1726
|
if (dropStatement === void 0) return;
|
|
1687
1727
|
try {
|
|
1688
1728
|
await execRun(dropStatement);
|
|
1689
1729
|
} catch (error) {
|
|
1690
|
-
if (!
|
|
1730
|
+
if (!chunkNLX5OWK7_cjs.isMissingTableError(error)) throw error;
|
|
1691
1731
|
}
|
|
1692
1732
|
},
|
|
1693
1733
|
// === Query Execution ===
|
|
1694
1734
|
async execute(query) {
|
|
1695
|
-
const annTypes =
|
|
1735
|
+
const annTypes = chunkH5IJSROF_cjs.isSqlFragment(query) ? chunkH5IJSROF_cjs.annIndexScanTypes(query) : void 0;
|
|
1696
1736
|
if (annTypes !== void 0 && vectorStrategy !== void 0) {
|
|
1697
1737
|
const overrides = [];
|
|
1698
1738
|
for (const indexType of annTypes) {
|
|
@@ -1733,5 +1773,5 @@ function createTransactionBackend(options) {
|
|
|
1733
1773
|
}
|
|
1734
1774
|
|
|
1735
1775
|
exports.createPostgresBackend = createPostgresBackend;
|
|
1736
|
-
//# sourceMappingURL=chunk-
|
|
1737
|
-
//# sourceMappingURL=chunk-
|
|
1776
|
+
//# sourceMappingURL=chunk-B3MN7EJR.cjs.map
|
|
1777
|
+
//# sourceMappingURL=chunk-B3MN7EJR.cjs.map
|