@nicia-ai/typegraph 0.46.0 → 0.46.2
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 +9 -9
- package/dist/backend/drizzle/indexes.d.cts +1 -1
- package/dist/backend/drizzle/indexes.d.ts +1 -1
- package/dist/backend/drizzle/indexes.js +5 -5
- package/dist/backend/index.cjs +49 -49
- package/dist/backend/index.d.cts +3 -3
- package/dist/backend/index.d.ts +3 -3
- package/dist/backend/index.js +10 -10
- package/dist/backend/postgres/index.cjs +26 -26
- package/dist/backend/postgres/index.d.cts +6 -6
- package/dist/backend/postgres/index.d.ts +6 -6
- package/dist/backend/postgres/index.js +13 -13
- package/dist/backend/postgres/pglite-store.cjs +33 -33
- 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 +29 -29
- package/dist/backend/postgres/pglite.cjs +15 -15
- package/dist/backend/postgres/pglite.d.cts +3 -3
- package/dist/backend/postgres/pglite.d.ts +3 -3
- package/dist/backend/postgres/pglite.js +14 -14
- package/dist/backend/sqlite/index.cjs +23 -23
- package/dist/backend/sqlite/index.d.cts +6 -6
- package/dist/backend/sqlite/index.d.ts +6 -6
- package/dist/backend/sqlite/index.js +11 -11
- package/dist/backend/sqlite/libsql.cjs +18 -18
- package/dist/backend/sqlite/libsql.d.cts +3 -3
- package/dist/backend/sqlite/libsql.d.ts +3 -3
- package/dist/backend/sqlite/libsql.js +13 -13
- package/dist/backend/sqlite/local-store.cjs +34 -34
- 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 +30 -30
- package/dist/backend/sqlite/local.cjs +16 -16
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +14 -14
- package/dist/{chunk-VCRRKBLN.cjs → chunk-2ZWM2RFH.cjs} +9 -9
- package/dist/{chunk-VCRRKBLN.cjs.map → chunk-2ZWM2RFH.cjs.map} +1 -1
- package/dist/{chunk-TTAITEPJ.cjs → chunk-32UETY6S.cjs} +26 -26
- package/dist/chunk-32UETY6S.cjs.map +1 -0
- package/dist/{chunk-JXA2ZP2Q.js → chunk-36LIJXWC.js} +4 -4
- package/dist/{chunk-JXA2ZP2Q.js.map → chunk-36LIJXWC.js.map} +1 -1
- package/dist/{chunk-Q7Q4WSLJ.cjs → chunk-5PDSCELM.cjs} +18 -14
- package/dist/chunk-5PDSCELM.cjs.map +1 -0
- package/dist/{chunk-775A4ZMN.js → chunk-5ZJOB5YS.js} +4 -4
- package/dist/{chunk-775A4ZMN.js.map → chunk-5ZJOB5YS.js.map} +1 -1
- package/dist/{chunk-J3WZ3FA2.js → chunk-62ZXBMSD.js} +24 -3
- package/dist/chunk-62ZXBMSD.js.map +1 -0
- package/dist/{chunk-7BQXPCGN.cjs → chunk-6BD6ZBKT.cjs} +10 -10
- package/dist/{chunk-7BQXPCGN.cjs.map → chunk-6BD6ZBKT.cjs.map} +1 -1
- package/dist/chunk-6LAXM4J2.cjs +12 -0
- package/dist/{chunk-VQH4VAWD.cjs.map → chunk-6LAXM4J2.cjs.map} +1 -1
- package/dist/{chunk-MSY7FSX4.js → chunk-72WUT4GG.js} +4 -4
- package/dist/{chunk-MSY7FSX4.js.map → chunk-72WUT4GG.js.map} +1 -1
- package/dist/chunk-73MWKDFK.cjs +12 -0
- package/dist/{chunk-A4OC4DVN.cjs.map → chunk-73MWKDFK.cjs.map} +1 -1
- package/dist/{chunk-BKCUOV7A.js → chunk-7TKNK32B.js} +5 -5
- package/dist/{chunk-BKCUOV7A.js.map → chunk-7TKNK32B.js.map} +1 -1
- package/dist/{chunk-JIVMTW7W.js → chunk-A2LJG5GM.js} +9 -9
- package/dist/{chunk-JIVMTW7W.js.map → chunk-A2LJG5GM.js.map} +1 -1
- package/dist/{chunk-XMQSEJCF.cjs → chunk-A4R3H7RU.cjs} +237 -237
- package/dist/{chunk-XMQSEJCF.cjs.map → chunk-A4R3H7RU.cjs.map} +1 -1
- package/dist/{chunk-RMQLSPA2.cjs → chunk-A7NMUYEL.cjs} +27 -27
- package/dist/{chunk-RMQLSPA2.cjs.map → chunk-A7NMUYEL.cjs.map} +1 -1
- package/dist/{chunk-U63GDNRC.cjs → chunk-AF3TWL5C.cjs} +4 -4
- package/dist/{chunk-U63GDNRC.cjs.map → chunk-AF3TWL5C.cjs.map} +1 -1
- package/dist/{chunk-XBYVV3MP.cjs → chunk-ANKOXPCC.cjs} +4 -4
- package/dist/chunk-ANKOXPCC.cjs.map +1 -0
- package/dist/{chunk-OH5E5KIO.js → chunk-AT3MLMJV.js} +10 -10
- package/dist/{chunk-OH5E5KIO.js.map → chunk-AT3MLMJV.js.map} +1 -1
- package/dist/{chunk-UV3SN74I.js → chunk-AU3IJNNP.js} +5 -5
- package/dist/{chunk-UV3SN74I.js.map → chunk-AU3IJNNP.js.map} +1 -1
- package/dist/{chunk-YAAM3M2S.cjs → chunk-BEB4OFZF.cjs} +10 -10
- package/dist/{chunk-YAAM3M2S.cjs.map → chunk-BEB4OFZF.cjs.map} +1 -1
- package/dist/{chunk-7GT72YHH.cjs → chunk-BQM5P2NO.cjs} +169 -167
- package/dist/chunk-BQM5P2NO.cjs.map +1 -0
- package/dist/{chunk-YWGVVALJ.js → chunk-BRN3RGD2.js} +3 -3
- package/dist/{chunk-YWGVVALJ.js.map → chunk-BRN3RGD2.js.map} +1 -1
- package/dist/{chunk-UDISNXDL.cjs → chunk-BZZI7B43.cjs} +47 -47
- package/dist/{chunk-UDISNXDL.cjs.map → chunk-BZZI7B43.cjs.map} +1 -1
- package/dist/{chunk-TQR4KBY2.cjs → chunk-C2ZP5YS6.cjs} +135 -133
- package/dist/chunk-C2ZP5YS6.cjs.map +1 -0
- package/dist/{chunk-PNN7RHVR.cjs → chunk-C4DYN2SD.cjs} +48 -48
- package/dist/{chunk-PNN7RHVR.cjs.map → chunk-C4DYN2SD.cjs.map} +1 -1
- package/dist/{chunk-XDF2UPEQ.cjs → chunk-C6KE2HSQ.cjs} +1364 -1311
- package/dist/chunk-C6KE2HSQ.cjs.map +1 -0
- package/dist/{chunk-LBJKZXDE.cjs → chunk-D6GCNNMK.cjs} +10 -10
- package/dist/{chunk-LBJKZXDE.cjs.map → chunk-D6GCNNMK.cjs.map} +1 -1
- package/dist/{chunk-JZUR7ZWE.js → chunk-DSAWGCMP.js} +3 -3
- package/dist/{chunk-JZUR7ZWE.js.map → chunk-DSAWGCMP.js.map} +1 -1
- package/dist/{chunk-U5SON7R2.cjs → chunk-DYPRZ53S.cjs} +27 -27
- package/dist/{chunk-U5SON7R2.cjs.map → chunk-DYPRZ53S.cjs.map} +1 -1
- package/dist/{chunk-YVWGEQJE.cjs → chunk-E4OSGBCM.cjs} +139 -133
- package/dist/chunk-E4OSGBCM.cjs.map +1 -0
- package/dist/{chunk-YDFDBE6D.js → chunk-EAMVXR5B.js} +4 -4
- package/dist/{chunk-YDFDBE6D.js.map → chunk-EAMVXR5B.js.map} +1 -1
- package/dist/{chunk-NQ6BRJBE.js → chunk-EDHV4CBU.js} +8 -8
- package/dist/{chunk-NQ6BRJBE.js.map → chunk-EDHV4CBU.js.map} +1 -1
- package/dist/{chunk-DCQVHAYQ.js → chunk-EDJDDY6H.js} +4 -4
- package/dist/{chunk-DCQVHAYQ.js.map → chunk-EDJDDY6H.js.map} +1 -1
- package/dist/{chunk-5262ZMTR.js → chunk-EJSYWAEV.js} +5 -5
- package/dist/{chunk-5262ZMTR.js.map → chunk-EJSYWAEV.js.map} +1 -1
- package/dist/{chunk-N3257XE6.cjs → chunk-F36KZDFX.cjs} +91 -91
- package/dist/{chunk-N3257XE6.cjs.map → chunk-F36KZDFX.cjs.map} +1 -1
- package/dist/{chunk-AKLS3BYZ.js → chunk-FA6Z7B5L.js} +3 -3
- package/dist/chunk-FA6Z7B5L.js.map +1 -0
- package/dist/{chunk-ASTI57H3.js → chunk-FCIZNUW5.js} +3 -3
- package/dist/{chunk-ASTI57H3.js.map → chunk-FCIZNUW5.js.map} +1 -1
- package/dist/{chunk-CBTIUB76.js → chunk-FSLTU57P.js} +3 -3
- package/dist/{chunk-CBTIUB76.js.map → chunk-FSLTU57P.js.map} +1 -1
- package/dist/{chunk-2LG2XB2M.js → chunk-FXNHZFZV.js} +3 -3
- package/dist/{chunk-2LG2XB2M.js.map → chunk-FXNHZFZV.js.map} +1 -1
- package/dist/{chunk-BSFJMMV3.cjs → chunk-GVAMRRZR.cjs} +4 -4
- package/dist/{chunk-BSFJMMV3.cjs.map → chunk-GVAMRRZR.cjs.map} +1 -1
- package/dist/{chunk-CNV4TXJG.js → chunk-GWUWRZXW.js} +3 -3
- package/dist/{chunk-CNV4TXJG.js.map → chunk-GWUWRZXW.js.map} +1 -1
- package/dist/{chunk-C23WSN5E.js → chunk-GWXXHOLU.js} +20 -14
- package/dist/chunk-GWXXHOLU.js.map +1 -0
- package/dist/{chunk-ONU3HIED.cjs → chunk-HNYLMPQQ.cjs} +68 -68
- package/dist/{chunk-ONU3HIED.cjs.map → chunk-HNYLMPQQ.cjs.map} +1 -1
- package/dist/{chunk-NMWDXFPH.js → chunk-IHRDX7K6.js} +4 -4
- package/dist/{chunk-NMWDXFPH.js.map → chunk-IHRDX7K6.js.map} +1 -1
- package/dist/{chunk-VGTJPTIC.js → chunk-JCNTKRAK.js} +5 -5
- package/dist/{chunk-VGTJPTIC.js.map → chunk-JCNTKRAK.js.map} +1 -1
- package/dist/{chunk-MXJDTH5B.cjs → chunk-JL5UEBWT.cjs} +45 -45
- package/dist/{chunk-MXJDTH5B.cjs.map → chunk-JL5UEBWT.cjs.map} +1 -1
- package/dist/{chunk-QLRESYPU.js → chunk-KA4L2NZ3.js} +14 -14
- package/dist/{chunk-QLRESYPU.js.map → chunk-KA4L2NZ3.js.map} +1 -1
- package/dist/{chunk-NI72YOJB.cjs → chunk-KCH7WQA5.cjs} +24 -2
- package/dist/chunk-KCH7WQA5.cjs.map +1 -0
- package/dist/{chunk-2NA5DYLO.cjs → chunk-KOAI3KIV.cjs} +4 -4
- package/dist/{chunk-2NA5DYLO.cjs.map → chunk-KOAI3KIV.cjs.map} +1 -1
- package/dist/{chunk-7VQXLT5O.js → chunk-KXSMF6PL.js} +101 -25
- package/dist/chunk-KXSMF6PL.js.map +1 -0
- package/dist/{chunk-WEVQJ5LH.js → chunk-LHYSY6SE.js} +6 -6
- package/dist/chunk-LHYSY6SE.js.map +1 -0
- package/dist/{chunk-WDGA7IYB.js → chunk-LNIWCQR4.js} +3 -3
- package/dist/{chunk-WDGA7IYB.js.map → chunk-LNIWCQR4.js.map} +1 -1
- package/dist/{chunk-XNSI2FJO.cjs → chunk-N3QTGPC7.cjs} +99 -99
- package/dist/{chunk-XNSI2FJO.cjs.map → chunk-N3QTGPC7.cjs.map} +1 -1
- package/dist/{chunk-K5ELX2GT.js → chunk-OZJCH7ZS.js} +3 -3
- package/dist/{chunk-K5ELX2GT.js.map → chunk-OZJCH7ZS.js.map} +1 -1
- package/dist/{chunk-62ZP23AW.cjs → chunk-PYKF7UIL.cjs} +13 -13
- package/dist/{chunk-62ZP23AW.cjs.map → chunk-PYKF7UIL.cjs.map} +1 -1
- package/dist/{chunk-PQBQG7IM.js → chunk-QOJ2L2AD.js} +3 -3
- package/dist/{chunk-PQBQG7IM.js.map → chunk-QOJ2L2AD.js.map} +1 -1
- package/dist/{chunk-XNLIZYRZ.cjs → chunk-QPOQX2DI.cjs} +235 -235
- package/dist/{chunk-XNLIZYRZ.cjs.map → chunk-QPOQX2DI.cjs.map} +1 -1
- package/dist/{chunk-NFCVHQ5P.cjs → chunk-QU7QLJA4.cjs} +26 -26
- package/dist/{chunk-NFCVHQ5P.cjs.map → chunk-QU7QLJA4.cjs.map} +1 -1
- package/dist/{chunk-DLNROMQ7.js → chunk-R7EWHKID.js} +7 -4
- package/dist/chunk-R7EWHKID.js.map +1 -0
- package/dist/{chunk-HFHTMECK.js → chunk-RFDEYLIK.js} +7 -7
- package/dist/{chunk-HFHTMECK.js.map → chunk-RFDEYLIK.js.map} +1 -1
- package/dist/{chunk-MUK4BU7K.cjs → chunk-RHDOAQCT.cjs} +200 -124
- package/dist/chunk-RHDOAQCT.cjs.map +1 -0
- package/dist/{chunk-YBFHZUXX.js → chunk-S3G5VLSW.js} +6 -6
- package/dist/{chunk-YBFHZUXX.js.map → chunk-S3G5VLSW.js.map} +1 -1
- package/dist/{chunk-M4BDU5RX.cjs → chunk-S7WIRFNS.cjs} +12 -12
- package/dist/{chunk-M4BDU5RX.cjs.map → chunk-S7WIRFNS.cjs.map} +1 -1
- package/dist/{chunk-T4XNKYXB.js → chunk-SXWLLQ3D.js} +4 -4
- package/dist/{chunk-T4XNKYXB.js.map → chunk-SXWLLQ3D.js.map} +1 -1
- package/dist/{chunk-NK5Q7UNE.cjs → chunk-TCT66A7N.cjs} +10 -10
- package/dist/{chunk-NK5Q7UNE.cjs.map → chunk-TCT66A7N.cjs.map} +1 -1
- package/dist/{chunk-3DHZCOT7.cjs → chunk-UTVQPZPN.cjs} +20 -20
- package/dist/{chunk-3DHZCOT7.cjs.map → chunk-UTVQPZPN.cjs.map} +1 -1
- package/dist/{chunk-CXBHOOIQ.cjs → chunk-WA64ZSCA.cjs} +11 -11
- package/dist/{chunk-CXBHOOIQ.cjs.map → chunk-WA64ZSCA.cjs.map} +1 -1
- package/dist/{chunk-QWX5YA3K.js → chunk-WEJHA7AD.js} +18 -16
- package/dist/chunk-WEJHA7AD.js.map +1 -0
- package/dist/{chunk-5UVRGXD3.js → chunk-WHS2Y43J.js} +5 -5
- package/dist/{chunk-5UVRGXD3.js.map → chunk-WHS2Y43J.js.map} +1 -1
- package/dist/{chunk-I5MOXA4H.js → chunk-WMKEGJG4.js} +3 -3
- package/dist/{chunk-I5MOXA4H.js.map → chunk-WMKEGJG4.js.map} +1 -1
- package/dist/{chunk-5763DULU.js → chunk-WYFB7BN3.js} +16 -14
- package/dist/chunk-WYFB7BN3.js.map +1 -0
- package/dist/{chunk-XQSCL77R.cjs → chunk-XBHRKLZU.cjs} +4 -4
- package/dist/{chunk-XQSCL77R.cjs.map → chunk-XBHRKLZU.cjs.map} +1 -1
- package/dist/{chunk-7Z5OR7KO.js → chunk-YQ4JONWE.js} +102 -49
- package/dist/chunk-YQ4JONWE.js.map +1 -0
- package/dist/{chunk-RJS7DECT.js → chunk-Z43KWLZF.js} +8 -8
- package/dist/{chunk-RJS7DECT.js.map → chunk-Z43KWLZF.js.map} +1 -1
- package/dist/{chunk-E4WNQBEF.cjs → chunk-ZBVZ7HXD.cjs} +12 -12
- package/dist/{chunk-E4WNQBEF.cjs.map → chunk-ZBVZ7HXD.cjs.map} +1 -1
- package/dist/{chunk-4UGOKMI5.cjs → chunk-ZHOAZD7Q.cjs} +161 -161
- package/dist/{chunk-4UGOKMI5.cjs.map → chunk-ZHOAZD7Q.cjs.map} +1 -1
- package/dist/{chunk-XCAGZAKP.cjs → chunk-ZIH42CRX.cjs} +7 -7
- package/dist/{chunk-XCAGZAKP.cjs.map → chunk-ZIH42CRX.cjs.map} +1 -1
- package/dist/core/index.cjs +27 -27
- package/dist/core/index.d.cts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +7 -7
- package/dist/{ddl-BJcOp4WZ.d.cts → ddl-mE07h_EM.d.cts} +3 -3
- package/dist/{ddl-BXfGHbPN.d.ts → ddl-opIn8DfX.d.ts} +3 -3
- package/dist/graph-extension/index.cjs +20 -20
- package/dist/graph-extension/index.d.cts +4 -4
- package/dist/graph-extension/index.d.ts +4 -4
- package/dist/graph-extension/index.js +4 -4
- package/dist/graph-merge/index.cjs +248 -248
- package/dist/graph-merge/index.d.cts +8 -8
- package/dist/graph-merge/index.d.ts +8 -8
- package/dist/graph-merge/index.js +24 -24
- package/dist/{index-DxaYCv8Y.d.cts → index-Deyu8IXL.d.ts} +20 -3
- package/dist/{index-BSHvKfok.d.ts → index-DrRS51Ld.d.cts} +20 -3
- package/dist/index.cjs +219 -215
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +34 -34
- package/dist/indexes/index.cjs +13 -13
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/indexes/index.js +6 -6
- package/dist/interchange/index.cjs +52 -52
- package/dist/interchange/index.d.cts +7 -7
- package/dist/interchange/index.d.ts +7 -7
- package/dist/interchange/index.js +16 -16
- package/dist/{manager-CfZAimti.d.ts → manager-DX983gJ0.d.ts} +2 -2
- package/dist/{manager-HGk6E_HW.d.cts → manager-ptr3JLRP.d.cts} +2 -2
- package/dist/{materialize-indexes-6A7dWGtb.d.cts → materialize-indexes-BXz77YqO.d.cts} +1 -1
- package/dist/{materialize-indexes-BMJP6Tms.d.ts → materialize-indexes-CpXoggWU.d.ts} +1 -1
- package/dist/{postgres-DFYWENdR.d.cts → postgres-DwgEXSPI.d.cts} +1 -1
- package/dist/{postgres-e7a9TdvR.d.ts → postgres-QdOMHTBz.d.ts} +1 -1
- package/dist/profiler/index.d.cts +9 -9
- package/dist/profiler/index.d.ts +9 -9
- package/dist/provenance/index.cjs +42 -42
- package/dist/provenance/index.d.cts +7 -7
- package/dist/provenance/index.d.ts +7 -7
- package/dist/provenance/index.js +9 -9
- package/dist/schema/index.cjs +44 -44
- package/dist/schema/index.d.cts +6 -6
- package/dist/schema/index.d.ts +6 -6
- package/dist/schema/index.js +17 -17
- package/dist/{searchable-9OQoPuRs.d.ts → searchable-BOUuA83f.d.ts} +1 -1
- package/dist/{searchable-CIje5XYD.d.cts → searchable-BrUh0pdc.d.cts} +1 -1
- package/dist/{sqlite-DerU5tc7.d.ts → sqlite-BfYcV61E.d.cts} +1 -1
- package/dist/{sqlite-DitnISa9.d.cts → sqlite-DK40XVR1.d.ts} +1 -1
- package/dist/{store-DawaWWjJ.d.ts → store-Bo1psfVZ.d.ts} +27 -8
- package/dist/{store-RwTJx8LX.d.cts → store-FTqBpuJD.d.cts} +27 -8
- package/dist/{temporal-Bn-Fi8FJ.d.cts → temporal-CXewwLTB.d.cts} +1 -1
- package/dist/{temporal-BtM4UALv.d.ts → temporal-DPtn0HOu.d.ts} +1 -1
- package/dist/{types-KFfk-8Ah.d.ts → types-CeT7xM4M.d.ts} +1 -1
- package/dist/{types-HkveCCx0.d.cts → types-Du78EvpN.d.cts} +7 -6
- package/dist/{types-HkveCCx0.d.ts → types-Du78EvpN.d.ts} +7 -6
- package/dist/{types-CoIx8HX5.d.cts → types-XR1nHERK.d.cts} +1 -1
- package/dist/{where--fk7_0kv.d.cts → where-CJsp-YUf.d.cts} +1 -1
- package/dist/{where-ws5hf-Ov.d.ts → where-CMbFiWwp.d.ts} +1 -1
- package/package.json +3 -3
- package/dist/chunk-5763DULU.js.map +0 -1
- package/dist/chunk-7GT72YHH.cjs.map +0 -1
- package/dist/chunk-7VQXLT5O.js.map +0 -1
- package/dist/chunk-7Z5OR7KO.js.map +0 -1
- package/dist/chunk-A4OC4DVN.cjs +0 -12
- package/dist/chunk-AKLS3BYZ.js.map +0 -1
- package/dist/chunk-C23WSN5E.js.map +0 -1
- package/dist/chunk-DLNROMQ7.js.map +0 -1
- package/dist/chunk-J3WZ3FA2.js.map +0 -1
- package/dist/chunk-MUK4BU7K.cjs.map +0 -1
- package/dist/chunk-NI72YOJB.cjs.map +0 -1
- package/dist/chunk-Q7Q4WSLJ.cjs.map +0 -1
- package/dist/chunk-QWX5YA3K.js.map +0 -1
- package/dist/chunk-TQR4KBY2.cjs.map +0 -1
- package/dist/chunk-TTAITEPJ.cjs.map +0 -1
- package/dist/chunk-VQH4VAWD.cjs +0 -12
- package/dist/chunk-WEVQJ5LH.js.map +0 -1
- package/dist/chunk-XBYVV3MP.cjs.map +0 -1
- package/dist/chunk-XDF2UPEQ.cjs.map +0 -1
- package/dist/chunk-YVWGEQJE.cjs.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
3
|
+
var chunkRHDOAQCT_cjs = require('./chunk-RHDOAQCT.cjs');
|
|
4
|
+
var chunkJL5UEBWT_cjs = require('./chunk-JL5UEBWT.cjs');
|
|
5
|
+
var chunkBEB4OFZF_cjs = require('./chunk-BEB4OFZF.cjs');
|
|
6
|
+
var chunkA7NMUYEL_cjs = require('./chunk-A7NMUYEL.cjs');
|
|
7
|
+
var chunkDYPRZ53S_cjs = require('./chunk-DYPRZ53S.cjs');
|
|
8
|
+
var chunkGVAMRRZR_cjs = require('./chunk-GVAMRRZR.cjs');
|
|
9
|
+
var chunkANKOXPCC_cjs = require('./chunk-ANKOXPCC.cjs');
|
|
10
|
+
var chunkZHOAZD7Q_cjs = require('./chunk-ZHOAZD7Q.cjs');
|
|
11
|
+
var chunk2ZWM2RFH_cjs = require('./chunk-2ZWM2RFH.cjs');
|
|
12
|
+
var chunkKCH7WQA5_cjs = require('./chunk-KCH7WQA5.cjs');
|
|
13
13
|
var chunkN66HCGCY_cjs = require('./chunk-N66HCGCY.cjs');
|
|
14
14
|
var drizzleOrm = require('drizzle-orm');
|
|
15
15
|
var pgCore = require('drizzle-orm/pg-core');
|
|
@@ -53,7 +53,7 @@ var DEFAULT_POSTGRES_STATEMENT_CACHE_MAX = 256;
|
|
|
53
53
|
var STATEMENT_NAME_CACHE = /* @__PURE__ */ new Map();
|
|
54
54
|
var nextStatementId = 0;
|
|
55
55
|
function statementNameFor(sqlText, cacheMax) {
|
|
56
|
-
return
|
|
56
|
+
return chunkRHDOAQCT_cjs.getOrCreateLru(STATEMENT_NAME_CACHE, sqlText, cacheMax, () => {
|
|
57
57
|
const name = `tg_${nextStatementId}`;
|
|
58
58
|
nextStatementId += 1;
|
|
59
59
|
return name;
|
|
@@ -167,7 +167,7 @@ function createPostgresExecutionAdapter(db, options = {}) {
|
|
|
167
167
|
options.useTransactionClient ?? false
|
|
168
168
|
);
|
|
169
169
|
function compile(query) {
|
|
170
|
-
return
|
|
170
|
+
return chunkDYPRZ53S_cjs.compileQueryWithDialect(db, query, "PostgreSQL");
|
|
171
171
|
}
|
|
172
172
|
function assertCompiledWithinBindParameterLimit(compiledQuery) {
|
|
173
173
|
assertWithinBindParameterLimit(
|
|
@@ -182,7 +182,7 @@ function createPostgresExecutionAdapter(db, options = {}) {
|
|
|
182
182
|
assertCompiledWithinBindParameterLimit(compile(query));
|
|
183
183
|
return executeDrizzleQuery(
|
|
184
184
|
db,
|
|
185
|
-
|
|
185
|
+
chunk2ZWM2RFH_cjs.isSqlFragment(query) ? chunkDYPRZ53S_cjs.toDrizzleSql(query, "postgres") : query
|
|
186
186
|
);
|
|
187
187
|
}
|
|
188
188
|
};
|
|
@@ -201,7 +201,7 @@ function createPostgresExecutionAdapter(db, options = {}) {
|
|
|
201
201
|
async execute(query) {
|
|
202
202
|
const compiled = compile(query);
|
|
203
203
|
assertCompiledWithinBindParameterLimit(compiled);
|
|
204
|
-
if (
|
|
204
|
+
if (chunk2ZWM2RFH_cjs.isSqlFragment(query) && chunk2ZWM2RFH_cjs.shouldForceCustomPlan(query)) {
|
|
205
205
|
const result = await pgQueryClient.queryUnnamed(
|
|
206
206
|
compiled.sql,
|
|
207
207
|
compiled.params
|
|
@@ -224,7 +224,7 @@ function assertWithinBindParameterLimit(parameterCount, maxBindParameters) {
|
|
|
224
224
|
if (maxBindParameters === void 0 || parameterCount <= maxBindParameters) {
|
|
225
225
|
return;
|
|
226
226
|
}
|
|
227
|
-
throw new
|
|
227
|
+
throw new chunkKCH7WQA5_cjs.ConfigurationError(
|
|
228
228
|
`PostgreSQL statement uses ${parameterCount} bound parameters, exceeding this backend's limit of ${maxBindParameters}.`,
|
|
229
229
|
{
|
|
230
230
|
capability: "maxBindParameters",
|
|
@@ -245,7 +245,7 @@ function createStatementQueue() {
|
|
|
245
245
|
let closed = false;
|
|
246
246
|
return {
|
|
247
247
|
enqueue(task) {
|
|
248
|
-
if (closed) return Promise.reject(new
|
|
248
|
+
if (closed) return Promise.reject(new chunkKCH7WQA5_cjs.TransactionClosedError());
|
|
249
249
|
const result = tail.then(() => task());
|
|
250
250
|
tail = result.then(ignoreOutcome, ignoreOutcome);
|
|
251
251
|
return result;
|
|
@@ -310,11 +310,11 @@ function computePostgresBatchChunkSizes(maxBindParameters) {
|
|
|
310
310
|
),
|
|
311
311
|
embeddingUpsertBatchSize: Math.max(
|
|
312
312
|
1,
|
|
313
|
-
Math.floor(maxBindParameters /
|
|
313
|
+
Math.floor(maxBindParameters / chunkRHDOAQCT_cjs.EMBEDDING_UPSERT_PARAM_COUNT)
|
|
314
314
|
),
|
|
315
315
|
findEdgesEndpointChunkSize: Math.max(
|
|
316
316
|
1,
|
|
317
|
-
maxBindParameters -
|
|
317
|
+
maxBindParameters - chunkRHDOAQCT_cjs.FIND_EDGES_ENDPOINT_FIXED_PARAM_COUNT
|
|
318
318
|
),
|
|
319
319
|
fulltextDeleteChunkSize: Math.max(
|
|
320
320
|
1,
|
|
@@ -352,24 +352,24 @@ var IDENTITY_TABLE_LOGICAL_NAMES = /* @__PURE__ */ new Set([
|
|
|
352
352
|
"identityClosure",
|
|
353
353
|
"identitySeparation"
|
|
354
354
|
]);
|
|
355
|
-
var toNodeRow =
|
|
356
|
-
var toEdgeRow =
|
|
357
|
-
var toUniqueRow =
|
|
358
|
-
var toSchemaVersionRow =
|
|
359
|
-
|
|
355
|
+
var toNodeRow = chunkBEB4OFZF_cjs.createNodeRowMapper(chunkBEB4OFZF_cjs.POSTGRES_ROW_MAPPER_CONFIG);
|
|
356
|
+
var toEdgeRow = chunkBEB4OFZF_cjs.createEdgeRowMapper(chunkBEB4OFZF_cjs.POSTGRES_ROW_MAPPER_CONFIG);
|
|
357
|
+
var toUniqueRow = chunkBEB4OFZF_cjs.createUniqueRowMapper(chunkBEB4OFZF_cjs.POSTGRES_ROW_MAPPER_CONFIG);
|
|
358
|
+
var toSchemaVersionRow = chunkBEB4OFZF_cjs.createSchemaVersionRowMapper(
|
|
359
|
+
chunkBEB4OFZF_cjs.POSTGRES_ROW_MAPPER_CONFIG
|
|
360
360
|
);
|
|
361
361
|
function buildPostgresCapabilities(fulltextStrategy, vectorStrategy) {
|
|
362
362
|
return {
|
|
363
|
-
...
|
|
364
|
-
...vectorStrategy === void 0 ? {} : { vector:
|
|
365
|
-
fulltext:
|
|
363
|
+
...chunkANKOXPCC_cjs.POSTGRES_CAPABILITIES,
|
|
364
|
+
...vectorStrategy === void 0 ? {} : { vector: chunkZHOAZD7Q_cjs.buildVectorCapabilities(vectorStrategy) },
|
|
365
|
+
fulltext: chunkZHOAZD7Q_cjs.buildFulltextCapabilities(fulltextStrategy)
|
|
366
366
|
};
|
|
367
367
|
}
|
|
368
368
|
function createPostgresBackend(db, options = {}) {
|
|
369
369
|
const serializedClient = getSerializedPostgresClient(db);
|
|
370
|
-
const tables2 = options.tables ??
|
|
371
|
-
const fulltextStrategy = options.fulltext ??
|
|
372
|
-
const vectorStrategy = options.vector === false ? void 0 : options.vector ??
|
|
370
|
+
const tables2 = options.tables ?? chunkA7NMUYEL_cjs.tables;
|
|
371
|
+
const fulltextStrategy = options.fulltext ?? chunkZHOAZD7Q_cjs.tsvectorStrategy;
|
|
372
|
+
const vectorStrategy = options.vector === false ? void 0 : options.vector ?? chunkJL5UEBWT_cjs.pgvectorStrategy;
|
|
373
373
|
const iterativeScanProbe = createIterativeScanProbe();
|
|
374
374
|
const baseCapabilities = buildPostgresCapabilities(
|
|
375
375
|
fulltextStrategy,
|
|
@@ -382,14 +382,14 @@ function createPostgresBackend(db, options = {}) {
|
|
|
382
382
|
supported: false
|
|
383
383
|
}
|
|
384
384
|
} : {};
|
|
385
|
-
const configuredMaxBindParameters = options.capabilities?.maxBindParameters ??
|
|
385
|
+
const configuredMaxBindParameters = options.capabilities?.maxBindParameters ?? chunkANKOXPCC_cjs.POSTGRES_MAX_BIND_PARAMETERS;
|
|
386
386
|
const driverBindParameterOverrides = isPgliteDatabase(db) ? {
|
|
387
387
|
maxBindParameters: Math.min(
|
|
388
388
|
configuredMaxBindParameters,
|
|
389
389
|
PGLITE_MAX_BIND_PARAMETERS
|
|
390
390
|
)
|
|
391
391
|
} : {};
|
|
392
|
-
const declaredCapabilities =
|
|
392
|
+
const declaredCapabilities = chunkANKOXPCC_cjs.normalizeGraphAnalyticsCapabilities({
|
|
393
393
|
...baseCapabilities,
|
|
394
394
|
...httpOnlyOverrides,
|
|
395
395
|
...options.capabilities,
|
|
@@ -400,7 +400,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
400
400
|
contributions: {
|
|
401
401
|
supported: true,
|
|
402
402
|
probe: true,
|
|
403
|
-
rebuild:
|
|
403
|
+
rebuild: chunkRHDOAQCT_cjs.contributionRebuildSupported(
|
|
404
404
|
fulltextStrategy,
|
|
405
405
|
tables2.fulltextTableName,
|
|
406
406
|
declaredCapabilities.transactions
|
|
@@ -410,7 +410,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
410
410
|
const adapterOptions = {
|
|
411
411
|
...options.prepareStatements === void 0 ? {} : { prepareStatements: options.prepareStatements },
|
|
412
412
|
...options.preparedStatementCacheMax === void 0 ? {} : { preparedStatementCacheMax: options.preparedStatementCacheMax },
|
|
413
|
-
maxBindParameters: capabilities.maxBindParameters ??
|
|
413
|
+
maxBindParameters: capabilities.maxBindParameters ?? chunkANKOXPCC_cjs.POSTGRES_MAX_BIND_PARAMETERS
|
|
414
414
|
};
|
|
415
415
|
const executionAdapter = createPostgresExecutionAdapter(db, adapterOptions);
|
|
416
416
|
const tableNames = {
|
|
@@ -433,8 +433,8 @@ function createPostgresBackend(db, options = {}) {
|
|
|
433
433
|
drizzleOrm.getTableName(tables2.uniques),
|
|
434
434
|
tableNames.fulltext
|
|
435
435
|
].map(
|
|
436
|
-
(name) =>
|
|
437
|
-
|
|
436
|
+
(name) => chunkDYPRZ53S_cjs.toDrizzleSql(
|
|
437
|
+
chunk2ZWM2RFH_cjs.sql`ANALYZE (SKIP_LOCKED) ${chunk2ZWM2RFH_cjs.sql.identifier(name)}`,
|
|
438
438
|
"postgres"
|
|
439
439
|
)
|
|
440
440
|
);
|
|
@@ -447,11 +447,11 @@ function createPostgresBackend(db, options = {}) {
|
|
|
447
447
|
tableNames.identityClosure,
|
|
448
448
|
tableNames.identitySeparation
|
|
449
449
|
];
|
|
450
|
-
const operationStrategy =
|
|
450
|
+
const operationStrategy = chunkRHDOAQCT_cjs.createPostgresOperationStrategy(
|
|
451
451
|
tables2,
|
|
452
452
|
fulltextStrategy
|
|
453
453
|
);
|
|
454
|
-
const guardedTableExists =
|
|
454
|
+
const guardedTableExists = chunkRHDOAQCT_cjs.createCachedTableExistence(
|
|
455
455
|
async (tableName) => {
|
|
456
456
|
const rows = await executionAdapter.execute(
|
|
457
457
|
operationStrategy.buildTableExists(tableName)
|
|
@@ -466,24 +466,24 @@ function createPostgresBackend(db, options = {}) {
|
|
|
466
466
|
try {
|
|
467
467
|
await db.execute(statement);
|
|
468
468
|
} catch (error) {
|
|
469
|
-
if (!
|
|
469
|
+
if (!chunkGVAMRRZR_cjs.isPostgresConcurrentDdlRaceError(error)) throw error;
|
|
470
470
|
await db.execute(statement);
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
473
|
async function ensureTableWithConcurrentCreateRetry(table) {
|
|
474
|
-
await executeConcurrentCreateDdl(
|
|
474
|
+
await executeConcurrentCreateDdl(chunkA7NMUYEL_cjs.generatePgCreateTableSQL(table));
|
|
475
475
|
}
|
|
476
476
|
async function ensureContributionMaterializationsTableImpl() {
|
|
477
477
|
await ensureTableWithConcurrentCreateRetry(matTable);
|
|
478
478
|
}
|
|
479
479
|
function identityContributionsFor(identityTableNames) {
|
|
480
|
-
const identityTables =
|
|
480
|
+
const identityTables = chunkA7NMUYEL_cjs.createPostgresTables({
|
|
481
481
|
identityAssertions: identityTableNames.identityAssertions,
|
|
482
482
|
recordedIdentityAssertions: identityTableNames.recordedIdentityAssertions,
|
|
483
483
|
identityClosure: identityTableNames.identityClosure,
|
|
484
484
|
identitySeparation: identityTableNames.identitySeparation
|
|
485
485
|
});
|
|
486
|
-
return
|
|
486
|
+
return chunkA7NMUYEL_cjs.postgresContributions(identityTables, fulltextStrategy).filter(
|
|
487
487
|
(contribution) => IDENTITY_TABLE_LOGICAL_NAMES.has(contribution.logicalName)
|
|
488
488
|
);
|
|
489
489
|
}
|
|
@@ -498,25 +498,25 @@ function createPostgresBackend(db, options = {}) {
|
|
|
498
498
|
);
|
|
499
499
|
const row = rows[0];
|
|
500
500
|
if (row === void 0) return void 0;
|
|
501
|
-
return
|
|
501
|
+
return chunkRHDOAQCT_cjs.mapContributionMaterializationRow(
|
|
502
502
|
row,
|
|
503
|
-
|
|
503
|
+
chunkRHDOAQCT_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.decode
|
|
504
504
|
);
|
|
505
505
|
}
|
|
506
506
|
async function getContributionMaterializationRows(graphId) {
|
|
507
507
|
const rows = await db.select().from(matTable).where(drizzleOrm.eq(matTable.graphId, graphId));
|
|
508
508
|
return rows.map(
|
|
509
|
-
(row) =>
|
|
509
|
+
(row) => chunkRHDOAQCT_cjs.mapContributionMaterializationRow(
|
|
510
510
|
row,
|
|
511
|
-
|
|
511
|
+
chunkRHDOAQCT_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.decode
|
|
512
512
|
)
|
|
513
513
|
);
|
|
514
514
|
}
|
|
515
515
|
async function recordContributionMaterializationRow(params) {
|
|
516
516
|
await db.insert(matTable).values(
|
|
517
|
-
|
|
517
|
+
chunkRHDOAQCT_cjs.buildContributionInsertValues(
|
|
518
518
|
params,
|
|
519
|
-
|
|
519
|
+
chunkRHDOAQCT_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.encode
|
|
520
520
|
)
|
|
521
521
|
).onConflictDoUpdate({
|
|
522
522
|
target: [
|
|
@@ -525,7 +525,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
525
525
|
matTable.owner,
|
|
526
526
|
matTable.tableName
|
|
527
527
|
],
|
|
528
|
-
set:
|
|
528
|
+
set: chunkRHDOAQCT_cjs.buildContributionOnConflictSet(
|
|
529
529
|
matTable.materializedAt,
|
|
530
530
|
params.materializedAt
|
|
531
531
|
)
|
|
@@ -545,9 +545,9 @@ function createPostgresBackend(db, options = {}) {
|
|
|
545
545
|
const rows = await executionAdapter.execute(
|
|
546
546
|
operationStrategy.buildTableExists(tableName)
|
|
547
547
|
);
|
|
548
|
-
return
|
|
548
|
+
return chunkRHDOAQCT_cjs.tableExistsFromRow(rows[0]);
|
|
549
549
|
}
|
|
550
|
-
const contributionMaterializer =
|
|
550
|
+
const contributionMaterializer = chunkRHDOAQCT_cjs.createContributionMaterializer({
|
|
551
551
|
dialect: "postgres",
|
|
552
552
|
fulltextStrategy,
|
|
553
553
|
fulltextTableName: tables2.fulltextTableName,
|
|
@@ -588,7 +588,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
588
588
|
});
|
|
589
589
|
function runSchemaWriteTransaction(graphId, fn) {
|
|
590
590
|
if (!capabilities.transactions) {
|
|
591
|
-
throw new
|
|
591
|
+
throw new chunkKCH7WQA5_cjs.ConfigurationError(
|
|
592
592
|
"Schema writes and removal cleanup require atomic transactions, but this Postgres backend does not provide them. The drizzle-orm/neon-http driver communicates over HTTP and cannot hold a session across statements; use drizzle-orm/neon-serverless (websocket) for transactional writes.",
|
|
593
593
|
{
|
|
594
594
|
backend: "postgres",
|
|
@@ -639,9 +639,10 @@ function createPostgresBackend(db, options = {}) {
|
|
|
639
639
|
schemaVersionsTable: tables2.schemaVersions
|
|
640
640
|
});
|
|
641
641
|
return {
|
|
642
|
-
backend:
|
|
642
|
+
backend: chunkRHDOAQCT_cjs.gateFulltext(
|
|
643
643
|
backend2,
|
|
644
|
-
contributionMaterializer.assertInitialized
|
|
644
|
+
contributionMaterializer.assertInitialized,
|
|
645
|
+
contributionMaterializer.refuseUnavailableFulltext
|
|
645
646
|
),
|
|
646
647
|
drainAndClose
|
|
647
648
|
};
|
|
@@ -662,33 +663,33 @@ function createPostgresBackend(db, options = {}) {
|
|
|
662
663
|
);
|
|
663
664
|
const executeCompiled = trustedExecutionAdapter.executeCompiled;
|
|
664
665
|
if (executeCompiled === void 0) {
|
|
665
|
-
throw new
|
|
666
|
+
throw new chunkKCH7WQA5_cjs.ConfigurationError(
|
|
666
667
|
"Trusted import could not bind raw execution to the PostgreSQL transaction.",
|
|
667
668
|
{ capability: "trustedImport", dialect: "postgres" }
|
|
668
669
|
);
|
|
669
670
|
}
|
|
670
|
-
const trustedTx =
|
|
671
|
+
const trustedTx = chunkANKOXPCC_cjs.createBackendOverlay(tx, {
|
|
671
672
|
executeRaw(sqlText, params) {
|
|
672
673
|
return executeCompiled({ params, sql: sqlText });
|
|
673
674
|
}
|
|
674
675
|
});
|
|
675
|
-
await
|
|
676
|
-
await
|
|
677
|
-
const indexDefinitions = await
|
|
676
|
+
await chunkRHDOAQCT_cjs.lockPostgresTrustedImportTables(trustedTx, tableNames);
|
|
677
|
+
await chunkRHDOAQCT_cjs.assertTrustedImportDatabaseEmpty(trustedTx, tableNames);
|
|
678
|
+
const indexDefinitions = await chunkRHDOAQCT_cjs.suspendPostgresSecondaryIndexes(
|
|
678
679
|
trustedTx,
|
|
679
680
|
tableNames
|
|
680
681
|
);
|
|
681
682
|
const result = await fn(
|
|
682
|
-
|
|
683
|
+
chunkRHDOAQCT_cjs.createPostgresTrustedImportSession(trustedTx, tableNames)
|
|
683
684
|
);
|
|
684
|
-
await
|
|
685
|
-
await
|
|
685
|
+
await chunkRHDOAQCT_cjs.restoreSecondaryIndexes(trustedTx, indexDefinitions);
|
|
686
|
+
await chunkRHDOAQCT_cjs.analyzeImportedTables(trustedTx, tableNames);
|
|
686
687
|
return result;
|
|
687
688
|
});
|
|
688
689
|
}
|
|
689
690
|
} : {},
|
|
690
691
|
async bootstrapTables() {
|
|
691
|
-
const statements =
|
|
692
|
+
const statements = chunkA7NMUYEL_cjs.generatePostgresDDL(tables2, fulltextStrategy);
|
|
692
693
|
for (const statement of statements) {
|
|
693
694
|
await executeConcurrentCreateDdl(statement);
|
|
694
695
|
}
|
|
@@ -723,9 +724,10 @@ function createPostgresBackend(db, options = {}) {
|
|
|
723
724
|
// uninitialized database throws `StoreNotInitializedError` loudly
|
|
724
725
|
// rather than self-healing on a read/write path (#135). Shared
|
|
725
726
|
// verbatim with the tx-scoped gate via `gateFulltextMethods`.
|
|
726
|
-
...
|
|
727
|
+
...chunkRHDOAQCT_cjs.gateFulltextMethods(
|
|
727
728
|
operations,
|
|
728
|
-
contributionMaterializer.assertInitialized
|
|
729
|
+
contributionMaterializer.assertInitialized,
|
|
730
|
+
contributionMaterializer.refuseUnavailableFulltext
|
|
729
731
|
),
|
|
730
732
|
async executeDdl(ddl) {
|
|
731
733
|
await db.execute(drizzleOrm.sql.raw(ddl));
|
|
@@ -778,26 +780,26 @@ function createPostgresBackend(db, options = {}) {
|
|
|
778
780
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.indexName, indexName));
|
|
779
781
|
const row = rows[0];
|
|
780
782
|
if (row === void 0) return void 0;
|
|
781
|
-
return
|
|
783
|
+
return chunkRHDOAQCT_cjs.mapMaterializationRow(row, chunkRHDOAQCT_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.decode);
|
|
782
784
|
},
|
|
783
785
|
async getIndexMaterializations(statusKeys) {
|
|
784
786
|
if (statusKeys.length === 0) return [];
|
|
785
787
|
const t = tables2.indexMaterializations;
|
|
786
788
|
const rows = await db.select().from(t).where(drizzleOrm.inArray(t.indexName, [...statusKeys]));
|
|
787
789
|
return rows.map(
|
|
788
|
-
(row) =>
|
|
790
|
+
(row) => chunkRHDOAQCT_cjs.mapMaterializationRow(row, chunkRHDOAQCT_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.decode)
|
|
789
791
|
);
|
|
790
792
|
},
|
|
791
793
|
async recordIndexMaterialization(params) {
|
|
792
794
|
const t = tables2.indexMaterializations;
|
|
793
795
|
await db.insert(t).values(
|
|
794
|
-
|
|
796
|
+
chunkRHDOAQCT_cjs.buildMaterializationInsertValues(
|
|
795
797
|
params,
|
|
796
|
-
|
|
798
|
+
chunkRHDOAQCT_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.encode
|
|
797
799
|
)
|
|
798
800
|
).onConflictDoUpdate({
|
|
799
801
|
target: t.indexName,
|
|
800
|
-
set:
|
|
802
|
+
set: chunkRHDOAQCT_cjs.buildMaterializationOnConflictSet(params.materializedAt)
|
|
801
803
|
});
|
|
802
804
|
},
|
|
803
805
|
async ensureContributionMaterializationsTable() {
|
|
@@ -819,26 +821,26 @@ function createPostgresBackend(db, options = {}) {
|
|
|
819
821
|
const t = tables2.kindRemovals;
|
|
820
822
|
const rows = await db.select().from(t).where(drizzleOrm.and(drizzleOrm.eq(t.graphId, graphId), drizzleOrm.isNull(t.removedAt)));
|
|
821
823
|
return rows.map(
|
|
822
|
-
(row) =>
|
|
824
|
+
(row) => chunkRHDOAQCT_cjs.mapKindRemovalRow(row, chunkRHDOAQCT_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
823
825
|
);
|
|
824
826
|
},
|
|
825
827
|
async getAllKindRemovals(graphId) {
|
|
826
828
|
const t = tables2.kindRemovals;
|
|
827
829
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.graphId, graphId));
|
|
828
830
|
return rows.map(
|
|
829
|
-
(row) =>
|
|
831
|
+
(row) => chunkRHDOAQCT_cjs.mapKindRemovalRow(row, chunkRHDOAQCT_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
830
832
|
);
|
|
831
833
|
},
|
|
832
834
|
async recordKindRemoval(params) {
|
|
833
835
|
const t = tables2.kindRemovals;
|
|
834
836
|
await db.insert(t).values(
|
|
835
|
-
|
|
837
|
+
chunkRHDOAQCT_cjs.buildKindRemovalInsertValues(
|
|
836
838
|
params,
|
|
837
|
-
|
|
839
|
+
chunkRHDOAQCT_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.encode
|
|
838
840
|
)
|
|
839
841
|
).onConflictDoUpdate({
|
|
840
842
|
target: [t.graphId, t.kindName, t.entity, t.schemaVersion],
|
|
841
|
-
set:
|
|
843
|
+
set: chunkRHDOAQCT_cjs.buildKindRemovalOnConflictSet(t.removedAt, params.removedAt)
|
|
842
844
|
});
|
|
843
845
|
},
|
|
844
846
|
async ensureReconciliationMarkersTable() {
|
|
@@ -917,8 +919,8 @@ function createPostgresBackend(db, options = {}) {
|
|
|
917
919
|
const presentGuardedTables = tablePresence.filter((entry) => entry.exists).map((entry) => entry.tableName);
|
|
918
920
|
for (const tableName of presentGuardedTables) {
|
|
919
921
|
await db.execute(
|
|
920
|
-
|
|
921
|
-
|
|
922
|
+
chunkDYPRZ53S_cjs.toDrizzleSql(
|
|
923
|
+
chunk2ZWM2RFH_cjs.sql`ANALYZE (SKIP_LOCKED) ${chunk2ZWM2RFH_cjs.sql.identifier(tableName)}`,
|
|
922
924
|
"postgres"
|
|
923
925
|
)
|
|
924
926
|
);
|
|
@@ -933,7 +935,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
933
935
|
async commitSchemaVersionIfKindsEmpty(params, probes) {
|
|
934
936
|
return runSchemaWriteTransaction(
|
|
935
937
|
params.graphId,
|
|
936
|
-
(target) =>
|
|
938
|
+
(target) => chunkRHDOAQCT_cjs.commitSchemaVersionIfKindsEmpty(target, params, probes)
|
|
937
939
|
);
|
|
938
940
|
},
|
|
939
941
|
async commitSchemaVersionWithPreflight(params, preflight) {
|
|
@@ -955,9 +957,9 @@ function createPostgresBackend(db, options = {}) {
|
|
|
955
957
|
return backend.transactionWithNative((tx) => fn(tx), options2);
|
|
956
958
|
},
|
|
957
959
|
async transactionWithNative(fn, options2) {
|
|
958
|
-
const temporaryWrites = options2?.temporaryWrites ===
|
|
960
|
+
const temporaryWrites = options2?.temporaryWrites === chunkANKOXPCC_cjs.INTERNAL_TEMPORARY_WRITES;
|
|
959
961
|
if (temporaryWrites && options2.accessMode !== "read_only") {
|
|
960
|
-
throw new
|
|
962
|
+
throw new chunkKCH7WQA5_cjs.ConfigurationError(
|
|
961
963
|
"Temporary-write transactions must be semantically read-only.",
|
|
962
964
|
{ dialect: "postgres" }
|
|
963
965
|
);
|
|
@@ -981,7 +983,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
981
983
|
},
|
|
982
984
|
adoptTransaction(externalTx) {
|
|
983
985
|
if (!capabilities.transactions) {
|
|
984
|
-
throw new
|
|
986
|
+
throw new chunkKCH7WQA5_cjs.ConfigurationError(
|
|
985
987
|
"Cross-store atomicity is unavailable on this Postgres backend: its driver does not support transactions (drizzle-orm/neon-http, Cloudflare D1). Adopting an external transaction here would let the caller's relational write commit with no way to roll back the graph write. Use a node-postgres or neon-serverless (Pool/WebSocket) connection for cross-store transactions.",
|
|
986
988
|
{
|
|
987
989
|
backend: "postgres",
|
|
@@ -990,7 +992,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
990
992
|
}
|
|
991
993
|
);
|
|
992
994
|
}
|
|
993
|
-
|
|
995
|
+
chunkRHDOAQCT_cjs.assertAdoptedDialect(
|
|
994
996
|
externalTx,
|
|
995
997
|
pgCore.PgTransaction,
|
|
996
998
|
"postgres"
|
|
@@ -1001,7 +1003,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
1001
1003
|
}
|
|
1002
1004
|
};
|
|
1003
1005
|
if (serializedClient !== void 0) {
|
|
1004
|
-
|
|
1006
|
+
chunkANKOXPCC_cjs.markSerializedTransactionResource(backend, serializedClient);
|
|
1005
1007
|
}
|
|
1006
1008
|
return backend;
|
|
1007
1009
|
}
|
|
@@ -1099,10 +1101,10 @@ function createPostgresOperationBackend(options) {
|
|
|
1099
1101
|
}
|
|
1100
1102
|
async function vectorSearchGucOverrides(params) {
|
|
1101
1103
|
const overrides = [];
|
|
1102
|
-
const efSearchParameter =
|
|
1104
|
+
const efSearchParameter = chunkZHOAZD7Q_cjs.resolveEfSearchOverride({
|
|
1103
1105
|
efSearch: params.efSearch,
|
|
1104
1106
|
indexType: params.indexType,
|
|
1105
|
-
tuning:
|
|
1107
|
+
tuning: chunkZHOAZD7Q_cjs.vectorSearchFrontierTuning(vectorStrategy),
|
|
1106
1108
|
transactions: capabilities.transactions,
|
|
1107
1109
|
dialect: "PostgreSQL",
|
|
1108
1110
|
engine: vectorStrategy?.name ?? "this backend"
|
|
@@ -1127,7 +1129,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1127
1129
|
async function runVectorSearchGucGroup(overrides, query) {
|
|
1128
1130
|
const runExclusive = executionAdapter.runExclusive;
|
|
1129
1131
|
if (runExclusive === void 0) {
|
|
1130
|
-
throw new
|
|
1132
|
+
throw new chunkKCH7WQA5_cjs.CompilerInvariantError(
|
|
1131
1133
|
"A transaction-scoped Postgres backend must expose runExclusive; its execution adapter was not wrapped by createSerialExecutionAdapter."
|
|
1132
1134
|
);
|
|
1133
1135
|
}
|
|
@@ -1171,17 +1173,17 @@ function createPostgresOperationBackend(options) {
|
|
|
1171
1173
|
});
|
|
1172
1174
|
}
|
|
1173
1175
|
const batchConfig = computePostgresBatchChunkSizes(
|
|
1174
|
-
capabilities.maxBindParameters ??
|
|
1176
|
+
capabilities.maxBindParameters ?? chunkANKOXPCC_cjs.POSTGRES_MAX_BIND_PARAMETERS
|
|
1175
1177
|
);
|
|
1176
|
-
const commonBackend =
|
|
1178
|
+
const commonBackend = chunkRHDOAQCT_cjs.createCommonOperationBackend({
|
|
1177
1179
|
batchConfig,
|
|
1178
1180
|
execution: {
|
|
1179
1181
|
execAll,
|
|
1180
1182
|
execGet,
|
|
1181
1183
|
execRun
|
|
1182
1184
|
},
|
|
1183
|
-
nowIso:
|
|
1184
|
-
maxBindParameters: capabilities.maxBindParameters ??
|
|
1185
|
+
nowIso: chunkBEB4OFZF_cjs.nowIso,
|
|
1186
|
+
maxBindParameters: capabilities.maxBindParameters ?? chunkANKOXPCC_cjs.POSTGRES_MAX_BIND_PARAMETERS,
|
|
1185
1187
|
operationStrategy,
|
|
1186
1188
|
rowMappers: {
|
|
1187
1189
|
toEdgeRow,
|
|
@@ -1199,28 +1201,28 @@ function createPostgresOperationBackend(options) {
|
|
|
1199
1201
|
};
|
|
1200
1202
|
const vectorEmbeddingMethods = vectorStrategy === void 0 ? {} : {
|
|
1201
1203
|
async upsertEmbedding(params) {
|
|
1202
|
-
const slot =
|
|
1204
|
+
const slot = chunkRHDOAQCT_cjs.vectorSlotFromParams(params);
|
|
1203
1205
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
1204
|
-
const statements = vectorStrategy.buildUpsert(slot, params,
|
|
1206
|
+
const statements = vectorStrategy.buildUpsert(slot, params, chunkBEB4OFZF_cjs.nowIso());
|
|
1205
1207
|
try {
|
|
1206
1208
|
for (const statement of statements) {
|
|
1207
1209
|
await execRun(statement);
|
|
1208
1210
|
}
|
|
1209
1211
|
} catch (error) {
|
|
1210
|
-
throw
|
|
1212
|
+
throw chunkRHDOAQCT_cjs.mapVectorWriteError(error, params);
|
|
1211
1213
|
}
|
|
1212
1214
|
},
|
|
1213
1215
|
async upsertEmbeddingBatch(params) {
|
|
1214
1216
|
if (params.rows.length === 0) return;
|
|
1215
|
-
const slot =
|
|
1217
|
+
const slot = chunkRHDOAQCT_cjs.vectorSlotFromParams(params);
|
|
1216
1218
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
1217
1219
|
const rowsById = new Map(
|
|
1218
1220
|
params.rows.map((row) => [row.nodeId, row])
|
|
1219
1221
|
);
|
|
1220
1222
|
const rows = [...rowsById.values()];
|
|
1221
|
-
const timestamp =
|
|
1223
|
+
const timestamp = chunkBEB4OFZF_cjs.nowIso();
|
|
1222
1224
|
try {
|
|
1223
|
-
for (const chunk2 of
|
|
1225
|
+
for (const chunk2 of chunkGVAMRRZR_cjs.chunk(
|
|
1224
1226
|
rows,
|
|
1225
1227
|
batchConfig.embeddingUpsertBatchSize
|
|
1226
1228
|
)) {
|
|
@@ -1249,11 +1251,11 @@ function createPostgresOperationBackend(options) {
|
|
|
1249
1251
|
}
|
|
1250
1252
|
}
|
|
1251
1253
|
} catch (error) {
|
|
1252
|
-
throw
|
|
1254
|
+
throw chunkRHDOAQCT_cjs.mapVectorWriteError(error, params);
|
|
1253
1255
|
}
|
|
1254
1256
|
},
|
|
1255
1257
|
async deleteEmbedding(params) {
|
|
1256
|
-
const slot =
|
|
1258
|
+
const slot = chunkRHDOAQCT_cjs.vectorSlotFromParams(params);
|
|
1257
1259
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
1258
1260
|
const statements = vectorStrategy.buildDelete(slot, params);
|
|
1259
1261
|
for (const statement of statements) {
|
|
@@ -1262,9 +1264,9 @@ function createPostgresOperationBackend(options) {
|
|
|
1262
1264
|
},
|
|
1263
1265
|
async deleteEmbeddingBatch(params) {
|
|
1264
1266
|
if (params.nodeIds.length === 0) return;
|
|
1265
|
-
const slot =
|
|
1267
|
+
const slot = chunkRHDOAQCT_cjs.vectorSlotFromParams(params);
|
|
1266
1268
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
1267
|
-
for (const nodeIds of
|
|
1269
|
+
for (const nodeIds of chunkGVAMRRZR_cjs.chunk(
|
|
1268
1270
|
[...new Set(params.nodeIds)],
|
|
1269
1271
|
batchConfig.embeddingUpsertBatchSize
|
|
1270
1272
|
)) {
|
|
@@ -1276,19 +1278,19 @@ function createPostgresOperationBackend(options) {
|
|
|
1276
1278
|
}
|
|
1277
1279
|
},
|
|
1278
1280
|
async vectorSearch(params) {
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
const slot =
|
|
1281
|
+
chunkZHOAZD7Q_cjs.assertVectorSearchLimit(params.limit);
|
|
1282
|
+
chunkJL5UEBWT_cjs.assertPgvectorEfSearch(params.efSearch);
|
|
1283
|
+
const slot = chunkRHDOAQCT_cjs.vectorSlotFromParams(params);
|
|
1282
1284
|
const query = vectorStrategy.buildSearch(
|
|
1283
1285
|
slot,
|
|
1284
1286
|
params,
|
|
1285
1287
|
// Store-compiled candidates (predicates + subclass + currency)
|
|
1286
1288
|
// take precedence; the live-node default covers direct backend use.
|
|
1287
|
-
params.candidates ??
|
|
1289
|
+
params.candidates ?? chunkRHDOAQCT_cjs.buildLiveNodeCandidates(
|
|
1288
1290
|
tableNames.nodes,
|
|
1289
1291
|
params.graphId,
|
|
1290
1292
|
params.nodeKind,
|
|
1291
|
-
|
|
1293
|
+
chunkBEB4OFZF_cjs.nowIso()
|
|
1292
1294
|
)
|
|
1293
1295
|
);
|
|
1294
1296
|
const gucOverrides = await vectorSearchGucOverrides(params);
|
|
@@ -1296,7 +1298,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1296
1298
|
try {
|
|
1297
1299
|
rows = await runVectorSearch(gucOverrides, query);
|
|
1298
1300
|
} catch (error) {
|
|
1299
|
-
throw
|
|
1301
|
+
throw chunkRHDOAQCT_cjs.mapVectorWriteError(error, params);
|
|
1300
1302
|
}
|
|
1301
1303
|
return rows.map((row) => ({
|
|
1302
1304
|
nodeId: row.node_id,
|
|
@@ -1308,10 +1310,10 @@ function createPostgresOperationBackend(options) {
|
|
|
1308
1310
|
// multi-statement fallback by simply not exposing the member.
|
|
1309
1311
|
...capabilities.windowFunctions ? {
|
|
1310
1312
|
async hybridSearch(params) {
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
const slot =
|
|
1313
|
+
chunkZHOAZD7Q_cjs.assertVectorSearchLimit(params.limit);
|
|
1314
|
+
chunkZHOAZD7Q_cjs.assertVectorSearchLimit(params.vector.k);
|
|
1315
|
+
chunkJL5UEBWT_cjs.assertPgvectorEfSearch(params.vector.efSearch);
|
|
1316
|
+
const slot = chunkRHDOAQCT_cjs.vectorSlotFromParams({
|
|
1315
1317
|
graphId: params.graphId,
|
|
1316
1318
|
nodeKind: params.nodeKind,
|
|
1317
1319
|
fieldPath: params.vector.fieldPath,
|
|
@@ -1319,11 +1321,11 @@ function createPostgresOperationBackend(options) {
|
|
|
1319
1321
|
metric: params.vector.metric,
|
|
1320
1322
|
indexType: params.vector.indexType
|
|
1321
1323
|
});
|
|
1322
|
-
const candidates = params.candidates ??
|
|
1324
|
+
const candidates = params.candidates ?? chunkRHDOAQCT_cjs.buildLiveNodeCandidates(
|
|
1323
1325
|
tableNames.nodes,
|
|
1324
1326
|
params.graphId,
|
|
1325
1327
|
params.nodeKind,
|
|
1326
|
-
|
|
1328
|
+
chunkBEB4OFZF_cjs.nowIso()
|
|
1327
1329
|
);
|
|
1328
1330
|
const vectorParams = {
|
|
1329
1331
|
graphId: params.graphId,
|
|
@@ -1339,11 +1341,11 @@ function createPostgresOperationBackend(options) {
|
|
|
1339
1341
|
const vectorSql = vectorStrategy.buildSearch(
|
|
1340
1342
|
slot,
|
|
1341
1343
|
vectorParams,
|
|
1342
|
-
|
|
1344
|
+
chunk2ZWM2RFH_cjs.sql.raw("SELECT node_id FROM tg_hybrid_cand")
|
|
1343
1345
|
);
|
|
1344
1346
|
const statement = operationStrategy.buildHybridSearch(
|
|
1345
1347
|
{ ...params, candidates },
|
|
1346
|
-
|
|
1348
|
+
chunkDYPRZ53S_cjs.toDrizzleSql(vectorSql, "postgres"),
|
|
1347
1349
|
params.vector.metric === "cosine"
|
|
1348
1350
|
);
|
|
1349
1351
|
const gucOverrides = await vectorSearchGucOverrides({
|
|
@@ -1357,9 +1359,9 @@ function createPostgresOperationBackend(options) {
|
|
|
1357
1359
|
statement
|
|
1358
1360
|
);
|
|
1359
1361
|
} catch (error) {
|
|
1360
|
-
throw
|
|
1362
|
+
throw chunkRHDOAQCT_cjs.mapVectorWriteError(error, vectorParams);
|
|
1361
1363
|
}
|
|
1362
|
-
return raw.map((row) =>
|
|
1364
|
+
return raw.map((row) => chunkRHDOAQCT_cjs.mapHybridSearchRow(row, toNodeRow));
|
|
1363
1365
|
}
|
|
1364
1366
|
} : {}
|
|
1365
1367
|
};
|
|
@@ -1414,7 +1416,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1414
1416
|
tableNames,
|
|
1415
1417
|
async lockSchemaVersionForWrite(params) {
|
|
1416
1418
|
if (!transactionScoped) {
|
|
1417
|
-
throw new
|
|
1419
|
+
throw new chunkKCH7WQA5_cjs.ConfigurationError(
|
|
1418
1420
|
"The schema write fence requires an explicit PostgreSQL transaction.",
|
|
1419
1421
|
{
|
|
1420
1422
|
code: "SCHEMA_WRITE_FENCE_TRANSACTION_REQUIRED",
|
|
@@ -1424,7 +1426,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1424
1426
|
}
|
|
1425
1427
|
const locked = await lockActiveSchemaVersion(params.graphId);
|
|
1426
1428
|
if (locked !== void 0) {
|
|
1427
|
-
|
|
1429
|
+
chunkRHDOAQCT_cjs.assertActiveSchemaVersion(
|
|
1428
1430
|
params.graphId,
|
|
1429
1431
|
params.expectedVersion,
|
|
1430
1432
|
locked
|
|
@@ -1432,7 +1434,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1432
1434
|
return;
|
|
1433
1435
|
}
|
|
1434
1436
|
const settled = await commonBackend.getActiveSchema(params.graphId);
|
|
1435
|
-
throw new
|
|
1437
|
+
throw new chunkKCH7WQA5_cjs.StaleVersionError({
|
|
1436
1438
|
graphId: params.graphId,
|
|
1437
1439
|
expected: params.expectedVersion,
|
|
1438
1440
|
actual: settled?.version ?? 0
|
|
@@ -1441,7 +1443,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1441
1443
|
// === Vector Index Operations ===
|
|
1442
1444
|
async createVectorIndex(params) {
|
|
1443
1445
|
if (vectorStrategy === void 0) return;
|
|
1444
|
-
const slot =
|
|
1446
|
+
const slot = chunkRHDOAQCT_cjs.vectorSlotFromCreateIndexParams(params);
|
|
1445
1447
|
await contributionMaterializer.ensureVectorSlot(slot);
|
|
1446
1448
|
const indexStatement = vectorStrategy.buildCreateIndex?.(slot, {
|
|
1447
1449
|
concurrent: params.concurrent === true
|
|
@@ -1450,12 +1452,12 @@ function createPostgresOperationBackend(options) {
|
|
|
1450
1452
|
try {
|
|
1451
1453
|
await execRun(indexStatement);
|
|
1452
1454
|
} catch (error) {
|
|
1453
|
-
if (!
|
|
1455
|
+
if (!chunkGVAMRRZR_cjs.isInsufficientResourcesError(error)) throw error;
|
|
1454
1456
|
const dropStatement = vectorStrategy.buildDropIndex?.(slot);
|
|
1455
1457
|
if (dropStatement !== void 0) {
|
|
1456
1458
|
await execRun(dropStatement);
|
|
1457
1459
|
}
|
|
1458
|
-
const table =
|
|
1460
|
+
const table = chunk2ZWM2RFH_cjs.sql.identifier(
|
|
1459
1461
|
vectorStrategy.tableName(
|
|
1460
1462
|
slot.graphId,
|
|
1461
1463
|
slot.nodeKind,
|
|
@@ -1463,13 +1465,13 @@ function createPostgresOperationBackend(options) {
|
|
|
1463
1465
|
)
|
|
1464
1466
|
);
|
|
1465
1467
|
await execRun(
|
|
1466
|
-
|
|
1468
|
+
chunk2ZWM2RFH_cjs.sql`ALTER TABLE ${table} SET (parallel_workers = 0)`
|
|
1467
1469
|
);
|
|
1468
1470
|
try {
|
|
1469
1471
|
await execRun(indexStatement);
|
|
1470
1472
|
} finally {
|
|
1471
1473
|
await execRun(
|
|
1472
|
-
|
|
1474
|
+
chunk2ZWM2RFH_cjs.sql`ALTER TABLE ${table} RESET (parallel_workers)`
|
|
1473
1475
|
);
|
|
1474
1476
|
}
|
|
1475
1477
|
}
|
|
@@ -1477,7 +1479,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1477
1479
|
},
|
|
1478
1480
|
// === Fulltext Operations ===
|
|
1479
1481
|
async upsertFulltext(params) {
|
|
1480
|
-
const timestamp =
|
|
1482
|
+
const timestamp = chunkBEB4OFZF_cjs.nowIso();
|
|
1481
1483
|
const statements = operationStrategy.buildUpsertFulltext(
|
|
1482
1484
|
params,
|
|
1483
1485
|
timestamp
|
|
@@ -1494,8 +1496,8 @@ function createPostgresOperationBackend(options) {
|
|
|
1494
1496
|
},
|
|
1495
1497
|
async upsertFulltextBatch(params) {
|
|
1496
1498
|
if (params.rows.length === 0) return;
|
|
1497
|
-
const timestamp =
|
|
1498
|
-
for (const rows of
|
|
1499
|
+
const timestamp = chunkBEB4OFZF_cjs.nowIso();
|
|
1500
|
+
for (const rows of chunkGVAMRRZR_cjs.chunk(
|
|
1499
1501
|
params.rows,
|
|
1500
1502
|
batchConfig.fulltextUpsertBatchSize
|
|
1501
1503
|
)) {
|
|
@@ -1510,7 +1512,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1510
1512
|
},
|
|
1511
1513
|
async deleteFulltextBatch(params) {
|
|
1512
1514
|
if (params.nodeIds.length === 0) return;
|
|
1513
|
-
for (const nodeIds of
|
|
1515
|
+
for (const nodeIds of chunkGVAMRRZR_cjs.chunk(
|
|
1514
1516
|
params.nodeIds,
|
|
1515
1517
|
batchConfig.fulltextDeleteChunkSize
|
|
1516
1518
|
)) {
|
|
@@ -1528,25 +1530,25 @@ function createPostgresOperationBackend(options) {
|
|
|
1528
1530
|
const rows = await execAll(query);
|
|
1529
1531
|
return rows.map((row, index) => ({
|
|
1530
1532
|
nodeId: row.node_id,
|
|
1531
|
-
score:
|
|
1533
|
+
score: chunkBEB4OFZF_cjs.coerceNumericScore(row.score),
|
|
1532
1534
|
rank: index + 1,
|
|
1533
1535
|
...row.snippet === null ? {} : { snippet: row.snippet }
|
|
1534
1536
|
}));
|
|
1535
1537
|
},
|
|
1536
1538
|
async dropVectorIndex(params) {
|
|
1537
1539
|
if (vectorStrategy === void 0) return;
|
|
1538
|
-
const slot =
|
|
1540
|
+
const slot = chunkRHDOAQCT_cjs.vectorSlotFromDropIndexParams(params);
|
|
1539
1541
|
const dropStatement = vectorStrategy.buildDropIndex?.(slot);
|
|
1540
1542
|
if (dropStatement === void 0) return;
|
|
1541
1543
|
try {
|
|
1542
1544
|
await execRun(dropStatement);
|
|
1543
1545
|
} catch (error) {
|
|
1544
|
-
if (!
|
|
1546
|
+
if (!chunkGVAMRRZR_cjs.isMissingTableError(error)) throw error;
|
|
1545
1547
|
}
|
|
1546
1548
|
},
|
|
1547
1549
|
// === Query Execution ===
|
|
1548
1550
|
async execute(query) {
|
|
1549
|
-
const annTypes =
|
|
1551
|
+
const annTypes = chunk2ZWM2RFH_cjs.isSqlFragment(query) ? chunk2ZWM2RFH_cjs.annIndexScanTypes(query) : void 0;
|
|
1550
1552
|
if (annTypes !== void 0 && vectorStrategy !== void 0) {
|
|
1551
1553
|
const overrides = [];
|
|
1552
1554
|
for (const indexType of annTypes) {
|
|
@@ -1587,5 +1589,5 @@ function createTransactionBackend(options) {
|
|
|
1587
1589
|
}
|
|
1588
1590
|
|
|
1589
1591
|
exports.createPostgresBackend = createPostgresBackend;
|
|
1590
|
-
//# sourceMappingURL=chunk-
|
|
1591
|
-
//# sourceMappingURL=chunk-
|
|
1592
|
+
//# sourceMappingURL=chunk-C2ZP5YS6.cjs.map
|
|
1593
|
+
//# sourceMappingURL=chunk-C2ZP5YS6.cjs.map
|