@nicia-ai/typegraph 0.44.0 → 0.46.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/drizzle/indexes.cjs +11 -11
- package/dist/backend/drizzle/indexes.d.cts +1 -1
- package/dist/backend/drizzle/indexes.d.ts +1 -1
- package/dist/backend/drizzle/indexes.js +7 -7
- package/dist/backend/index.cjs +53 -54
- package/dist/backend/index.d.cts +3 -3
- package/dist/backend/index.d.ts +3 -3
- package/dist/backend/index.js +13 -14
- package/dist/backend/postgres/index.cjs +29 -30
- 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 -17
- package/dist/backend/postgres/pglite-store.cjs +48 -43
- package/dist/backend/postgres/pglite-store.cjs.map +1 -1
- package/dist/backend/postgres/pglite-store.d.cts +15 -9
- package/dist/backend/postgres/pglite-store.d.ts +15 -9
- package/dist/backend/postgres/pglite-store.js +44 -39
- package/dist/backend/postgres/pglite-store.js.map +1 -1
- package/dist/backend/postgres/pglite.cjs +18 -19
- package/dist/backend/postgres/pglite.d.cts +4 -4
- package/dist/backend/postgres/pglite.d.ts +4 -4
- package/dist/backend/postgres/pglite.js +17 -18
- package/dist/backend/sqlite/index.cjs +26 -27
- package/dist/backend/sqlite/index.d.cts +6 -6
- package/dist/backend/sqlite/index.d.ts +6 -6
- package/dist/backend/sqlite/index.js +14 -15
- package/dist/backend/sqlite/libsql.cjs +21 -22
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +15 -8
- package/dist/backend/sqlite/libsql.d.ts +15 -8
- package/dist/backend/sqlite/libsql.js +17 -18
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +49 -44
- package/dist/backend/sqlite/local-store.cjs.map +1 -1
- package/dist/backend/sqlite/local-store.d.cts +15 -10
- package/dist/backend/sqlite/local-store.d.ts +15 -10
- package/dist/backend/sqlite/local-store.js +45 -40
- package/dist/backend/sqlite/local-store.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +19 -20
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +17 -18
- package/dist/{chunk-XMYJY7NI.js → chunk-2LG2XB2M.js} +3 -3
- package/dist/{chunk-XMYJY7NI.js.map → chunk-2LG2XB2M.js.map} +1 -1
- package/dist/{chunk-QGKILWGZ.cjs → chunk-2NA5DYLO.cjs} +4 -4
- package/dist/{chunk-QGKILWGZ.cjs.map → chunk-2NA5DYLO.cjs.map} +1 -1
- package/dist/{chunk-5MUSU4ZP.cjs → chunk-3DHZCOT7.cjs} +20 -20
- package/dist/chunk-3DHZCOT7.cjs.map +1 -0
- package/dist/{chunk-OVUUTCPJ.cjs → chunk-4UGOKMI5.cjs} +268 -150
- package/dist/chunk-4UGOKMI5.cjs.map +1 -0
- package/dist/{chunk-FRHHDHKH.js → chunk-5262ZMTR.js} +26 -5
- package/dist/chunk-5262ZMTR.js.map +1 -0
- package/dist/{chunk-HOIFFY4M.js → chunk-5763DULU.js} +248 -76
- package/dist/chunk-5763DULU.js.map +1 -0
- package/dist/{chunk-7G32LIQM.js → chunk-5UVRGXD3.js} +277 -7
- package/dist/chunk-5UVRGXD3.js.map +1 -0
- package/dist/{chunk-IIT5K7SK.cjs → chunk-62ZP23AW.cjs} +15 -15
- package/dist/{chunk-IIT5K7SK.cjs.map → chunk-62ZP23AW.cjs.map} +1 -1
- package/dist/{chunk-S4KQ5LV4.js → chunk-775A4ZMN.js} +40 -6
- package/dist/chunk-775A4ZMN.js.map +1 -0
- package/dist/{chunk-QYWINYEA.cjs → chunk-7BQXPCGN.cjs} +830 -170
- package/dist/chunk-7BQXPCGN.cjs.map +1 -0
- package/dist/{chunk-FJMPR3OH.cjs → chunk-7EO3TCQB.cjs} +33 -7
- package/dist/chunk-7EO3TCQB.cjs.map +1 -0
- package/dist/chunk-7GT72YHH.cjs +1979 -0
- package/dist/chunk-7GT72YHH.cjs.map +1 -0
- package/dist/{chunk-SQRD2CYF.js → chunk-7VQXLT5O.js} +717 -76
- package/dist/chunk-7VQXLT5O.js.map +1 -0
- package/dist/{chunk-BCP7LLOY.js → chunk-7Z5OR7KO.js} +2706 -625
- package/dist/chunk-7Z5OR7KO.js.map +1 -0
- package/dist/chunk-A4OC4DVN.cjs +12 -0
- package/dist/{chunk-4SZ6XPTG.cjs.map → chunk-A4OC4DVN.cjs.map} +1 -1
- package/dist/{chunk-TDXIBCGY.cjs → chunk-A7J2YDDI.cjs} +5 -3
- package/dist/chunk-A7J2YDDI.cjs.map +1 -0
- package/dist/{chunk-FMMIX6N4.js → chunk-AKLS3BYZ.js} +56 -5
- package/dist/chunk-AKLS3BYZ.js.map +1 -0
- package/dist/{chunk-D7PG5D5K.js → chunk-AMKPPFUO.js} +32 -6
- package/dist/chunk-AMKPPFUO.js.map +1 -0
- package/dist/{chunk-PAW2XUZN.js → chunk-ASTI57H3.js} +3 -3
- package/dist/{chunk-PAW2XUZN.js.map → chunk-ASTI57H3.js.map} +1 -1
- package/dist/{chunk-FMGEZBAQ.js → chunk-BKCUOV7A.js} +27 -5
- package/dist/chunk-BKCUOV7A.js.map +1 -0
- package/dist/chunk-BSFJMMV3.cjs +268 -0
- package/dist/chunk-BSFJMMV3.cjs.map +1 -0
- package/dist/{chunk-63KCKSSH.js → chunk-C23WSN5E.js} +209 -24
- package/dist/chunk-C23WSN5E.js.map +1 -0
- package/dist/{chunk-JRP3VGHS.js → chunk-CBTIUB76.js} +3 -3
- package/dist/{chunk-JRP3VGHS.js.map → chunk-CBTIUB76.js.map} +1 -1
- package/dist/chunk-CNV4TXJG.js +58 -0
- package/dist/chunk-CNV4TXJG.js.map +1 -0
- package/dist/{chunk-QB6VMOJ2.cjs → chunk-CXBHOOIQ.cjs} +45 -10
- package/dist/chunk-CXBHOOIQ.cjs.map +1 -0
- package/dist/{chunk-46GDII45.js → chunk-DCQVHAYQ.js} +5 -5
- package/dist/{chunk-46GDII45.js.map → chunk-DCQVHAYQ.js.map} +1 -1
- package/dist/chunk-DLNROMQ7.js +306 -0
- package/dist/chunk-DLNROMQ7.js.map +1 -0
- package/dist/chunk-DYATYRY4.js +47 -0
- package/dist/chunk-DYATYRY4.js.map +1 -0
- package/dist/chunk-E4WNQBEF.cjs +217 -0
- package/dist/chunk-E4WNQBEF.cjs.map +1 -0
- package/dist/{chunk-G6Q5UM7U.js → chunk-FWJKWH6U.js} +5 -3
- package/dist/chunk-FWJKWH6U.js.map +1 -0
- package/dist/{chunk-BNUFUFAU.js → chunk-HFHTMECK.js} +7 -7
- package/dist/chunk-HFHTMECK.js.map +1 -0
- package/dist/{chunk-TFMVL4QH.js → chunk-I5MOXA4H.js} +20 -14
- package/dist/chunk-I5MOXA4H.js.map +1 -0
- package/dist/{chunk-4MB3AQAQ.js → chunk-J3WZ3FA2.js} +77 -3
- package/dist/chunk-J3WZ3FA2.js.map +1 -0
- package/dist/{chunk-UR7W5YQK.js → chunk-JBQQ7THH.js} +5 -3
- package/dist/chunk-JBQQ7THH.js.map +1 -0
- package/dist/chunk-JIVMTW7W.js +3393 -0
- package/dist/chunk-JIVMTW7W.js.map +1 -0
- package/dist/{chunk-2Y4IFKW7.js → chunk-JXA2ZP2Q.js} +6 -17
- package/dist/chunk-JXA2ZP2Q.js.map +1 -0
- package/dist/{chunk-GYA4JRP5.js → chunk-JXXDZTMN.js} +2 -2
- package/dist/chunk-JXXDZTMN.js.map +1 -0
- package/dist/chunk-JZUR7ZWE.js +254 -0
- package/dist/chunk-JZUR7ZWE.js.map +1 -0
- package/dist/chunk-K5ELX2GT.js +248 -0
- package/dist/chunk-K5ELX2GT.js.map +1 -0
- package/dist/chunk-LBJKZXDE.cjs +257 -0
- package/dist/chunk-LBJKZXDE.cjs.map +1 -0
- package/dist/{chunk-FGO5JFVJ.cjs → chunk-M4BDU5RX.cjs} +12 -12
- package/dist/{chunk-FGO5JFVJ.cjs.map → chunk-M4BDU5RX.cjs.map} +1 -1
- package/dist/{chunk-MIJKEVV7.js → chunk-MSY7FSX4.js} +37 -4
- package/dist/chunk-MSY7FSX4.js.map +1 -0
- package/dist/{chunk-ST3LPB2V.cjs → chunk-MUK4BU7K.cjs} +788 -146
- package/dist/chunk-MUK4BU7K.cjs.map +1 -0
- package/dist/{chunk-MCHP7RHZ.cjs → chunk-MXJDTH5B.cjs} +64 -41
- package/dist/chunk-MXJDTH5B.cjs.map +1 -0
- package/dist/{chunk-2VLBGQBY.cjs → chunk-N3257XE6.cjs} +724 -577
- package/dist/chunk-N3257XE6.cjs.map +1 -0
- package/dist/chunk-N66HCGCY.cjs +57 -0
- package/dist/chunk-N66HCGCY.cjs.map +1 -0
- package/dist/{chunk-CPEL3YIR.cjs → chunk-NFCVHQ5P.cjs} +55 -22
- package/dist/chunk-NFCVHQ5P.cjs.map +1 -0
- package/dist/{chunk-C4F7VJ5D.cjs → chunk-NI72YOJB.cjs} +84 -2
- package/dist/chunk-NI72YOJB.cjs.map +1 -0
- package/dist/{chunk-EE7N5XXQ.cjs → chunk-NK5Q7UNE.cjs} +10 -21
- package/dist/chunk-NK5Q7UNE.cjs.map +1 -0
- package/dist/{chunk-PHXITZE4.js → chunk-NMWDXFPH.js} +4 -4
- package/dist/{chunk-PHXITZE4.js.map → chunk-NMWDXFPH.js.map} +1 -1
- package/dist/{chunk-FSXTPBRN.js → chunk-NQ6BRJBE.js} +416 -850
- package/dist/chunk-NQ6BRJBE.js.map +1 -0
- package/dist/chunk-OH5E5KIO.js +2057 -0
- package/dist/chunk-OH5E5KIO.js.map +1 -0
- package/dist/chunk-ONU3HIED.cjs +2082 -0
- package/dist/chunk-ONU3HIED.cjs.map +1 -0
- package/dist/{chunk-STQ3BSED.cjs → chunk-PNN7RHVR.cjs} +66 -44
- package/dist/chunk-PNN7RHVR.cjs.map +1 -0
- package/dist/{chunk-6DCB664D.js → chunk-PQBQG7IM.js} +3 -3
- package/dist/{chunk-6DCB664D.js.map → chunk-PQBQG7IM.js.map} +1 -1
- package/dist/{chunk-ACSVZPK7.cjs → chunk-PWLJ77UV.cjs} +5 -3
- package/dist/chunk-PWLJ77UV.cjs.map +1 -0
- package/dist/chunk-Q7Q4WSLJ.cjs +328 -0
- package/dist/chunk-Q7Q4WSLJ.cjs.map +1 -0
- package/dist/{chunk-BEFM74L2.js → chunk-QLRESYPU.js} +637 -493
- package/dist/chunk-QLRESYPU.js.map +1 -0
- package/dist/{chunk-SBPC5IP3.js → chunk-QWX5YA3K.js} +784 -202
- package/dist/chunk-QWX5YA3K.js.map +1 -0
- package/dist/{chunk-TCRIQMBU.js → chunk-RJS7DECT.js} +8 -9
- package/dist/chunk-RJS7DECT.js.map +1 -0
- package/dist/{chunk-6JZUSDY2.cjs → chunk-RMQLSPA2.cjs} +297 -27
- package/dist/chunk-RMQLSPA2.cjs.map +1 -0
- package/dist/{chunk-SJDMVITW.cjs → chunk-RT5ZY4XA.cjs} +6 -5
- package/dist/chunk-RT5ZY4XA.cjs.map +1 -0
- package/dist/{chunk-IJTLXNGJ.js → chunk-T4XNKYXB.js} +780 -127
- package/dist/chunk-T4XNKYXB.js.map +1 -0
- package/dist/{chunk-PDGEXGS6.cjs → chunk-TQR4KBY2.cjs} +354 -182
- package/dist/chunk-TQR4KBY2.cjs.map +1 -0
- package/dist/chunk-TTAITEPJ.cjs +755 -0
- package/dist/chunk-TTAITEPJ.cjs.map +1 -0
- package/dist/{chunk-NN3QSOVS.cjs → chunk-U5SON7R2.cjs} +27 -27
- package/dist/{chunk-NN3QSOVS.cjs.map → chunk-U5SON7R2.cjs.map} +1 -1
- package/dist/{chunk-A2I2XO52.cjs → chunk-U63GDNRC.cjs} +32 -26
- package/dist/chunk-U63GDNRC.cjs.map +1 -0
- package/dist/{chunk-YNULOIR5.cjs → chunk-UDISNXDL.cjs} +64 -43
- package/dist/chunk-UDISNXDL.cjs.map +1 -0
- package/dist/{chunk-GWEDD3DH.js → chunk-UV3SN74I.js} +5 -5
- package/dist/{chunk-GWEDD3DH.js.map → chunk-UV3SN74I.js.map} +1 -1
- package/dist/{chunk-U5W4LKZV.cjs → chunk-VCRRKBLN.cjs} +9 -9
- package/dist/{chunk-U5W4LKZV.cjs.map → chunk-VCRRKBLN.cjs.map} +1 -1
- package/dist/{chunk-EFELJVLA.js → chunk-VGTJPTIC.js} +28 -5
- package/dist/chunk-VGTJPTIC.js.map +1 -0
- package/dist/chunk-VQH4VAWD.cjs +12 -0
- package/dist/{chunk-EPTSMFH7.cjs.map → chunk-VQH4VAWD.cjs.map} +1 -1
- package/dist/{chunk-SNXVDZAJ.js → chunk-W6OG3HDG.js} +5 -4
- package/dist/chunk-W6OG3HDG.js.map +1 -0
- package/dist/chunk-WDGA7IYB.js +207 -0
- package/dist/chunk-WDGA7IYB.js.map +1 -0
- package/dist/chunk-WEVQJ5LH.js +736 -0
- package/dist/chunk-WEVQJ5LH.js.map +1 -0
- package/dist/{chunk-3PRKZW6D.cjs → chunk-XBYVV3MP.cjs} +60 -5
- package/dist/chunk-XBYVV3MP.cjs.map +1 -0
- package/dist/{chunk-GFRGG2US.cjs → chunk-XCAGZAKP.cjs} +7 -7
- package/dist/{chunk-GFRGG2US.cjs.map → chunk-XCAGZAKP.cjs.map} +1 -1
- package/dist/{chunk-XR4YZFKW.cjs → chunk-XDF2UPEQ.cjs} +3864 -1783
- package/dist/chunk-XDF2UPEQ.cjs.map +1 -0
- package/dist/{chunk-7V2FGGI2.cjs → chunk-XMQSEJCF.cjs} +632 -1080
- package/dist/chunk-XMQSEJCF.cjs.map +1 -0
- package/dist/chunk-XNLIZYRZ.cjs +3432 -0
- package/dist/chunk-XNLIZYRZ.cjs.map +1 -0
- package/dist/{chunk-66UVLHQA.cjs → chunk-XNSI2FJO.cjs} +99 -100
- package/dist/chunk-XNSI2FJO.cjs.map +1 -0
- package/dist/chunk-XQSCL77R.cjs +60 -0
- package/dist/chunk-XQSCL77R.cjs.map +1 -0
- package/dist/{chunk-SVJ5GEXW.cjs → chunk-XUO3KQFO.cjs} +2 -2
- package/dist/chunk-XUO3KQFO.cjs.map +1 -0
- package/dist/{chunk-HJH3RMXG.cjs → chunk-YAAM3M2S.cjs} +10 -10
- package/dist/{chunk-HJH3RMXG.cjs.map → chunk-YAAM3M2S.cjs.map} +1 -1
- package/dist/{chunk-ATLN63JA.js → chunk-YBFHZUXX.js} +6 -6
- package/dist/{chunk-ATLN63JA.js.map → chunk-YBFHZUXX.js.map} +1 -1
- package/dist/{chunk-K3BUWSFR.js → chunk-YDFDBE6D.js} +119 -6
- package/dist/chunk-YDFDBE6D.js.map +1 -0
- package/dist/{chunk-OSZPLZIV.cjs → chunk-YVWGEQJE.cjs} +318 -132
- package/dist/chunk-YVWGEQJE.cjs.map +1 -0
- package/dist/{chunk-QT6V3YRH.js → chunk-YWGVVALJ.js} +3 -3
- package/dist/{chunk-QT6V3YRH.js.map → chunk-YWGVVALJ.js.map} +1 -1
- package/dist/core/index.cjs +40 -41
- package/dist/core/index.d.cts +4 -5
- package/dist/core/index.d.ts +4 -5
- package/dist/core/index.js +8 -9
- package/dist/{ddl-eWg7hx6R.d.cts → ddl-BJcOp4WZ.d.cts} +3 -3
- package/dist/{ddl-D5369kOY.d.ts → ddl-BXfGHbPN.d.ts} +3 -3
- package/dist/graph-extension/index.cjs +26 -23
- package/dist/graph-extension/index.d.cts +16 -6
- package/dist/graph-extension/index.d.ts +16 -6
- package/dist/graph-extension/index.js +7 -8
- package/dist/graph-merge/index.cjs +2459 -655
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +170 -33
- package/dist/graph-merge/index.d.ts +170 -33
- package/dist/graph-merge/index.js +2269 -468
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/{index-By89Sezh.d.ts → index-BSHvKfok.d.ts} +221 -10
- package/dist/{index-DcQ3Sxs-.d.cts → index-DxaYCv8Y.d.cts} +221 -10
- package/dist/index.cjs +330 -269
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +590 -576
- package/dist/index.d.ts +590 -576
- package/dist/index.js +73 -50
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +17 -17
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/indexes/index.js +10 -10
- package/dist/interchange/index.cjs +165 -50
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +261 -16
- package/dist/interchange/index.d.ts +261 -16
- package/dist/interchange/index.js +128 -24
- package/dist/interchange/index.js.map +1 -1
- package/dist/{manager-B0KjKE93.d.ts → manager-CfZAimti.d.ts} +36 -5
- package/dist/{manager-Cn0NFIhN.d.cts → manager-HGk6E_HW.d.cts} +36 -5
- package/dist/{materialize-indexes-BD4V3svD.d.ts → materialize-indexes-6A7dWGtb.d.cts} +10 -2
- package/dist/{materialize-indexes-DVRhd5h4.d.cts → materialize-indexes-BMJP6Tms.d.ts} +10 -2
- package/dist/{postgres-DaEWvN4x.d.cts → postgres-DFYWENdR.d.cts} +1961 -439
- package/dist/{postgres-u0a0HN2D.d.ts → postgres-e7a9TdvR.d.ts} +1961 -439
- package/dist/profiler/index.cjs +15 -15
- package/dist/profiler/index.d.cts +9 -10
- package/dist/profiler/index.d.ts +9 -10
- package/dist/profiler/index.js +4 -4
- package/dist/provenance/index.cjs +46 -48
- 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 +12 -14
- package/dist/provenance/index.js.map +1 -1
- package/dist/schema/index.cjs +50 -49
- package/dist/schema/index.d.cts +9 -16
- package/dist/schema/index.d.ts +9 -16
- package/dist/schema/index.js +23 -22
- package/dist/{searchable-CnYEancP.d.ts → searchable-9OQoPuRs.d.ts} +1 -2
- package/dist/{searchable-BT7j9_IK.d.cts → searchable-CIje5XYD.d.cts} +1 -2
- package/dist/{sqlite-BrMoSsI7.d.cts → sqlite-DerU5tc7.d.ts} +2029 -347
- package/dist/{sqlite-CHhZUyO5.d.ts → sqlite-DitnISa9.d.cts} +2029 -347
- package/dist/{store-view-Bvdku0Ht.d.ts → store-DawaWWjJ.d.ts} +3145 -2556
- package/dist/{store-view-w-md0nQ4.d.cts → store-RwTJx8LX.d.cts} +3145 -2556
- package/dist/{temporal-BCORwUau.d.cts → temporal-Bn-Fi8FJ.d.cts} +1 -1
- package/dist/{temporal--x9T8K4S.d.ts → temporal-BtM4UALv.d.ts} +1 -1
- package/dist/{types-6-WJmSD4.d.cts → types-CoIx8HX5.d.cts} +1 -1
- package/dist/{types-Cjvkj0jA.d.ts → types-HkveCCx0.d.cts} +866 -21
- package/dist/{types-Cjvkj0jA.d.cts → types-HkveCCx0.d.ts} +866 -21
- package/dist/{types-COODtTJU.d.ts → types-KFfk-8Ah.d.ts} +1 -1
- package/dist/{where-CUQmCR6d.d.cts → where--fk7_0kv.d.cts} +1 -1
- package/dist/{where-5xVawAwL.d.ts → where-ws5hf-Ov.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-2BIG7U6E.cjs +0 -83
- package/dist/chunk-2BIG7U6E.cjs.map +0 -1
- package/dist/chunk-2L54C2C2.js +0 -144
- package/dist/chunk-2L54C2C2.js.map +0 -1
- package/dist/chunk-2VLBGQBY.cjs.map +0 -1
- package/dist/chunk-2WDD2NO3.js +0 -59
- package/dist/chunk-2WDD2NO3.js.map +0 -1
- package/dist/chunk-2Y4IFKW7.js.map +0 -1
- package/dist/chunk-35S6P5ZU.js +0 -27
- package/dist/chunk-35S6P5ZU.js.map +0 -1
- package/dist/chunk-3PRKZW6D.cjs.map +0 -1
- package/dist/chunk-4MB3AQAQ.js.map +0 -1
- package/dist/chunk-4SZ6XPTG.cjs +0 -12
- package/dist/chunk-5MUSU4ZP.cjs.map +0 -1
- package/dist/chunk-63KCKSSH.js.map +0 -1
- package/dist/chunk-66UVLHQA.cjs.map +0 -1
- package/dist/chunk-6JZUSDY2.cjs.map +0 -1
- package/dist/chunk-764JHTLT.cjs +0 -15
- package/dist/chunk-764JHTLT.cjs.map +0 -1
- package/dist/chunk-7G32LIQM.js.map +0 -1
- package/dist/chunk-7V2FGGI2.cjs.map +0 -1
- package/dist/chunk-A2I2XO52.cjs.map +0 -1
- package/dist/chunk-A4PBRX4C.cjs +0 -100
- package/dist/chunk-A4PBRX4C.cjs.map +0 -1
- package/dist/chunk-ACSVZPK7.cjs.map +0 -1
- package/dist/chunk-ALFUGRYB.cjs +0 -1282
- package/dist/chunk-ALFUGRYB.cjs.map +0 -1
- package/dist/chunk-B75XRV3O.js +0 -125
- package/dist/chunk-B75XRV3O.js.map +0 -1
- package/dist/chunk-BCP7LLOY.js.map +0 -1
- package/dist/chunk-BEFM74L2.js.map +0 -1
- package/dist/chunk-BNUFUFAU.js.map +0 -1
- package/dist/chunk-C4F7VJ5D.cjs.map +0 -1
- package/dist/chunk-CPEL3YIR.cjs.map +0 -1
- package/dist/chunk-D7PG5D5K.js.map +0 -1
- package/dist/chunk-DI74SMXS.cjs +0 -29
- package/dist/chunk-DI74SMXS.cjs.map +0 -1
- package/dist/chunk-DK2S42XB.js +0 -77
- package/dist/chunk-DK2S42XB.js.map +0 -1
- package/dist/chunk-DRACN6XG.js +0 -27
- package/dist/chunk-DRACN6XG.js.map +0 -1
- package/dist/chunk-EE7N5XXQ.cjs.map +0 -1
- package/dist/chunk-EFELJVLA.js.map +0 -1
- package/dist/chunk-EPTSMFH7.cjs +0 -12
- package/dist/chunk-EQ7JKLZO.cjs +0 -157
- package/dist/chunk-EQ7JKLZO.cjs.map +0 -1
- package/dist/chunk-FJMPR3OH.cjs.map +0 -1
- package/dist/chunk-FMGEZBAQ.js.map +0 -1
- package/dist/chunk-FMMIX6N4.js.map +0 -1
- package/dist/chunk-FRHHDHKH.js.map +0 -1
- package/dist/chunk-FSXTPBRN.js.map +0 -1
- package/dist/chunk-G6Q5UM7U.js.map +0 -1
- package/dist/chunk-GYA4JRP5.js.map +0 -1
- package/dist/chunk-HOHAJ2NR.cjs +0 -61
- package/dist/chunk-HOHAJ2NR.cjs.map +0 -1
- package/dist/chunk-HOIFFY4M.js.map +0 -1
- package/dist/chunk-IIMQJYAM.js +0 -81
- package/dist/chunk-IIMQJYAM.js.map +0 -1
- package/dist/chunk-IJTLXNGJ.js.map +0 -1
- package/dist/chunk-ITE4IXAK.js +0 -25
- package/dist/chunk-ITE4IXAK.js.map +0 -1
- package/dist/chunk-K3BUWSFR.js.map +0 -1
- package/dist/chunk-KCO5EFJU.js +0 -79
- package/dist/chunk-KCO5EFJU.js.map +0 -1
- package/dist/chunk-KKYELPZ2.cjs +0 -83
- package/dist/chunk-KKYELPZ2.cjs.map +0 -1
- package/dist/chunk-MCHP7RHZ.cjs.map +0 -1
- package/dist/chunk-MIJKEVV7.js.map +0 -1
- package/dist/chunk-NCX65HBY.cjs +0 -1396
- package/dist/chunk-NCX65HBY.cjs.map +0 -1
- package/dist/chunk-OSZPLZIV.cjs.map +0 -1
- package/dist/chunk-OVUUTCPJ.cjs.map +0 -1
- package/dist/chunk-PDGEXGS6.cjs.map +0 -1
- package/dist/chunk-QB6VMOJ2.cjs.map +0 -1
- package/dist/chunk-QMQLUA66.js +0 -12
- package/dist/chunk-QMQLUA66.js.map +0 -1
- package/dist/chunk-QYWINYEA.cjs.map +0 -1
- package/dist/chunk-S4KQ5LV4.js.map +0 -1
- package/dist/chunk-SBPC5IP3.js.map +0 -1
- package/dist/chunk-SJDMVITW.cjs.map +0 -1
- package/dist/chunk-SNXVDZAJ.js.map +0 -1
- package/dist/chunk-SQRD2CYF.js.map +0 -1
- package/dist/chunk-ST3LPB2V.cjs.map +0 -1
- package/dist/chunk-STQ3BSED.cjs.map +0 -1
- package/dist/chunk-SVJ5GEXW.cjs.map +0 -1
- package/dist/chunk-TCRIQMBU.js.map +0 -1
- package/dist/chunk-TDXIBCGY.cjs.map +0 -1
- package/dist/chunk-TFMVL4QH.js.map +0 -1
- package/dist/chunk-TRF4EBJT.cjs +0 -30
- package/dist/chunk-TRF4EBJT.cjs.map +0 -1
- package/dist/chunk-TVLKA4AY.js +0 -94
- package/dist/chunk-TVLKA4AY.js.map +0 -1
- package/dist/chunk-UR7W5YQK.js.map +0 -1
- package/dist/chunk-VITTKBWF.js +0 -1263
- package/dist/chunk-VITTKBWF.js.map +0 -1
- package/dist/chunk-WBUFJ7BS.cjs +0 -131
- package/dist/chunk-WBUFJ7BS.cjs.map +0 -1
- package/dist/chunk-XR4YZFKW.cjs.map +0 -1
- package/dist/chunk-YNULOIR5.cjs.map +0 -1
- package/dist/chunk-ZDH3DX3C.cjs +0 -30
- package/dist/chunk-ZDH3DX3C.cjs.map +0 -1
- package/dist/chunk-ZTAJL4DT.cjs +0 -85
- package/dist/chunk-ZTAJL4DT.cjs.map +0 -1
- package/dist/define-graph-DVF-oN1i.d.cts +0 -173
- package/dist/define-graph-SvYXOl78.d.ts +0 -173
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { createPostgresOperationStrategy, createCachedTableExistence, createContributionMaterializer, gateFulltextMethods, lockPostgresTrustedImportTables, assertTrustedImportDatabaseEmpty, suspendPostgresSecondaryIndexes, createPostgresTrustedImportSession, restoreSecondaryIndexes, analyzeImportedTables, createCommonOperationBackend, vectorSlotFromParams, buildLiveNodeCandidates, mapVectorWriteError, mapHybridSearchRow, mapContributionMaterializationRow, POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS, buildContributionInsertValues, buildContributionOnConflictSet, tableExistsFromRow, assertAdoptedDialect, buildKindRemovalInsertValues, POSTGRES_KIND_REMOVAL_TIMESTAMPS, buildKindRemovalOnConflictSet, mapKindRemovalRow, buildMaterializationInsertValues, POSTGRES_INDEX_MAT_TIMESTAMPS, buildMaterializationOnConflictSet, mapMaterializationRow, vectorSlotFromDropIndexParams, vectorSlotFromCreateIndexParams, FIND_EDGES_ENDPOINT_FIXED_PARAM_COUNT, EMBEDDING_UPSERT_PARAM_COUNT, gateFulltext, getOrCreateLru
|
|
2
|
-
import { pgvectorStrategy, assertPgvectorEfSearch } from './chunk-
|
|
3
|
-
import { createNodeRowMapper, POSTGRES_ROW_MAPPER_CONFIG, createEdgeRowMapper, createUniqueRowMapper, createSchemaVersionRowMapper, nowIso, coerceNumericScore } from './chunk-
|
|
4
|
-
import { tables, generatePgCreateTableSQL,
|
|
5
|
-
import { toDrizzleSql, compileQueryWithDialect } from './chunk-
|
|
6
|
-
import { chunk } from './chunk-
|
|
7
|
-
import { POSTGRES_MAX_BIND_PARAMETERS, normalizeGraphAnalyticsCapabilities, createBackendOverlay, INTERNAL_TEMPORARY_WRITES, POSTGRES_CAPABILITIES } from './chunk-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { requireDefined } from './chunk-
|
|
12
|
-
import { ConfigurationError, CompilerInvariantError, TransactionClosedError } from './chunk-4MB3AQAQ.js';
|
|
1
|
+
import { contributionRebuildSupported, createPostgresOperationStrategy, createCachedTableExistence, createContributionMaterializer, gateFulltextMethods, lockPostgresTrustedImportTables, assertTrustedImportDatabaseEmpty, suspendPostgresSecondaryIndexes, createPostgresTrustedImportSession, restoreSecondaryIndexes, analyzeImportedTables, createCommonOperationBackend, vectorSlotFromParams, buildLiveNodeCandidates, mapVectorWriteError, mapHybridSearchRow, mapContributionMaterializationRow, POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS, buildContributionInsertValues, buildContributionOnConflictSet, tableExistsFromRow, assertAdoptedDialect, commitSchemaVersionIfKindsEmpty, buildKindRemovalInsertValues, POSTGRES_KIND_REMOVAL_TIMESTAMPS, buildKindRemovalOnConflictSet, mapKindRemovalRow, buildMaterializationInsertValues, POSTGRES_INDEX_MAT_TIMESTAMPS, buildMaterializationOnConflictSet, mapMaterializationRow, vectorSlotFromDropIndexParams, vectorSlotFromCreateIndexParams, assertActiveSchemaVersion, FIND_EDGES_ENDPOINT_FIXED_PARAM_COUNT, EMBEDDING_UPSERT_PARAM_COUNT, gateFulltext, getOrCreateLru } from './chunk-7VQXLT5O.js';
|
|
2
|
+
import { pgvectorStrategy, assertPgvectorEfSearch } from './chunk-VGTJPTIC.js';
|
|
3
|
+
import { createNodeRowMapper, POSTGRES_ROW_MAPPER_CONFIG, createEdgeRowMapper, createUniqueRowMapper, createSchemaVersionRowMapper, nowIso, coerceNumericScore } from './chunk-NMWDXFPH.js';
|
|
4
|
+
import { tables, generatePostgresDDL, generatePgCreateTableSQL, createPostgresTables, postgresContributions } from './chunk-5UVRGXD3.js';
|
|
5
|
+
import { toDrizzleSql, compileQueryWithDialect } from './chunk-UV3SN74I.js';
|
|
6
|
+
import { isPostgresConcurrentDdlRaceError, chunk, isMissingTableError, isInsufficientResourcesError } from './chunk-JZUR7ZWE.js';
|
|
7
|
+
import { POSTGRES_MAX_BIND_PARAMETERS, normalizeGraphAnalyticsCapabilities, createBackendOverlay, markSerializedTransactionResource, INTERNAL_TEMPORARY_WRITES, POSTGRES_CAPABILITIES } from './chunk-AKLS3BYZ.js';
|
|
8
|
+
import { tsvectorStrategy, assertVectorSearchLimit, buildFulltextCapabilities, buildVectorCapabilities, resolveEfSearchOverride, vectorSearchFrontierTuning } from './chunk-YDFDBE6D.js';
|
|
9
|
+
import { sql, isSqlFragment, shouldForceCustomPlan, annIndexScanTypes } from './chunk-PQBQG7IM.js';
|
|
10
|
+
import { ConfigurationError, StaleVersionError, CompilerInvariantError, TransactionClosedError } from './chunk-J3WZ3FA2.js';
|
|
11
|
+
import { requireDefined } from './chunk-DYATYRY4.js';
|
|
13
12
|
import { getTableName, sql as sql$1, eq, and, isNull, inArray } from 'drizzle-orm';
|
|
14
13
|
import { PgTransaction } from 'drizzle-orm/pg-core';
|
|
15
14
|
|
|
@@ -28,8 +27,12 @@ function isPgliteClient(candidate) {
|
|
|
28
27
|
return typeof candidate === "object" && hasFunctionProperty(candidate, "query") && hasFunctionProperty(candidate, "dumpDataDir");
|
|
29
28
|
}
|
|
30
29
|
var PGLITE_MAX_BIND_PARAMETERS = 32767;
|
|
30
|
+
function getPgliteClient(db) {
|
|
31
|
+
const client = db.$client;
|
|
32
|
+
return isPgliteClient(client) ? client : void 0;
|
|
33
|
+
}
|
|
31
34
|
function isPgliteDatabase(db) {
|
|
32
|
-
return
|
|
35
|
+
return getPgliteClient(db) !== void 0;
|
|
33
36
|
}
|
|
34
37
|
function transactionSession(carrier) {
|
|
35
38
|
return carrier.session ?? carrier._?.session;
|
|
@@ -291,6 +294,7 @@ var GET_EDGES_FIXED_PARAM_COUNT = 1;
|
|
|
291
294
|
var FULLTEXT_UPSERT_PARAM_COUNT = 6;
|
|
292
295
|
var FULLTEXT_DELETE_FIXED_PARAM_COUNT = 2;
|
|
293
296
|
var CHECK_UNIQUE_BATCH_FIXED_PARAM_COUNT = 3;
|
|
297
|
+
var UNIQUE_DELETE_FIXED_PARAM_COUNT = 2;
|
|
294
298
|
var UNIQUE_INSERT_PARAM_COUNT = 6;
|
|
295
299
|
function computePostgresBatchChunkSizes(maxBindParameters) {
|
|
296
300
|
return {
|
|
@@ -330,12 +334,22 @@ function computePostgresBatchChunkSizes(maxBindParameters) {
|
|
|
330
334
|
1,
|
|
331
335
|
Math.floor(maxBindParameters / NODE_INSERT_PARAM_COUNT)
|
|
332
336
|
),
|
|
337
|
+
uniqueDeleteChunkSize: Math.max(
|
|
338
|
+
1,
|
|
339
|
+
maxBindParameters - UNIQUE_DELETE_FIXED_PARAM_COUNT
|
|
340
|
+
),
|
|
333
341
|
uniqueInsertBatchSize: Math.max(
|
|
334
342
|
1,
|
|
335
343
|
Math.floor(maxBindParameters / UNIQUE_INSERT_PARAM_COUNT)
|
|
336
344
|
)
|
|
337
345
|
};
|
|
338
346
|
}
|
|
347
|
+
var IDENTITY_TABLE_LOGICAL_NAMES = /* @__PURE__ */ new Set([
|
|
348
|
+
"identityAssertions",
|
|
349
|
+
"recordedIdentityAssertions",
|
|
350
|
+
"identityClosure",
|
|
351
|
+
"identitySeparation"
|
|
352
|
+
]);
|
|
339
353
|
var toNodeRow = createNodeRowMapper(POSTGRES_ROW_MAPPER_CONFIG);
|
|
340
354
|
var toEdgeRow = createEdgeRowMapper(POSTGRES_ROW_MAPPER_CONFIG);
|
|
341
355
|
var toUniqueRow = createUniqueRowMapper(POSTGRES_ROW_MAPPER_CONFIG);
|
|
@@ -350,6 +364,7 @@ function buildPostgresCapabilities(fulltextStrategy, vectorStrategy) {
|
|
|
350
364
|
};
|
|
351
365
|
}
|
|
352
366
|
function createPostgresBackend(db, options = {}) {
|
|
367
|
+
const serializedClient = getSerializedPostgresClient(db);
|
|
353
368
|
const tables2 = options.tables ?? tables;
|
|
354
369
|
const fulltextStrategy = options.fulltext ?? tsvectorStrategy;
|
|
355
370
|
const vectorStrategy = options.vector === false ? void 0 : options.vector ?? pgvectorStrategy;
|
|
@@ -372,12 +387,24 @@ function createPostgresBackend(db, options = {}) {
|
|
|
372
387
|
PGLITE_MAX_BIND_PARAMETERS
|
|
373
388
|
)
|
|
374
389
|
} : {};
|
|
375
|
-
const
|
|
390
|
+
const declaredCapabilities = normalizeGraphAnalyticsCapabilities({
|
|
376
391
|
...baseCapabilities,
|
|
377
392
|
...httpOnlyOverrides,
|
|
378
393
|
...options.capabilities,
|
|
379
394
|
...driverBindParameterOverrides
|
|
380
395
|
});
|
|
396
|
+
const capabilities = {
|
|
397
|
+
...declaredCapabilities,
|
|
398
|
+
contributions: {
|
|
399
|
+
supported: true,
|
|
400
|
+
probe: true,
|
|
401
|
+
rebuild: contributionRebuildSupported(
|
|
402
|
+
fulltextStrategy,
|
|
403
|
+
tables2.fulltextTableName,
|
|
404
|
+
declaredCapabilities.transactions
|
|
405
|
+
)
|
|
406
|
+
}
|
|
407
|
+
};
|
|
381
408
|
const adapterOptions = {
|
|
382
409
|
...options.prepareStatements === void 0 ? {} : { prepareStatements: options.prepareStatements },
|
|
383
410
|
...options.preparedStatementCacheMax === void 0 ? {} : { preparedStatementCacheMax: options.preparedStatementCacheMax },
|
|
@@ -391,6 +418,10 @@ function createPostgresBackend(db, options = {}) {
|
|
|
391
418
|
recordedEdges: getTableName(tables2.recordedEdges),
|
|
392
419
|
recordedClock: getTableName(tables2.recordedClock),
|
|
393
420
|
revisionOrigins: getTableName(tables2.revisionOrigins),
|
|
421
|
+
identityAssertions: getTableName(tables2.identityAssertions),
|
|
422
|
+
recordedIdentityAssertions: getTableName(tables2.recordedIdentityAssertions),
|
|
423
|
+
identityClosure: getTableName(tables2.identityClosure),
|
|
424
|
+
identitySeparation: getTableName(tables2.identitySeparation),
|
|
394
425
|
fulltext: tables2.fulltextTableName,
|
|
395
426
|
uniques: getTableName(tables2.uniques)
|
|
396
427
|
};
|
|
@@ -405,16 +436,20 @@ function createPostgresBackend(db, options = {}) {
|
|
|
405
436
|
"postgres"
|
|
406
437
|
)
|
|
407
438
|
);
|
|
408
|
-
const
|
|
439
|
+
const guardedAnalyzeTables = [
|
|
409
440
|
tableNames.recordedNodes,
|
|
410
441
|
tableNames.recordedEdges,
|
|
411
|
-
tableNames.recordedClock
|
|
442
|
+
tableNames.recordedClock,
|
|
443
|
+
tableNames.recordedIdentityAssertions,
|
|
444
|
+
tableNames.identityAssertions,
|
|
445
|
+
tableNames.identityClosure,
|
|
446
|
+
tableNames.identitySeparation
|
|
412
447
|
];
|
|
413
448
|
const operationStrategy = createPostgresOperationStrategy(
|
|
414
449
|
tables2,
|
|
415
450
|
fulltextStrategy
|
|
416
451
|
);
|
|
417
|
-
const
|
|
452
|
+
const guardedTableExists = createCachedTableExistence(
|
|
418
453
|
async (tableName) => {
|
|
419
454
|
const rows = await executionAdapter.execute(
|
|
420
455
|
operationStrategy.buildTableExists(tableName)
|
|
@@ -424,8 +459,31 @@ function createPostgresBackend(db, options = {}) {
|
|
|
424
459
|
{ cacheExisting: false }
|
|
425
460
|
);
|
|
426
461
|
const matTable = tables2.contributionMaterializations;
|
|
462
|
+
async function executeConcurrentCreateDdl(ddl) {
|
|
463
|
+
const statement = sql$1.raw(ddl);
|
|
464
|
+
try {
|
|
465
|
+
await db.execute(statement);
|
|
466
|
+
} catch (error) {
|
|
467
|
+
if (!isPostgresConcurrentDdlRaceError(error)) throw error;
|
|
468
|
+
await db.execute(statement);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
async function ensureTableWithConcurrentCreateRetry(table) {
|
|
472
|
+
await executeConcurrentCreateDdl(generatePgCreateTableSQL(table));
|
|
473
|
+
}
|
|
427
474
|
async function ensureContributionMaterializationsTableImpl() {
|
|
428
|
-
await
|
|
475
|
+
await ensureTableWithConcurrentCreateRetry(matTable);
|
|
476
|
+
}
|
|
477
|
+
function identityContributionsFor(identityTableNames) {
|
|
478
|
+
const identityTables = createPostgresTables({
|
|
479
|
+
identityAssertions: identityTableNames.identityAssertions,
|
|
480
|
+
recordedIdentityAssertions: identityTableNames.recordedIdentityAssertions,
|
|
481
|
+
identityClosure: identityTableNames.identityClosure,
|
|
482
|
+
identitySeparation: identityTableNames.identitySeparation
|
|
483
|
+
});
|
|
484
|
+
return postgresContributions(identityTables, fulltextStrategy).filter(
|
|
485
|
+
(contribution) => IDENTITY_TABLE_LOGICAL_NAMES.has(contribution.logicalName)
|
|
486
|
+
);
|
|
429
487
|
}
|
|
430
488
|
async function getContributionMaterializationRow(identity) {
|
|
431
489
|
const rows = await db.select().from(matTable).where(
|
|
@@ -492,14 +550,25 @@ function createPostgresBackend(db, options = {}) {
|
|
|
492
550
|
fulltextStrategy,
|
|
493
551
|
fulltextTableName: tables2.fulltextTableName,
|
|
494
552
|
vectorStrategy,
|
|
553
|
+
// Contribution DDL is `CREATE ... IF NOT EXISTS` reached from every
|
|
554
|
+
// booting replica, so it carries the same concurrent-create retry the
|
|
555
|
+
// other create sites use. Without it the loser's 23505 is recorded as
|
|
556
|
+
// `lastError` on the marker row and reported as a failed materialization,
|
|
557
|
+
// when the table it wanted is in fact present.
|
|
495
558
|
execDdl: async (statement) => {
|
|
496
|
-
await
|
|
559
|
+
await executeConcurrentCreateDdl(statement);
|
|
497
560
|
},
|
|
498
561
|
ensureMarkerTable: ensureContributionMaterializationsTableImpl,
|
|
499
562
|
getMarkers: getContributionMaterializationRows,
|
|
500
563
|
recordMarker: recordContributionMaterializationRow,
|
|
501
564
|
deleteMarker: deleteContributionMaterializationRow,
|
|
502
|
-
tableExists: contributionTableExists
|
|
565
|
+
tableExists: contributionTableExists,
|
|
566
|
+
// Withheld rather than wired-and-throwing when the driver cannot hold
|
|
567
|
+
// a session: the rebuild must refuse with its own typed error naming
|
|
568
|
+
// the absent fence, matching `capabilities.contributions.rebuild`.
|
|
569
|
+
...capabilities.transactions ? {
|
|
570
|
+
schemaWriteTransaction: (graphId, fn) => runSchemaWriteTransaction(graphId, (target) => fn(target))
|
|
571
|
+
} : {}
|
|
503
572
|
});
|
|
504
573
|
const operations = createPostgresOperationBackend({
|
|
505
574
|
db,
|
|
@@ -619,12 +688,32 @@ function createPostgresBackend(db, options = {}) {
|
|
|
619
688
|
async bootstrapTables() {
|
|
620
689
|
const statements = generatePostgresDDL(tables2, fulltextStrategy);
|
|
621
690
|
for (const statement of statements) {
|
|
622
|
-
await
|
|
691
|
+
await executeConcurrentCreateDdl(statement);
|
|
623
692
|
}
|
|
624
693
|
},
|
|
625
694
|
async ensureRevisionOriginsTable() {
|
|
626
|
-
await
|
|
627
|
-
|
|
695
|
+
await ensureTableWithConcurrentCreateRetry(tables2.revisionOrigins);
|
|
696
|
+
},
|
|
697
|
+
async ensureIdentityTables(identityTableNames, options2) {
|
|
698
|
+
const identityContributions = identityContributionsFor(identityTableNames);
|
|
699
|
+
const missing = [];
|
|
700
|
+
for (const contribution of identityContributions) {
|
|
701
|
+
if (!await contributionTableExists(contribution.tableName)) {
|
|
702
|
+
missing.push(contribution.logicalName);
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
if (missing.length === 0 || options2.provisionMissing) {
|
|
706
|
+
for (const contribution of identityContributions) {
|
|
707
|
+
for (const ddl of contribution.createDdl) {
|
|
708
|
+
await executeConcurrentCreateDdl(ddl);
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
return missing;
|
|
713
|
+
},
|
|
714
|
+
identityTableDdl(identityTableNames) {
|
|
715
|
+
return identityContributionsFor(identityTableNames).flatMap(
|
|
716
|
+
(contribution) => [...contribution.createDdl]
|
|
628
717
|
);
|
|
629
718
|
},
|
|
630
719
|
// Every fulltext-touching method asserts the durable marker instead
|
|
@@ -640,19 +729,13 @@ function createPostgresBackend(db, options = {}) {
|
|
|
640
729
|
await db.execute(sql$1.raw(ddl));
|
|
641
730
|
},
|
|
642
731
|
async ensureIndexMaterializationsTable() {
|
|
643
|
-
await
|
|
644
|
-
sql$1.raw(generatePgCreateTableSQL(tables2.indexMaterializations))
|
|
645
|
-
);
|
|
732
|
+
await ensureTableWithConcurrentCreateRetry(tables2.indexMaterializations);
|
|
646
733
|
const tableName = getTableName(tables2.indexMaterializations);
|
|
647
|
-
await
|
|
648
|
-
|
|
649
|
-
`ALTER TABLE "${tableName}" ADD COLUMN IF NOT EXISTS "building_since" timestamptz;`
|
|
650
|
-
)
|
|
734
|
+
await executeConcurrentCreateDdl(
|
|
735
|
+
`ALTER TABLE "${tableName}" ADD COLUMN IF NOT EXISTS "building_since" timestamptz;`
|
|
651
736
|
);
|
|
652
|
-
await
|
|
653
|
-
|
|
654
|
-
`ALTER TABLE "${tableName}" ADD COLUMN IF NOT EXISTS "claim_token" text;`
|
|
655
|
-
)
|
|
737
|
+
await executeConcurrentCreateDdl(
|
|
738
|
+
`ALTER TABLE "${tableName}" ADD COLUMN IF NOT EXISTS "claim_token" text;`
|
|
656
739
|
);
|
|
657
740
|
},
|
|
658
741
|
async claimIndexMaterialization(params) {
|
|
@@ -728,7 +811,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
728
811
|
await contributionMaterializer.assertInitialized(graphId);
|
|
729
812
|
},
|
|
730
813
|
async ensureKindRemovalsTable() {
|
|
731
|
-
await
|
|
814
|
+
await ensureTableWithConcurrentCreateRetry(tables2.kindRemovals);
|
|
732
815
|
},
|
|
733
816
|
async getPendingKindRemovals(graphId) {
|
|
734
817
|
const t = tables2.kindRemovals;
|
|
@@ -757,9 +840,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
757
840
|
});
|
|
758
841
|
},
|
|
759
842
|
async ensureReconciliationMarkersTable() {
|
|
760
|
-
await
|
|
761
|
-
sql$1.raw(generatePgCreateTableSQL(tables2.reconciliationMarkers))
|
|
762
|
-
);
|
|
843
|
+
await ensureTableWithConcurrentCreateRetry(tables2.reconciliationMarkers);
|
|
763
844
|
},
|
|
764
845
|
async ensureRuntimeContributions(graphId) {
|
|
765
846
|
await contributionMaterializer.ensureRuntimeContributions(graphId);
|
|
@@ -775,6 +856,19 @@ function createPostgresBackend(db, options = {}) {
|
|
|
775
856
|
async verifyContributions(graphId, vectorSlots) {
|
|
776
857
|
return contributionMaterializer.verifyContributions(graphId, vectorSlots);
|
|
777
858
|
},
|
|
859
|
+
async repairContributions(graphId, vectorSlots) {
|
|
860
|
+
return contributionMaterializer.repairContributions(graphId, vectorSlots);
|
|
861
|
+
},
|
|
862
|
+
async probeContributions(graphId, vectorSlots) {
|
|
863
|
+
return contributionMaterializer.probeContributions(graphId, vectorSlots);
|
|
864
|
+
},
|
|
865
|
+
async rebuildContribution(graphId, scope, repopulate) {
|
|
866
|
+
return contributionMaterializer.rebuildContribution(
|
|
867
|
+
graphId,
|
|
868
|
+
scope,
|
|
869
|
+
repopulate
|
|
870
|
+
);
|
|
871
|
+
},
|
|
778
872
|
// Vector counterparts of the runtime-contribution methods. Present
|
|
779
873
|
// only when a vector strategy is wired (omitted under `vector: false`,
|
|
780
874
|
// mirroring the embedding/search methods), so a no-vector backend
|
|
@@ -813,13 +907,13 @@ function createPostgresBackend(db, options = {}) {
|
|
|
813
907
|
await db.execute(statement);
|
|
814
908
|
}
|
|
815
909
|
const tablePresence = await Promise.all(
|
|
816
|
-
|
|
910
|
+
guardedAnalyzeTables.map(async (tableName) => ({
|
|
817
911
|
tableName,
|
|
818
|
-
exists: await
|
|
912
|
+
exists: await guardedTableExists(tableName)
|
|
819
913
|
}))
|
|
820
914
|
);
|
|
821
|
-
const
|
|
822
|
-
for (const tableName of
|
|
915
|
+
const presentGuardedTables = tablePresence.filter((entry) => entry.exists).map((entry) => entry.tableName);
|
|
916
|
+
for (const tableName of presentGuardedTables) {
|
|
823
917
|
await db.execute(
|
|
824
918
|
toDrizzleSql(
|
|
825
919
|
sql`ANALYZE (SKIP_LOCKED) ${sql.identifier(tableName)}`,
|
|
@@ -840,6 +934,12 @@ function createPostgresBackend(db, options = {}) {
|
|
|
840
934
|
(target) => commitSchemaVersionIfKindsEmpty(target, params, probes)
|
|
841
935
|
);
|
|
842
936
|
},
|
|
937
|
+
async commitSchemaVersionWithPreflight(params, preflight) {
|
|
938
|
+
return runSchemaWriteTransaction(params.graphId, async (target) => {
|
|
939
|
+
await preflight(target);
|
|
940
|
+
return target.commitSchemaVersion(params);
|
|
941
|
+
});
|
|
942
|
+
},
|
|
843
943
|
async setActiveVersion(params) {
|
|
844
944
|
await runSchemaWriteTransaction(
|
|
845
945
|
params.graphId,
|
|
@@ -898,8 +998,42 @@ function createPostgresBackend(db, options = {}) {
|
|
|
898
998
|
async close() {
|
|
899
999
|
}
|
|
900
1000
|
};
|
|
1001
|
+
if (serializedClient !== void 0) {
|
|
1002
|
+
markSerializedTransactionResource(backend, serializedClient);
|
|
1003
|
+
}
|
|
901
1004
|
return backend;
|
|
902
1005
|
}
|
|
1006
|
+
function getSerializedPostgresClient(db) {
|
|
1007
|
+
const pgliteClient = getPgliteClient(db);
|
|
1008
|
+
if (pgliteClient !== void 0) return pgliteClient;
|
|
1009
|
+
const client = db.$client;
|
|
1010
|
+
if (typeof client === "function") {
|
|
1011
|
+
return isSingleConnectionCallablePgClient(client) ? client : void 0;
|
|
1012
|
+
}
|
|
1013
|
+
if (typeof client !== "object" || client === null) return void 0;
|
|
1014
|
+
const candidate = client;
|
|
1015
|
+
if (!hasFunctionProperty(candidate, "query")) return void 0;
|
|
1016
|
+
if (isSingleConnectionPgPool(candidate)) return client;
|
|
1017
|
+
return isBarePgClient(candidate) ? client : void 0;
|
|
1018
|
+
}
|
|
1019
|
+
function isSingleConnectionPgPool(candidate) {
|
|
1020
|
+
const options = candidate["options"];
|
|
1021
|
+
if (typeof options !== "object" || options === null) return false;
|
|
1022
|
+
return options["max"] === 1;
|
|
1023
|
+
}
|
|
1024
|
+
function isSingleConnectionCallablePgClient(client) {
|
|
1025
|
+
if (client === void 0 || client === null) return false;
|
|
1026
|
+
const options = client["options"];
|
|
1027
|
+
if (!isPostgresJsClient(client)) return false;
|
|
1028
|
+
if (typeof options !== "object" || options === null) return false;
|
|
1029
|
+
return options["max"] === 1;
|
|
1030
|
+
}
|
|
1031
|
+
function isBarePgClient(candidate) {
|
|
1032
|
+
if (candidate["options"] !== void 0 || candidate["totalCount"] !== void 0 || candidate["idleCount"] !== void 0 || candidate["waitingCount"] !== void 0) {
|
|
1033
|
+
return false;
|
|
1034
|
+
}
|
|
1035
|
+
return hasFunctionProperty(candidate, "connect") && hasFunctionProperty(candidate, "end") && hasFunctionProperty(candidate, "escapeIdentifier");
|
|
1036
|
+
}
|
|
903
1037
|
function createIterativeScanProbe() {
|
|
904
1038
|
let probe;
|
|
905
1039
|
let warned = false;
|
|
@@ -958,31 +1092,24 @@ function createPostgresOperationBackend(options) {
|
|
|
958
1092
|
async function execRun(query) {
|
|
959
1093
|
await executionAdapter.execute(query);
|
|
960
1094
|
}
|
|
961
|
-
let efSearchUnsupportedWarned = false;
|
|
962
|
-
function warnEfSearchUnsupported() {
|
|
963
|
-
if (efSearchUnsupportedWarned) return;
|
|
964
|
-
efSearchUnsupportedWarned = true;
|
|
965
|
-
if (typeof console === "undefined" || typeof console.warn !== "function") {
|
|
966
|
-
return;
|
|
967
|
-
}
|
|
968
|
-
console.warn(
|
|
969
|
-
"[typegraph] efSearch (hnsw.ef_search override) was ignored: this Postgres backend has transactions disabled (e.g. drizzle-orm/neon-http), and SET LOCAL needs a transaction to scope the override. Use a transactional driver (node-postgres / neon-serverless / postgres-js) to apply efSearch."
|
|
970
|
-
);
|
|
971
|
-
}
|
|
972
1095
|
function pgvectorIterativeScanSupported() {
|
|
973
1096
|
return iterativeScanProbe.isSupported(execAll);
|
|
974
1097
|
}
|
|
975
1098
|
async function vectorSearchGucOverrides(params) {
|
|
976
1099
|
const overrides = [];
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
1100
|
+
const efSearchParameter = resolveEfSearchOverride({
|
|
1101
|
+
efSearch: params.efSearch,
|
|
1102
|
+
indexType: params.indexType,
|
|
1103
|
+
tuning: vectorSearchFrontierTuning(vectorStrategy),
|
|
1104
|
+
transactions: capabilities.transactions,
|
|
1105
|
+
dialect: "PostgreSQL",
|
|
1106
|
+
engine: vectorStrategy?.name ?? "this backend"
|
|
1107
|
+
});
|
|
1108
|
+
if (efSearchParameter !== void 0) {
|
|
1109
|
+
overrides.push({
|
|
1110
|
+
name: efSearchParameter,
|
|
1111
|
+
value: String(params.efSearch)
|
|
1112
|
+
});
|
|
986
1113
|
}
|
|
987
1114
|
if (params.indexType === "hnsw" && capabilities.transactions && await pgvectorIterativeScanSupported()) {
|
|
988
1115
|
overrides.push({ name: "hnsw.iterative_scan", value: "strict_order" });
|
|
@@ -1052,6 +1179,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1052
1179
|
execRun
|
|
1053
1180
|
},
|
|
1054
1181
|
nowIso,
|
|
1182
|
+
maxBindParameters: capabilities.maxBindParameters ?? POSTGRES_MAX_BIND_PARAMETERS,
|
|
1055
1183
|
operationStrategy,
|
|
1056
1184
|
rowMappers: {
|
|
1057
1185
|
toEdgeRow,
|
|
@@ -1130,6 +1258,21 @@ function createPostgresOperationBackend(options) {
|
|
|
1130
1258
|
await execRun(statement);
|
|
1131
1259
|
}
|
|
1132
1260
|
},
|
|
1261
|
+
async deleteEmbeddingBatch(params) {
|
|
1262
|
+
if (params.nodeIds.length === 0) return;
|
|
1263
|
+
const slot = vectorSlotFromParams(params);
|
|
1264
|
+
await contributionMaterializer.assertVectorSlot(slot);
|
|
1265
|
+
for (const nodeIds of chunk(
|
|
1266
|
+
[...new Set(params.nodeIds)],
|
|
1267
|
+
batchConfig.embeddingUpsertBatchSize
|
|
1268
|
+
)) {
|
|
1269
|
+
const statements = vectorStrategy.buildDeleteBatch(slot, {
|
|
1270
|
+
...params,
|
|
1271
|
+
nodeIds
|
|
1272
|
+
});
|
|
1273
|
+
for (const statement of statements) await execRun(statement);
|
|
1274
|
+
}
|
|
1275
|
+
},
|
|
1133
1276
|
async vectorSearch(params) {
|
|
1134
1277
|
assertVectorSearchLimit(params.limit);
|
|
1135
1278
|
assertPgvectorEfSearch(params.efSearch);
|
|
@@ -1218,10 +1361,36 @@ function createPostgresOperationBackend(options) {
|
|
|
1218
1361
|
}
|
|
1219
1362
|
} : {}
|
|
1220
1363
|
};
|
|
1364
|
+
async function lockActiveSchemaVersion(graphId) {
|
|
1365
|
+
const active = await execGet(sql$1`
|
|
1366
|
+
SELECT ${schemaVersionsTable.version} AS version
|
|
1367
|
+
FROM ${schemaVersionsTable}
|
|
1368
|
+
WHERE ${schemaVersionsTable.graphId} = ${graphId}
|
|
1369
|
+
AND ${schemaVersionsTable.isActive} = TRUE
|
|
1370
|
+
FOR SHARE
|
|
1371
|
+
`);
|
|
1372
|
+
return active?.version;
|
|
1373
|
+
}
|
|
1221
1374
|
const operationBackend = {
|
|
1222
1375
|
...commonBackend,
|
|
1223
1376
|
...executeRawMethod,
|
|
1224
1377
|
...vectorEmbeddingMethods,
|
|
1378
|
+
/**
|
|
1379
|
+
* Transaction-scoped contribution marker stamp. Present so the
|
|
1380
|
+
* destructive rebuild can commit its marker with the DDL that
|
|
1381
|
+
* produced it; without it the stamp would land outside the
|
|
1382
|
+
* transaction and could survive a rolled-back drop.
|
|
1383
|
+
*
|
|
1384
|
+
* States the row outright rather than reusing the top-level upsert,
|
|
1385
|
+
* whose `materialized_at` COALESCE preserves an earlier success so a
|
|
1386
|
+
* failed re-attempt cannot erase it. A completed rebuild replaced the
|
|
1387
|
+
* storage, so the recorded timestamp must be the rebuild's.
|
|
1388
|
+
*/
|
|
1389
|
+
async recordContributionMaterialization(params) {
|
|
1390
|
+
await execRun(
|
|
1391
|
+
operationStrategy.buildInsertContributionMaterialization(params)
|
|
1392
|
+
);
|
|
1393
|
+
},
|
|
1225
1394
|
async deleteSchemaVectorSlotContribution(slot) {
|
|
1226
1395
|
if (vectorStrategy === void 0) return;
|
|
1227
1396
|
for (const contribution of vectorStrategy.ownedTables(slot)) {
|
|
@@ -1251,18 +1420,21 @@ function createPostgresOperationBackend(options) {
|
|
|
1251
1420
|
}
|
|
1252
1421
|
);
|
|
1253
1422
|
}
|
|
1254
|
-
const
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1423
|
+
const locked = await lockActiveSchemaVersion(params.graphId);
|
|
1424
|
+
if (locked !== void 0) {
|
|
1425
|
+
assertActiveSchemaVersion(
|
|
1426
|
+
params.graphId,
|
|
1427
|
+
params.expectedVersion,
|
|
1428
|
+
locked
|
|
1429
|
+
);
|
|
1430
|
+
return;
|
|
1431
|
+
}
|
|
1432
|
+
const settled = await commonBackend.getActiveSchema(params.graphId);
|
|
1433
|
+
throw new StaleVersionError({
|
|
1434
|
+
graphId: params.graphId,
|
|
1435
|
+
expected: params.expectedVersion,
|
|
1436
|
+
actual: settled?.version ?? 0
|
|
1437
|
+
});
|
|
1266
1438
|
},
|
|
1267
1439
|
// === Vector Index Operations ===
|
|
1268
1440
|
async createVectorIndex(params) {
|
|
@@ -1413,5 +1585,5 @@ function createTransactionBackend(options) {
|
|
|
1413
1585
|
}
|
|
1414
1586
|
|
|
1415
1587
|
export { createPostgresBackend };
|
|
1416
|
-
//# sourceMappingURL=chunk-
|
|
1417
|
-
//# sourceMappingURL=chunk-
|
|
1588
|
+
//# sourceMappingURL=chunk-5763DULU.js.map
|
|
1589
|
+
//# sourceMappingURL=chunk-5763DULU.js.map
|