@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
|
|
3
|
+
var chunkBEB4OFZF_cjs = require('./chunk-BEB4OFZF.cjs');
|
|
4
|
+
var chunkA7NMUYEL_cjs = require('./chunk-A7NMUYEL.cjs');
|
|
5
|
+
var chunkDYPRZ53S_cjs = require('./chunk-DYPRZ53S.cjs');
|
|
6
6
|
var chunkPWLJ77UV_cjs = require('./chunk-PWLJ77UV.cjs');
|
|
7
|
-
var
|
|
8
|
-
var
|
|
7
|
+
var chunkGVAMRRZR_cjs = require('./chunk-GVAMRRZR.cjs');
|
|
8
|
+
var chunkANKOXPCC_cjs = require('./chunk-ANKOXPCC.cjs');
|
|
9
9
|
var chunkZY4GXIVN_cjs = require('./chunk-ZY4GXIVN.cjs');
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
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
|
|
|
@@ -20,7 +20,7 @@ function assertLimitPerEndpoint(operation, graphId, limitPerEndpoint, kind) {
|
|
|
20
20
|
if (limitPerEndpoint === void 0 || Number.isInteger(limitPerEndpoint) && limitPerEndpoint > 0) {
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
|
-
throw new
|
|
23
|
+
throw new chunkKCH7WQA5_cjs.ConfigurationError(
|
|
24
24
|
`${operation} \`limitPerEndpoint\` must be a positive integer, received ${String(limitPerEndpoint)}.`,
|
|
25
25
|
{
|
|
26
26
|
code: "EDGE_ENDPOINT_SET_INVALID",
|
|
@@ -64,7 +64,7 @@ function resolveHeterogeneousEdgeRead(params, maxBindParameters) {
|
|
|
64
64
|
if (endpointChunkSize >= 1) {
|
|
65
65
|
return { edgeKinds, endpoints, endpointChunkSize };
|
|
66
66
|
}
|
|
67
|
-
throw new
|
|
67
|
+
throw new chunkKCH7WQA5_cjs.ConfigurationError(
|
|
68
68
|
"findEdgesByHeterogeneousEndpointSet cannot fit one endpoint and the selected edge kinds within the backend bind-parameter budget.",
|
|
69
69
|
{
|
|
70
70
|
code: "EDGE_HETEROGENEOUS_READ_BIND_BUDGET_EXCEEDED",
|
|
@@ -80,8 +80,8 @@ function resolveHeterogeneousEdgeRead(params, maxBindParameters) {
|
|
|
80
80
|
|
|
81
81
|
// src/backend/live-node-candidates.ts
|
|
82
82
|
function buildLiveNodeCandidates(nodesTableName, graphId, nodeKind, now) {
|
|
83
|
-
const nodes =
|
|
84
|
-
return
|
|
83
|
+
const nodes = chunk2ZWM2RFH_cjs.sql.identifier(nodesTableName);
|
|
84
|
+
return chunk2ZWM2RFH_cjs.sql`
|
|
85
85
|
SELECT "id" AS node_id
|
|
86
86
|
FROM ${nodes}
|
|
87
87
|
WHERE "graph_id" = ${graphId}
|
|
@@ -122,10 +122,10 @@ function vectorSlotFromDropIndexParams(params) {
|
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
function mapVectorWriteError(error, params) {
|
|
125
|
-
const mismatch =
|
|
125
|
+
const mismatch = chunkGVAMRRZR_cjs.parseDimensionMismatch(error);
|
|
126
126
|
if (mismatch === void 0) return error;
|
|
127
127
|
const attempted = mismatch.actual ?? "a different number of";
|
|
128
|
-
return new
|
|
128
|
+
return new chunkKCH7WQA5_cjs.EmbeddingDimensionChangedError(
|
|
129
129
|
`Embedding "${params.nodeKind}.${params.fieldPath}" was written with ${attempted} dimensions, but its per-field storage expects ${mismatch.expected}. The field's embedding dimension changed; existing vectors must be recreated and re-embedded.`,
|
|
130
130
|
{
|
|
131
131
|
kind: params.nodeKind,
|
|
@@ -141,7 +141,7 @@ var SQLITE_CONTRIBUTION_MAT_TIMESTAMPS = {
|
|
|
141
141
|
encode: (value) => value
|
|
142
142
|
};
|
|
143
143
|
var POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS = {
|
|
144
|
-
decode:
|
|
144
|
+
decode: chunkBEB4OFZF_cjs.formatPostgresTimestamp,
|
|
145
145
|
encode: (value) => new Date(value)
|
|
146
146
|
};
|
|
147
147
|
function mapContributionMaterializationRow(row, decode) {
|
|
@@ -248,60 +248,120 @@ function identityOf(graphId, contribution) {
|
|
|
248
248
|
tableName: contribution.tableName
|
|
249
249
|
};
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function missingTableErrorNames(error, tableName) {
|
|
252
|
+
const quotedTableName2 = `"${tableName.replaceAll('"', '""')}"`;
|
|
253
|
+
for (const link of chunkGVAMRRZR_cjs.errorChain(error)) {
|
|
254
|
+
const message = errorMessage(link);
|
|
255
|
+
if (typeof message !== "string") continue;
|
|
256
|
+
const sqliteMatch = /\bno such table:\s*([^\s;]+)/i.exec(message);
|
|
257
|
+
const sqliteName = unquoteSqliteIdentifier(sqliteMatch?.[1]);
|
|
258
|
+
if (sqliteName === tableName) return true;
|
|
259
|
+
const namesPostgresTable = message.includes(`relation ${quotedTableName2} does not exist`) || message.includes(`table ${quotedTableName2} does not exist`);
|
|
260
|
+
if (namesPostgresTable) return true;
|
|
261
|
+
}
|
|
262
|
+
return false;
|
|
263
|
+
}
|
|
264
|
+
function errorMessage(error) {
|
|
265
|
+
if (typeof error === "string") return error;
|
|
266
|
+
if (error instanceof Error) return error.message;
|
|
267
|
+
if (typeof error !== "object" || error === null || !("message" in error)) {
|
|
268
|
+
return void 0;
|
|
269
|
+
}
|
|
270
|
+
return typeof error.message === "string" ? error.message : void 0;
|
|
271
|
+
}
|
|
272
|
+
function unquoteSqliteIdentifier(identifier) {
|
|
273
|
+
if (identifier === void 0) return void 0;
|
|
274
|
+
const first = identifier.at(0);
|
|
275
|
+
const last = identifier.at(-1);
|
|
276
|
+
const isQuoted = first === '"' && last === '"' || first === "'" && last === "'" || first === "`" && last === "`" || first === "[" && last === "]";
|
|
277
|
+
return isQuoted ? identifier.slice(1, -1) : identifier;
|
|
278
|
+
}
|
|
279
|
+
async function executeGatedFulltext(graphId, assert, refuseUnavailable, execute) {
|
|
280
|
+
await assert(graphId);
|
|
281
|
+
try {
|
|
282
|
+
return await execute();
|
|
283
|
+
} catch (error) {
|
|
284
|
+
return refuseUnavailable(graphId, error);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
function gateFulltextMethods(source, assert, refuseUnavailable) {
|
|
252
288
|
const gated = {};
|
|
253
289
|
if (source.upsertFulltext) {
|
|
254
290
|
const raw = source.upsertFulltext;
|
|
255
291
|
gated.upsertFulltext = async (params) => {
|
|
256
|
-
await
|
|
257
|
-
|
|
292
|
+
await executeGatedFulltext(
|
|
293
|
+
params.graphId,
|
|
294
|
+
assert,
|
|
295
|
+
refuseUnavailable,
|
|
296
|
+
() => raw(params)
|
|
297
|
+
);
|
|
258
298
|
};
|
|
259
299
|
}
|
|
260
300
|
if (source.deleteFulltext) {
|
|
261
301
|
const raw = source.deleteFulltext;
|
|
262
302
|
gated.deleteFulltext = async (params) => {
|
|
263
|
-
await
|
|
264
|
-
|
|
303
|
+
await executeGatedFulltext(
|
|
304
|
+
params.graphId,
|
|
305
|
+
assert,
|
|
306
|
+
refuseUnavailable,
|
|
307
|
+
() => raw(params)
|
|
308
|
+
);
|
|
265
309
|
};
|
|
266
310
|
}
|
|
267
311
|
if (source.upsertFulltextBatch) {
|
|
268
312
|
const raw = source.upsertFulltextBatch;
|
|
269
313
|
gated.upsertFulltextBatch = async (params) => {
|
|
270
314
|
if (params.rows.length === 0) return;
|
|
271
|
-
await
|
|
272
|
-
|
|
315
|
+
await executeGatedFulltext(
|
|
316
|
+
params.graphId,
|
|
317
|
+
assert,
|
|
318
|
+
refuseUnavailable,
|
|
319
|
+
() => raw(params)
|
|
320
|
+
);
|
|
273
321
|
};
|
|
274
322
|
}
|
|
275
323
|
if (source.deleteFulltextBatch) {
|
|
276
324
|
const raw = source.deleteFulltextBatch;
|
|
277
325
|
gated.deleteFulltextBatch = async (params) => {
|
|
278
326
|
if (params.nodeIds.length === 0) return;
|
|
279
|
-
await
|
|
280
|
-
|
|
327
|
+
await executeGatedFulltext(
|
|
328
|
+
params.graphId,
|
|
329
|
+
assert,
|
|
330
|
+
refuseUnavailable,
|
|
331
|
+
() => raw(params)
|
|
332
|
+
);
|
|
281
333
|
};
|
|
282
334
|
}
|
|
283
335
|
if (source.fulltextSearch) {
|
|
284
336
|
const raw = source.fulltextSearch;
|
|
285
337
|
gated.fulltextSearch = async (params) => {
|
|
286
|
-
|
|
287
|
-
|
|
338
|
+
return executeGatedFulltext(
|
|
339
|
+
params.graphId,
|
|
340
|
+
assert,
|
|
341
|
+
refuseUnavailable,
|
|
342
|
+
() => raw(params)
|
|
343
|
+
);
|
|
288
344
|
};
|
|
289
345
|
}
|
|
290
346
|
const rawHardDelete = source.hardDeleteNode;
|
|
291
347
|
gated.hardDeleteNode = async (params) => {
|
|
292
|
-
await
|
|
293
|
-
|
|
348
|
+
await executeGatedFulltext(
|
|
349
|
+
params.graphId,
|
|
350
|
+
assert,
|
|
351
|
+
refuseUnavailable,
|
|
352
|
+
() => rawHardDelete(params)
|
|
353
|
+
);
|
|
294
354
|
};
|
|
295
355
|
return gated;
|
|
296
356
|
}
|
|
297
|
-
function gateFulltext(tx, assert) {
|
|
298
|
-
return
|
|
357
|
+
function gateFulltext(tx, assert, refuseUnavailable) {
|
|
358
|
+
return chunkANKOXPCC_cjs.createBackendOverlay(
|
|
299
359
|
tx,
|
|
300
|
-
gateFulltextMethods(tx, assert)
|
|
360
|
+
gateFulltextMethods(tx, assert, refuseUnavailable)
|
|
301
361
|
);
|
|
302
362
|
}
|
|
303
363
|
function contributionRebuildSupported(fulltextStrategy, fulltextTableName, transactional) {
|
|
304
|
-
return transactional &&
|
|
364
|
+
return transactional && chunkA7NMUYEL_cjs.runtimeStrategyContributions(fulltextStrategy, fulltextTableName).every(
|
|
305
365
|
(contribution) => contribution.dropDdl !== void 0
|
|
306
366
|
);
|
|
307
367
|
}
|
|
@@ -350,7 +410,7 @@ function createContributionMaterializer(deps) {
|
|
|
350
410
|
}
|
|
351
411
|
}
|
|
352
412
|
function runtimeContributions() {
|
|
353
|
-
return
|
|
413
|
+
return chunkA7NMUYEL_cjs.runtimeStrategyContributions(fulltextStrategy, fulltextTableName);
|
|
354
414
|
}
|
|
355
415
|
function cacheInitializedSignature(key, signature) {
|
|
356
416
|
if (!uncacheableKeys.has(key)) {
|
|
@@ -377,13 +437,13 @@ function createContributionMaterializer(deps) {
|
|
|
377
437
|
await deps.recordMarker({
|
|
378
438
|
...identity,
|
|
379
439
|
signature: existing.signature,
|
|
380
|
-
attemptedAt:
|
|
440
|
+
attemptedAt: chunkBEB4OFZF_cjs.nowIso(),
|
|
381
441
|
materializedAt: void 0,
|
|
382
442
|
error: error.message
|
|
383
443
|
});
|
|
384
444
|
throw error;
|
|
385
445
|
}
|
|
386
|
-
const attemptedAt =
|
|
446
|
+
const attemptedAt = chunkBEB4OFZF_cjs.nowIso();
|
|
387
447
|
try {
|
|
388
448
|
for (const statement of contribution.createDdl) {
|
|
389
449
|
await deps.execDdl(statement);
|
|
@@ -419,7 +479,7 @@ function createContributionMaterializer(deps) {
|
|
|
419
479
|
rows: indexMarkerRows(graphId, await deps.getMarkers(graphId))
|
|
420
480
|
};
|
|
421
481
|
} catch (error) {
|
|
422
|
-
if (!
|
|
482
|
+
if (!chunkGVAMRRZR_cjs.isMissingTableError(error)) throw error;
|
|
423
483
|
return { kind: "missing-table", error };
|
|
424
484
|
}
|
|
425
485
|
}
|
|
@@ -498,7 +558,7 @@ function createContributionMaterializer(deps) {
|
|
|
498
558
|
if (read.kind === "missing-table") {
|
|
499
559
|
const first = pending[0];
|
|
500
560
|
if (first === void 0) return;
|
|
501
|
-
throw new
|
|
561
|
+
throw new chunkKCH7WQA5_cjs.StoreNotInitializedError(graphId, "missing", {
|
|
502
562
|
cause: read.error,
|
|
503
563
|
details: { logicalName: first.contribution.logicalName }
|
|
504
564
|
});
|
|
@@ -507,7 +567,7 @@ function createContributionMaterializer(deps) {
|
|
|
507
567
|
const { contribution, key, signature } = entry;
|
|
508
568
|
const state = evaluateContributionState(read.rows.get(key), signature);
|
|
509
569
|
if (state !== "initialized") {
|
|
510
|
-
throw new
|
|
570
|
+
throw new chunkKCH7WQA5_cjs.StoreNotInitializedError(graphId, state, {
|
|
511
571
|
details: { logicalName: contribution.logicalName }
|
|
512
572
|
});
|
|
513
573
|
}
|
|
@@ -520,6 +580,21 @@ function createContributionMaterializer(deps) {
|
|
|
520
580
|
async function assertInitialized(graphId) {
|
|
521
581
|
await assertContributions(graphId, runtimeContributions());
|
|
522
582
|
}
|
|
583
|
+
async function refuseUnavailableFulltext(graphId, error) {
|
|
584
|
+
await Promise.resolve();
|
|
585
|
+
if (!chunkGVAMRRZR_cjs.isMissingTableError(error)) throw error;
|
|
586
|
+
const missingContribution = runtimeContributions().find(
|
|
587
|
+
(contribution) => contribution.logicalName === "fulltext" && missingTableErrorNames(error, contribution.tableName)
|
|
588
|
+
);
|
|
589
|
+
if (missingContribution !== void 0) {
|
|
590
|
+
throw new chunkKCH7WQA5_cjs.ContributionUnavailableError(
|
|
591
|
+
graphId,
|
|
592
|
+
missingContribution.tableName,
|
|
593
|
+
{ cause: error }
|
|
594
|
+
);
|
|
595
|
+
}
|
|
596
|
+
throw error;
|
|
597
|
+
}
|
|
523
598
|
async function ensureVectorSlot(slot, options) {
|
|
524
599
|
await ensureVectorSlots([slot], options);
|
|
525
600
|
}
|
|
@@ -681,23 +756,23 @@ function createContributionMaterializer(deps) {
|
|
|
681
756
|
async function lockContributionDdl(tx) {
|
|
682
757
|
if (dialect !== "postgres") return;
|
|
683
758
|
await tx.execute(
|
|
684
|
-
|
|
685
|
-
|
|
759
|
+
chunk2ZWM2RFH_cjs.asCompiledRowsSql(
|
|
760
|
+
chunk2ZWM2RFH_cjs.sql`SELECT pg_advisory_xact_lock(hashtext(${CONTRIBUTION_DDL_LOCK_KEY}), 0)`
|
|
686
761
|
)
|
|
687
762
|
);
|
|
688
763
|
}
|
|
689
764
|
async function lockSharedFulltextTable(tx, tableName) {
|
|
690
765
|
if (dialect !== "postgres") return;
|
|
691
766
|
await tx.executeStatement(
|
|
692
|
-
|
|
693
|
-
|
|
767
|
+
chunk2ZWM2RFH_cjs.asCompiledStatementSql(
|
|
768
|
+
chunk2ZWM2RFH_cjs.sql`LOCK TABLE ${chunk2ZWM2RFH_cjs.sql.identifier(tableName)} IN ACCESS EXCLUSIVE MODE`
|
|
694
769
|
)
|
|
695
770
|
);
|
|
696
771
|
}
|
|
697
772
|
async function readForeignGraphIds(tx, tableName, graphId) {
|
|
698
773
|
const rows = await tx.execute(
|
|
699
|
-
|
|
700
|
-
|
|
774
|
+
chunk2ZWM2RFH_cjs.asCompiledRowsSql(
|
|
775
|
+
chunkZHOAZD7Q_cjs.buildForeignFulltextGraphProbe(
|
|
701
776
|
tableName,
|
|
702
777
|
graphId,
|
|
703
778
|
FOREIGN_GRAPH_REPORT_LIMIT
|
|
@@ -708,7 +783,7 @@ function createContributionMaterializer(deps) {
|
|
|
708
783
|
}
|
|
709
784
|
async function rebuildContribution(graphId, scope, repopulate) {
|
|
710
785
|
if (scope === "vector") {
|
|
711
|
-
throw new
|
|
786
|
+
throw new chunkKCH7WQA5_cjs.ContributionRebuildUnsupportedError(
|
|
712
787
|
"vector-source-unavailable",
|
|
713
788
|
{ graphId, contribution: scope }
|
|
714
789
|
);
|
|
@@ -718,7 +793,7 @@ function createContributionMaterializer(deps) {
|
|
|
718
793
|
(contribution) => contribution.dropDdl === void 0
|
|
719
794
|
);
|
|
720
795
|
if (withoutTeardown !== void 0) {
|
|
721
|
-
throw new
|
|
796
|
+
throw new chunkKCH7WQA5_cjs.ContributionRebuildUnsupportedError("no-drop-ddl", {
|
|
722
797
|
graphId,
|
|
723
798
|
contribution: scope,
|
|
724
799
|
owner: withoutTeardown.owner,
|
|
@@ -728,7 +803,7 @@ function createContributionMaterializer(deps) {
|
|
|
728
803
|
}
|
|
729
804
|
const fence = deps.schemaWriteTransaction;
|
|
730
805
|
if (fence === void 0) {
|
|
731
|
-
throw new
|
|
806
|
+
throw new chunkKCH7WQA5_cjs.ContributionRebuildUnsupportedError("no-schema-fence", {
|
|
732
807
|
graphId,
|
|
733
808
|
contribution: scope,
|
|
734
809
|
backend: dialect
|
|
@@ -751,7 +826,7 @@ function createContributionMaterializer(deps) {
|
|
|
751
826
|
const rebuilt = await fence(graphId, async (tx) => {
|
|
752
827
|
const record = tx.recordContributionMaterialization;
|
|
753
828
|
if (record === void 0) {
|
|
754
|
-
throw new
|
|
829
|
+
throw new chunkKCH7WQA5_cjs.ConfigurationError(
|
|
755
830
|
"rebuildContribution requires a transaction-scoped backend that can write contribution markers; without it the drop, recreate, and stamp could not commit together.",
|
|
756
831
|
{
|
|
757
832
|
backend: dialect,
|
|
@@ -775,7 +850,7 @@ function createContributionMaterializer(deps) {
|
|
|
775
850
|
) === "stale"
|
|
776
851
|
);
|
|
777
852
|
if (staleStamp !== void 0) {
|
|
778
|
-
throw new
|
|
853
|
+
throw new chunkKCH7WQA5_cjs.ContributionRebuildUnsupportedError(
|
|
779
854
|
"shared-storage-in-use",
|
|
780
855
|
{
|
|
781
856
|
graphId,
|
|
@@ -800,13 +875,13 @@ function createContributionMaterializer(deps) {
|
|
|
800
875
|
}
|
|
801
876
|
if (!recreateStorage) {
|
|
802
877
|
await tx.executeStatement(
|
|
803
|
-
|
|
804
|
-
|
|
878
|
+
chunk2ZWM2RFH_cjs.asCompiledStatementSql(
|
|
879
|
+
chunkZHOAZD7Q_cjs.buildFulltextGraphDelete(sharedTable, graphId)
|
|
805
880
|
)
|
|
806
881
|
);
|
|
807
882
|
}
|
|
808
883
|
const stats = await repopulate(tx);
|
|
809
|
-
const now =
|
|
884
|
+
const now = chunkBEB4OFZF_cjs.nowIso();
|
|
810
885
|
for (const { contribution, signature } of stamps) {
|
|
811
886
|
await record({
|
|
812
887
|
...identityOf(graphId, contribution),
|
|
@@ -850,6 +925,7 @@ function createContributionMaterializer(deps) {
|
|
|
850
925
|
return {
|
|
851
926
|
ensureRuntimeContributions,
|
|
852
927
|
assertInitialized,
|
|
928
|
+
refuseUnavailableFulltext,
|
|
853
929
|
ensureVectorSlot,
|
|
854
930
|
ensureVectorSlots,
|
|
855
931
|
assertVectorSlot,
|
|
@@ -867,7 +943,7 @@ var SQLITE_INDEX_MAT_TIMESTAMPS = {
|
|
|
867
943
|
encode: (value) => value
|
|
868
944
|
};
|
|
869
945
|
var POSTGRES_INDEX_MAT_TIMESTAMPS = {
|
|
870
|
-
decode:
|
|
946
|
+
decode: chunkBEB4OFZF_cjs.formatPostgresTimestamp,
|
|
871
947
|
encode: (value) => new Date(value)
|
|
872
948
|
};
|
|
873
949
|
function mapMaterializationRow(row, decode) {
|
|
@@ -925,7 +1001,7 @@ var SQLITE_KIND_REMOVAL_TIMESTAMPS = {
|
|
|
925
1001
|
encode: (value) => value
|
|
926
1002
|
};
|
|
927
1003
|
var POSTGRES_KIND_REMOVAL_TIMESTAMPS = {
|
|
928
|
-
decode:
|
|
1004
|
+
decode: chunkBEB4OFZF_cjs.formatPostgresTimestamp,
|
|
929
1005
|
encode: (value) => new Date(value)
|
|
930
1006
|
};
|
|
931
1007
|
function mapKindRemovalRow(row, decode) {
|
|
@@ -1121,12 +1197,12 @@ function present(value) {
|
|
|
1121
1197
|
function mapHybridSearchRow(row, toNodeRow) {
|
|
1122
1198
|
return {
|
|
1123
1199
|
node: toNodeRow(row),
|
|
1124
|
-
fusedScore:
|
|
1200
|
+
fusedScore: chunkBEB4OFZF_cjs.coerceNumericScore(row["fused_score"]),
|
|
1125
1201
|
...present(row["vector_rank"]) ? { vectorRank: Number(row["vector_rank"]) } : {},
|
|
1126
|
-
...present(row["vector_score"]) ? { vectorScore:
|
|
1202
|
+
...present(row["vector_score"]) ? { vectorScore: chunkBEB4OFZF_cjs.coerceNumericScore(row["vector_score"]) } : {},
|
|
1127
1203
|
...present(row["fulltext_rank"]) ? { fulltextRank: Number(row["fulltext_rank"]) } : {},
|
|
1128
1204
|
...present(row["fulltext_score"]) ? {
|
|
1129
|
-
fulltextScore:
|
|
1205
|
+
fulltextScore: chunkBEB4OFZF_cjs.coerceNumericScore(
|
|
1130
1206
|
row["fulltext_score"]
|
|
1131
1207
|
)
|
|
1132
1208
|
} : {},
|
|
@@ -1138,7 +1214,7 @@ function buildClearGraph(tables, graphId) {
|
|
|
1138
1214
|
// The fulltext table is shared by every graph in the database, so its
|
|
1139
1215
|
// graph-scoped delete is owned by one builder the destructive
|
|
1140
1216
|
// contribution rebuild calls too — see `buildFulltextGraphDelete`.
|
|
1141
|
-
{ query:
|
|
1217
|
+
{ query: chunkZHOAZD7Q_cjs.buildFulltextGraphDelete(tables.fulltextTableName, graphId) },
|
|
1142
1218
|
{
|
|
1143
1219
|
query: drizzleOrm.sql`DELETE FROM ${tables.recordedIdentityAssertions} WHERE ${tables.recordedIdentityAssertions.graphId} = ${graphId}`,
|
|
1144
1220
|
ignoreMissingTable: true,
|
|
@@ -1679,11 +1755,11 @@ function buildFulltextSearch(tableName, params, strategy, dialect, candidates) {
|
|
|
1679
1755
|
assertValidSearchParams(params);
|
|
1680
1756
|
const mode = resolveMode(params.mode);
|
|
1681
1757
|
const table = quotedTableName(tableName);
|
|
1682
|
-
const matchCondition =
|
|
1758
|
+
const matchCondition = chunkDYPRZ53S_cjs.toDrizzleSql(
|
|
1683
1759
|
strategy.matchCondition(tableName, params.query, mode, params.language),
|
|
1684
1760
|
dialect
|
|
1685
1761
|
);
|
|
1686
|
-
const rankExpression =
|
|
1762
|
+
const rankExpression = chunkDYPRZ53S_cjs.toDrizzleSql(
|
|
1687
1763
|
strategy.rankExpression(tableName, params.query, mode, params.language),
|
|
1688
1764
|
dialect
|
|
1689
1765
|
);
|
|
@@ -1696,10 +1772,10 @@ function buildFulltextSearch(tableName, params, strategy, dialect, candidates) {
|
|
|
1696
1772
|
conditions.push(drizzleOrm.sql`${rankExpression} >= ${params.minScore}`);
|
|
1697
1773
|
}
|
|
1698
1774
|
if (candidates !== void 0) {
|
|
1699
|
-
const candidateSql =
|
|
1775
|
+
const candidateSql = chunk2ZWM2RFH_cjs.isSqlFragment(candidates) ? chunkDYPRZ53S_cjs.toDrizzleSql(candidates, dialect) : candidates;
|
|
1700
1776
|
conditions.push(drizzleOrm.sql`"node_id" IN (${candidateSql})`);
|
|
1701
1777
|
}
|
|
1702
|
-
const snippetExpr = params.includeSnippets === true && strategy.supportsSnippets ?
|
|
1778
|
+
const snippetExpr = params.includeSnippets === true && strategy.supportsSnippets ? chunkDYPRZ53S_cjs.toDrizzleSql(
|
|
1703
1779
|
strategy.snippetExpression(
|
|
1704
1780
|
tableName,
|
|
1705
1781
|
params.query,
|
|
@@ -1854,18 +1930,18 @@ function buildUpdateNode(tables, params, timestamp) {
|
|
|
1854
1930
|
}
|
|
1855
1931
|
function buildUpdateNodeSet(tables, dialect, params, timestamp) {
|
|
1856
1932
|
const { nodes } = tables;
|
|
1857
|
-
const adapter =
|
|
1858
|
-
const patchedProps =
|
|
1933
|
+
const adapter = chunkZHOAZD7Q_cjs.getDialect(dialect);
|
|
1934
|
+
const patchedProps = chunkDYPRZ53S_cjs.toDrizzleSql(
|
|
1859
1935
|
adapter.jsonSetProperties(
|
|
1860
|
-
|
|
1936
|
+
chunk2ZWM2RFH_cjs.sql.identifier(nodes.props.name),
|
|
1861
1937
|
params.patch,
|
|
1862
1938
|
params.unsetProperties ?? []
|
|
1863
1939
|
),
|
|
1864
1940
|
dialect
|
|
1865
1941
|
);
|
|
1866
|
-
const candidateIds =
|
|
1867
|
-
const candidateIdColumn =
|
|
1868
|
-
|
|
1942
|
+
const candidateIds = chunkDYPRZ53S_cjs.toDrizzleSql(params.candidateIds, dialect);
|
|
1943
|
+
const candidateIdColumn = chunkDYPRZ53S_cjs.toDrizzleSql(
|
|
1944
|
+
chunk2ZWM2RFH_cjs.sql.identifier(params.candidateIdColumn),
|
|
1869
1945
|
dialect
|
|
1870
1946
|
);
|
|
1871
1947
|
return drizzleOrm.sql`
|
|
@@ -2243,15 +2319,15 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
|
|
|
2243
2319
|
const fulltextTable = tables.fulltextTableName;
|
|
2244
2320
|
const contributionMaterializations = tables.contributionMaterializations;
|
|
2245
2321
|
const fulltextBuilders = {
|
|
2246
|
-
buildUpsertFulltext: (params, timestamp) => fulltextStrategy.buildUpsert(fulltextTable, params, timestamp).map((statement) =>
|
|
2247
|
-
buildDeleteFulltext: (params) => fulltextStrategy.buildDelete(fulltextTable, params).map((statement) =>
|
|
2322
|
+
buildUpsertFulltext: (params, timestamp) => fulltextStrategy.buildUpsert(fulltextTable, params, timestamp).map((statement) => chunkDYPRZ53S_cjs.toDrizzleSql(statement, dialect)),
|
|
2323
|
+
buildDeleteFulltext: (params) => fulltextStrategy.buildDelete(fulltextTable, params).map((statement) => chunkDYPRZ53S_cjs.toDrizzleSql(statement, dialect)),
|
|
2248
2324
|
buildDeleteFulltextByNode: (graphId, nodeKind, nodeId) => fulltextStrategy.buildDelete(fulltextTable, {
|
|
2249
2325
|
graphId,
|
|
2250
2326
|
nodeKind,
|
|
2251
2327
|
nodeId
|
|
2252
|
-
}).map((statement) =>
|
|
2253
|
-
buildUpsertFulltextBatch: (params, timestamp) => fulltextStrategy.buildBatchUpsert(fulltextTable, params, timestamp).map((statement) =>
|
|
2254
|
-
buildDeleteFulltextBatch: (params) => fulltextStrategy.buildBatchDelete(fulltextTable, params).map((statement) =>
|
|
2328
|
+
}).map((statement) => chunkDYPRZ53S_cjs.toDrizzleSql(statement, dialect)),
|
|
2329
|
+
buildUpsertFulltextBatch: (params, timestamp) => fulltextStrategy.buildBatchUpsert(fulltextTable, params, timestamp).map((statement) => chunkDYPRZ53S_cjs.toDrizzleSql(statement, dialect)),
|
|
2330
|
+
buildDeleteFulltextBatch: (params) => fulltextStrategy.buildBatchDelete(fulltextTable, params).map((statement) => chunkDYPRZ53S_cjs.toDrizzleSql(statement, dialect)),
|
|
2255
2331
|
buildFulltextSearch: (params) => buildFulltextSearch(
|
|
2256
2332
|
fulltextTable,
|
|
2257
2333
|
params,
|
|
@@ -2263,7 +2339,7 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
|
|
|
2263
2339
|
tables.nodes,
|
|
2264
2340
|
params.graphId,
|
|
2265
2341
|
params.nodeKind,
|
|
2266
|
-
|
|
2342
|
+
chunkBEB4OFZF_cjs.nowIso()
|
|
2267
2343
|
)
|
|
2268
2344
|
),
|
|
2269
2345
|
buildHybridSearch: (params, vectorSql, vectorScoreDescending) => {
|
|
@@ -2271,7 +2347,7 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
|
|
|
2271
2347
|
tables.nodes,
|
|
2272
2348
|
params.graphId,
|
|
2273
2349
|
params.nodeKind,
|
|
2274
|
-
|
|
2350
|
+
chunkBEB4OFZF_cjs.nowIso()
|
|
2275
2351
|
);
|
|
2276
2352
|
const fulltextSql = buildFulltextSearch(
|
|
2277
2353
|
fulltextTable,
|
|
@@ -2292,7 +2368,7 @@ function createCommonOperationStrategy(tables, dialect, fulltextStrategy) {
|
|
|
2292
2368
|
hybridCandidatesRef()
|
|
2293
2369
|
);
|
|
2294
2370
|
return buildHybridSearchStatement({
|
|
2295
|
-
candidatesSql:
|
|
2371
|
+
candidatesSql: chunk2ZWM2RFH_cjs.isSqlFragment(candidates) ? chunkDYPRZ53S_cjs.toDrizzleSql(candidates, dialect) : candidates,
|
|
2296
2372
|
vectorSql,
|
|
2297
2373
|
vectorScoreDescending,
|
|
2298
2374
|
fulltextSql,
|
|
@@ -2422,7 +2498,7 @@ var DRIZZLE_DIALECT_LABELS = {
|
|
|
2422
2498
|
function assertAdoptedDialect(externalTx, brand, backend) {
|
|
2423
2499
|
if (drizzleOrm.is(externalTx, brand)) return;
|
|
2424
2500
|
const label = DRIZZLE_DIALECT_LABELS[backend];
|
|
2425
|
-
throw new
|
|
2501
|
+
throw new chunkKCH7WQA5_cjs.ConfigurationError(
|
|
2426
2502
|
`adoptTransaction received a handle that is not a ${label} Drizzle transaction. Pass the \`tx\` from a ${label} \`db.transaction(...)\` opened on this backend's connection.`,
|
|
2427
2503
|
{ backend, capability: "adoptTransaction" }
|
|
2428
2504
|
);
|
|
@@ -2431,8 +2507,8 @@ async function withDuplicateKeyClassification(run, context) {
|
|
|
2431
2507
|
try {
|
|
2432
2508
|
return await run();
|
|
2433
2509
|
} catch (error) {
|
|
2434
|
-
if (!
|
|
2435
|
-
throw new
|
|
2510
|
+
if (!chunkGVAMRRZR_cjs.isDuplicatePrimaryKeyError(error, context.relation)) throw error;
|
|
2511
|
+
throw new chunkKCH7WQA5_cjs.DatabaseOperationError(
|
|
2436
2512
|
`Insert ${context.entity} failed: a row with this identity already exists`,
|
|
2437
2513
|
{
|
|
2438
2514
|
operation: "insert",
|
|
@@ -2453,7 +2529,7 @@ function verifyExpectedActiveVersion(graphId, expected, actualActiveVersion) {
|
|
|
2453
2529
|
}
|
|
2454
2530
|
function assertActiveSchemaVersion(graphId, expectedVersion, actualActiveVersion) {
|
|
2455
2531
|
if (actualActiveVersion !== expectedVersion) {
|
|
2456
|
-
throw new
|
|
2532
|
+
throw new chunkKCH7WQA5_cjs.StaleVersionError({
|
|
2457
2533
|
graphId,
|
|
2458
2534
|
expected: expectedVersion,
|
|
2459
2535
|
actual: actualActiveVersion
|
|
@@ -2503,7 +2579,7 @@ function createCommonOperationBackend(options) {
|
|
|
2503
2579
|
operationStrategy,
|
|
2504
2580
|
rowMappers
|
|
2505
2581
|
} = options;
|
|
2506
|
-
const nowIso2 = options.nowIso ??
|
|
2582
|
+
const nowIso2 = options.nowIso ?? chunkBEB4OFZF_cjs.nowIso;
|
|
2507
2583
|
const tableExists = createCachedTableExistence(
|
|
2508
2584
|
(tableName) => execution.execGet(
|
|
2509
2585
|
operationStrategy.buildTableExists(tableName)
|
|
@@ -2525,7 +2601,7 @@ function createCommonOperationBackend(options) {
|
|
|
2525
2601
|
return {
|
|
2526
2602
|
tableExists,
|
|
2527
2603
|
async executeSchemaDdl(ddl) {
|
|
2528
|
-
await execution.execRun(
|
|
2604
|
+
await execution.execRun(chunk2ZWM2RFH_cjs.asCompiledStatementSql(chunk2ZWM2RFH_cjs.sql.raw(ddl)));
|
|
2529
2605
|
},
|
|
2530
2606
|
async executeStatement(query) {
|
|
2531
2607
|
await execution.execRun(query);
|
|
@@ -2545,7 +2621,7 @@ function createCommonOperationBackend(options) {
|
|
|
2545
2621
|
}
|
|
2546
2622
|
);
|
|
2547
2623
|
if (!row)
|
|
2548
|
-
throw new
|
|
2624
|
+
throw new chunkKCH7WQA5_cjs.DatabaseOperationError(
|
|
2549
2625
|
"Insert node failed: no row returned",
|
|
2550
2626
|
{
|
|
2551
2627
|
operation: "insert",
|
|
@@ -2572,7 +2648,7 @@ function createCommonOperationBackend(options) {
|
|
|
2572
2648
|
return;
|
|
2573
2649
|
}
|
|
2574
2650
|
const timestamp = nowIso2();
|
|
2575
|
-
for (const chunk2 of
|
|
2651
|
+
for (const chunk2 of chunkGVAMRRZR_cjs.chunk(params, batchConfig.nodeInsertBatchSize)) {
|
|
2576
2652
|
const query = operationStrategy.buildInsertNodesBatch(chunk2, timestamp);
|
|
2577
2653
|
await withDuplicateKeyClassification(() => execution.execRun(query), {
|
|
2578
2654
|
entity: "node",
|
|
@@ -2587,7 +2663,7 @@ function createCommonOperationBackend(options) {
|
|
|
2587
2663
|
}
|
|
2588
2664
|
const timestamp = nowIso2();
|
|
2589
2665
|
const allRows = [];
|
|
2590
|
-
for (const chunk2 of
|
|
2666
|
+
for (const chunk2 of chunkGVAMRRZR_cjs.chunk(params, batchConfig.nodeInsertBatchSize)) {
|
|
2591
2667
|
const query = operationStrategy.buildInsertNodesBatchReturning(
|
|
2592
2668
|
chunk2,
|
|
2593
2669
|
timestamp
|
|
@@ -2612,7 +2688,7 @@ function createCommonOperationBackend(options) {
|
|
|
2612
2688
|
async getNodes(graphId, kind, ids) {
|
|
2613
2689
|
if (ids.length === 0) return [];
|
|
2614
2690
|
const allRows = [];
|
|
2615
|
-
for (const chunk2 of
|
|
2691
|
+
for (const chunk2 of chunkGVAMRRZR_cjs.chunk(ids, batchConfig.getNodesChunkSize)) {
|
|
2616
2692
|
const query = operationStrategy.buildGetNodes(graphId, kind, chunk2);
|
|
2617
2693
|
const rows = await execution.execAll(query);
|
|
2618
2694
|
allRows.push(...rows.map((row) => rowMappers.toNodeRow(row)));
|
|
@@ -2624,7 +2700,7 @@ function createCommonOperationBackend(options) {
|
|
|
2624
2700
|
const query = operationStrategy.buildUpdateNode(params, timestamp);
|
|
2625
2701
|
const row = await execution.execGet(query);
|
|
2626
2702
|
if (!row)
|
|
2627
|
-
throw new
|
|
2703
|
+
throw new chunkKCH7WQA5_cjs.DatabaseOperationError(
|
|
2628
2704
|
"Update node failed: no row returned",
|
|
2629
2705
|
{
|
|
2630
2706
|
operation: "update",
|
|
@@ -2636,13 +2712,13 @@ function createCommonOperationBackend(options) {
|
|
|
2636
2712
|
},
|
|
2637
2713
|
async updateNodeSet(params) {
|
|
2638
2714
|
if (Object.keys(params.patch).length === 0 && (params.unsetProperties?.length ?? 0) === 0) {
|
|
2639
|
-
throw new
|
|
2715
|
+
throw new chunkKCH7WQA5_cjs.ConfigurationError(
|
|
2640
2716
|
"Set-based node update requires at least one property",
|
|
2641
2717
|
{ operation: "updateNodeSet", kind: params.kind }
|
|
2642
2718
|
);
|
|
2643
2719
|
}
|
|
2644
2720
|
if (params.candidateIdColumn.length === 0) {
|
|
2645
|
-
throw new
|
|
2721
|
+
throw new chunkKCH7WQA5_cjs.ConfigurationError(
|
|
2646
2722
|
"Set-based node update requires a candidate id column",
|
|
2647
2723
|
{ operation: "updateNodeSet", kind: params.kind }
|
|
2648
2724
|
);
|
|
@@ -2703,7 +2779,7 @@ function createCommonOperationBackend(options) {
|
|
|
2703
2779
|
}
|
|
2704
2780
|
);
|
|
2705
2781
|
if (!row)
|
|
2706
|
-
throw new
|
|
2782
|
+
throw new chunkKCH7WQA5_cjs.DatabaseOperationError(
|
|
2707
2783
|
"Insert edge failed: no row returned",
|
|
2708
2784
|
{
|
|
2709
2785
|
operation: "insert",
|
|
@@ -2730,7 +2806,7 @@ function createCommonOperationBackend(options) {
|
|
|
2730
2806
|
return;
|
|
2731
2807
|
}
|
|
2732
2808
|
const timestamp = nowIso2();
|
|
2733
|
-
for (const chunk2 of
|
|
2809
|
+
for (const chunk2 of chunkGVAMRRZR_cjs.chunk(params, batchConfig.edgeInsertBatchSize)) {
|
|
2734
2810
|
const query = operationStrategy.buildInsertEdgesBatch(chunk2, timestamp);
|
|
2735
2811
|
await withDuplicateKeyClassification(() => execution.execRun(query), {
|
|
2736
2812
|
entity: "edge",
|
|
@@ -2745,7 +2821,7 @@ function createCommonOperationBackend(options) {
|
|
|
2745
2821
|
}
|
|
2746
2822
|
const timestamp = nowIso2();
|
|
2747
2823
|
const allRows = [];
|
|
2748
|
-
for (const chunk2 of
|
|
2824
|
+
for (const chunk2 of chunkGVAMRRZR_cjs.chunk(params, batchConfig.edgeInsertBatchSize)) {
|
|
2749
2825
|
const query = operationStrategy.buildInsertEdgesBatchReturning(
|
|
2750
2826
|
chunk2,
|
|
2751
2827
|
timestamp
|
|
@@ -2770,7 +2846,7 @@ function createCommonOperationBackend(options) {
|
|
|
2770
2846
|
async getEdges(graphId, ids) {
|
|
2771
2847
|
if (ids.length === 0) return [];
|
|
2772
2848
|
const allRows = [];
|
|
2773
|
-
for (const chunk2 of
|
|
2849
|
+
for (const chunk2 of chunkGVAMRRZR_cjs.chunk(ids, batchConfig.getEdgesChunkSize)) {
|
|
2774
2850
|
const query = operationStrategy.buildGetEdges(graphId, chunk2);
|
|
2775
2851
|
const rows = await execution.execAll(query);
|
|
2776
2852
|
allRows.push(...rows.map((row) => rowMappers.toEdgeRow(row)));
|
|
@@ -2782,7 +2858,7 @@ function createCommonOperationBackend(options) {
|
|
|
2782
2858
|
const query = operationStrategy.buildUpdateEdge(params, timestamp);
|
|
2783
2859
|
const row = await execution.execGet(query);
|
|
2784
2860
|
if (!row)
|
|
2785
|
-
throw new
|
|
2861
|
+
throw new chunkKCH7WQA5_cjs.DatabaseOperationError(
|
|
2786
2862
|
"Update edge failed: no row returned",
|
|
2787
2863
|
{
|
|
2788
2864
|
operation: "update",
|
|
@@ -2808,7 +2884,7 @@ function createCommonOperationBackend(options) {
|
|
|
2808
2884
|
1,
|
|
2809
2885
|
batchConfig.getEdgesChunkSize - 1
|
|
2810
2886
|
);
|
|
2811
|
-
for (const chunk2 of
|
|
2887
|
+
for (const chunk2 of chunkGVAMRRZR_cjs.chunk(params.ids, softDeleteChunkSize)) {
|
|
2812
2888
|
const query = operationStrategy.buildDeleteEdgesBatch(
|
|
2813
2889
|
{ graphId: params.graphId, ids: chunk2 },
|
|
2814
2890
|
timestamp
|
|
@@ -2818,7 +2894,7 @@ function createCommonOperationBackend(options) {
|
|
|
2818
2894
|
},
|
|
2819
2895
|
async hardDeleteEdgesBatch(params) {
|
|
2820
2896
|
if (params.ids.length === 0) return;
|
|
2821
|
-
for (const chunk2 of
|
|
2897
|
+
for (const chunk2 of chunkGVAMRRZR_cjs.chunk(
|
|
2822
2898
|
params.ids,
|
|
2823
2899
|
batchConfig.getEdgesChunkSize
|
|
2824
2900
|
)) {
|
|
@@ -2862,7 +2938,7 @@ function createCommonOperationBackend(options) {
|
|
|
2862
2938
|
async findEdgesByEndpointSet(params) {
|
|
2863
2939
|
const ids = resolveEdgeEndpointIds(params);
|
|
2864
2940
|
const edgeRows = [];
|
|
2865
|
-
for (const idChunk of
|
|
2941
|
+
for (const idChunk of chunkGVAMRRZR_cjs.chunk(
|
|
2866
2942
|
ids,
|
|
2867
2943
|
batchConfig.findEdgesEndpointChunkSize
|
|
2868
2944
|
)) {
|
|
@@ -2879,7 +2955,7 @@ function createCommonOperationBackend(options) {
|
|
|
2879
2955
|
const { edgeKinds, endpoints, endpointChunkSize } = resolveHeterogeneousEdgeRead(params, maxBindParameters);
|
|
2880
2956
|
if (edgeKinds.length === 0 || endpoints.length === 0) return [];
|
|
2881
2957
|
const edgeRows = [];
|
|
2882
|
-
for (const endpointChunk of
|
|
2958
|
+
for (const endpointChunk of chunkGVAMRRZR_cjs.chunk(endpoints, endpointChunkSize)) {
|
|
2883
2959
|
const query = operationStrategy.buildFindEdgesByHeterogeneousEndpointSet(
|
|
2884
2960
|
params,
|
|
2885
2961
|
endpointChunk,
|
|
@@ -2899,7 +2975,7 @@ function createCommonOperationBackend(options) {
|
|
|
2899
2975
|
const query = operationStrategy.buildInsertUnique(params);
|
|
2900
2976
|
const result = await execution.execGet(query);
|
|
2901
2977
|
if (result && result.node_id !== params.nodeId) {
|
|
2902
|
-
throw new
|
|
2978
|
+
throw new chunkKCH7WQA5_cjs.UniquenessError({
|
|
2903
2979
|
constraintName: params.constraintName,
|
|
2904
2980
|
kind: params.nodeKind,
|
|
2905
2981
|
existingId: result.node_id,
|
|
@@ -2919,7 +2995,7 @@ function createCommonOperationBackend(options) {
|
|
|
2919
2995
|
continue;
|
|
2920
2996
|
}
|
|
2921
2997
|
if (existing.nodeId !== entry.nodeId) {
|
|
2922
|
-
throw new
|
|
2998
|
+
throw new chunkKCH7WQA5_cjs.UniquenessError({
|
|
2923
2999
|
constraintName: entry.constraintName,
|
|
2924
3000
|
kind: entry.nodeKind,
|
|
2925
3001
|
existingId: existing.nodeId,
|
|
@@ -2929,7 +3005,7 @@ function createCommonOperationBackend(options) {
|
|
|
2929
3005
|
}
|
|
2930
3006
|
}
|
|
2931
3007
|
const deduped = [...byTarget.values()];
|
|
2932
|
-
for (const chunk2 of
|
|
3008
|
+
for (const chunk2 of chunkGVAMRRZR_cjs.chunk(
|
|
2933
3009
|
deduped,
|
|
2934
3010
|
batchConfig.uniqueInsertBatchSize
|
|
2935
3011
|
)) {
|
|
@@ -2944,7 +3020,7 @@ function createCommonOperationBackend(options) {
|
|
|
2944
3020
|
for (const entry of chunk2) {
|
|
2945
3021
|
const owner = ownerByTarget.get(targetKey(entry));
|
|
2946
3022
|
if (owner !== void 0 && owner !== entry.nodeId) {
|
|
2947
|
-
throw new
|
|
3023
|
+
throw new chunkKCH7WQA5_cjs.UniquenessError({
|
|
2948
3024
|
constraintName: entry.constraintName,
|
|
2949
3025
|
kind: entry.nodeKind,
|
|
2950
3026
|
existingId: owner,
|
|
@@ -2962,7 +3038,7 @@ function createCommonOperationBackend(options) {
|
|
|
2962
3038
|
},
|
|
2963
3039
|
async hardDeleteUniquesByNodeIds(params) {
|
|
2964
3040
|
const nodeIds = [...new Set(params.nodeIds)];
|
|
2965
|
-
for (const chunk2 of
|
|
3041
|
+
for (const chunk2 of chunkGVAMRRZR_cjs.chunk(
|
|
2966
3042
|
nodeIds,
|
|
2967
3043
|
batchConfig.uniqueDeleteChunkSize
|
|
2968
3044
|
)) {
|
|
@@ -2981,7 +3057,7 @@ function createCommonOperationBackend(options) {
|
|
|
2981
3057
|
async checkUniqueBatch(params) {
|
|
2982
3058
|
if (params.keys.length === 0) return [];
|
|
2983
3059
|
const allRows = [];
|
|
2984
|
-
for (const chunk2 of
|
|
3060
|
+
for (const chunk2 of chunkGVAMRRZR_cjs.chunk(
|
|
2985
3061
|
params.keys,
|
|
2986
3062
|
batchConfig.checkUniqueBatchChunkSize
|
|
2987
3063
|
)) {
|
|
@@ -3012,7 +3088,7 @@ function createCommonOperationBackend(options) {
|
|
|
3012
3088
|
if (existingRaw !== void 0) {
|
|
3013
3089
|
const existing = rowMappers.toSchemaVersionRow(existingRaw);
|
|
3014
3090
|
if (existing.schema_hash !== params.schemaHash) {
|
|
3015
|
-
throw new
|
|
3091
|
+
throw new chunkKCH7WQA5_cjs.SchemaContentConflictError({
|
|
3016
3092
|
graphId: params.graphId,
|
|
3017
3093
|
version: params.version,
|
|
3018
3094
|
existingHash: existing.schema_hash,
|
|
@@ -3060,7 +3136,7 @@ function createCommonOperationBackend(options) {
|
|
|
3060
3136
|
);
|
|
3061
3137
|
const insertedRaw = await execution.execGet(insertQuery);
|
|
3062
3138
|
if (!insertedRaw) {
|
|
3063
|
-
throw new
|
|
3139
|
+
throw new chunkKCH7WQA5_cjs.DatabaseOperationError(
|
|
3064
3140
|
"Insert schema failed: no row returned",
|
|
3065
3141
|
{ operation: "insert", entity: "schema" }
|
|
3066
3142
|
);
|
|
@@ -3078,7 +3154,7 @@ function createCommonOperationBackend(options) {
|
|
|
3078
3154
|
operationStrategy.buildGetSchemaVersion(params.graphId, params.version)
|
|
3079
3155
|
);
|
|
3080
3156
|
if (!targetRaw) {
|
|
3081
|
-
throw new
|
|
3157
|
+
throw new chunkKCH7WQA5_cjs.MigrationError(
|
|
3082
3158
|
`Cannot activate version ${params.version}: version does not exist for graph "${params.graphId}".`,
|
|
3083
3159
|
{
|
|
3084
3160
|
graphId: params.graphId,
|
|
@@ -3111,7 +3187,7 @@ function quoteSqlIdentifier(identifier) {
|
|
|
3111
3187
|
}
|
|
3112
3188
|
function requireRawExecution(backend) {
|
|
3113
3189
|
if (backend.executeRaw === void 0) {
|
|
3114
|
-
throw new
|
|
3190
|
+
throw new chunkKCH7WQA5_cjs.TrustedImportError(
|
|
3115
3191
|
"This backend cannot execute the raw statements required by trusted import.",
|
|
3116
3192
|
"backend_unsupported"
|
|
3117
3193
|
);
|
|
@@ -3120,7 +3196,7 @@ function requireRawExecution(backend) {
|
|
|
3120
3196
|
}
|
|
3121
3197
|
function requireStatementExecution(backend) {
|
|
3122
3198
|
if (backend.executeStatement === void 0) {
|
|
3123
|
-
throw new
|
|
3199
|
+
throw new chunkKCH7WQA5_cjs.TrustedImportError(
|
|
3124
3200
|
"This backend cannot execute the index lifecycle required by trusted import.",
|
|
3125
3201
|
"backend_unsupported"
|
|
3126
3202
|
);
|
|
@@ -3142,7 +3218,7 @@ async function assertTrustedImportDatabaseEmpty(backend, tableNames) {
|
|
|
3142
3218
|
[]
|
|
3143
3219
|
);
|
|
3144
3220
|
if (!rowIndicatesExistingData(rows[0])) return;
|
|
3145
|
-
throw new
|
|
3221
|
+
throw new chunkKCH7WQA5_cjs.TrustedImportError(
|
|
3146
3222
|
"Trusted import requires globally empty TypeGraph node and edge tables.",
|
|
3147
3223
|
"database_not_empty",
|
|
3148
3224
|
{ tables: [tableNames.nodes, tableNames.edges] },
|
|
@@ -3154,8 +3230,8 @@ async function assertTrustedImportDatabaseEmpty(backend, tableNames) {
|
|
|
3154
3230
|
async function lockPostgresTrustedImportTables(backend, tableNames) {
|
|
3155
3231
|
const executeStatement = requireStatementExecution(backend);
|
|
3156
3232
|
await executeStatement(
|
|
3157
|
-
|
|
3158
|
-
|
|
3233
|
+
chunk2ZWM2RFH_cjs.asCompiledStatementSql(
|
|
3234
|
+
chunk2ZWM2RFH_cjs.sql.raw(
|
|
3159
3235
|
`LOCK TABLE ${quoteSqlIdentifier(tableNames.nodes)}, ${quoteSqlIdentifier(tableNames.edges)} IN ACCESS EXCLUSIVE MODE`
|
|
3160
3236
|
)
|
|
3161
3237
|
)
|
|
@@ -3175,8 +3251,8 @@ async function suspendSqliteSecondaryIndexes(backend, tableNames) {
|
|
|
3175
3251
|
);
|
|
3176
3252
|
for (const definition of definitions) {
|
|
3177
3253
|
await executeStatement(
|
|
3178
|
-
|
|
3179
|
-
|
|
3254
|
+
chunk2ZWM2RFH_cjs.asCompiledStatementSql(
|
|
3255
|
+
chunk2ZWM2RFH_cjs.sql.raw(`DROP INDEX ${quoteSqlIdentifier(definition.index_name)}`)
|
|
3180
3256
|
)
|
|
3181
3257
|
);
|
|
3182
3258
|
}
|
|
@@ -3206,8 +3282,8 @@ async function suspendPostgresSecondaryIndexes(backend, tableNames) {
|
|
|
3206
3282
|
);
|
|
3207
3283
|
for (const definition of definitions) {
|
|
3208
3284
|
await executeStatement(
|
|
3209
|
-
|
|
3210
|
-
|
|
3285
|
+
chunk2ZWM2RFH_cjs.asCompiledStatementSql(
|
|
3286
|
+
chunk2ZWM2RFH_cjs.sql.raw(`DROP INDEX ${quoteSqlIdentifier(definition.index_name)}`)
|
|
3211
3287
|
)
|
|
3212
3288
|
);
|
|
3213
3289
|
}
|
|
@@ -3217,20 +3293,20 @@ async function restoreSecondaryIndexes(backend, definitions) {
|
|
|
3217
3293
|
const executeStatement = requireStatementExecution(backend);
|
|
3218
3294
|
for (const definition of definitions) {
|
|
3219
3295
|
await executeStatement(
|
|
3220
|
-
|
|
3296
|
+
chunk2ZWM2RFH_cjs.asCompiledStatementSql(chunk2ZWM2RFH_cjs.sql.raw(definition.index_definition))
|
|
3221
3297
|
);
|
|
3222
3298
|
}
|
|
3223
3299
|
}
|
|
3224
3300
|
async function analyzeImportedTables(backend, tableNames) {
|
|
3225
3301
|
const executeStatement = requireStatementExecution(backend);
|
|
3226
3302
|
await executeStatement(
|
|
3227
|
-
|
|
3228
|
-
|
|
3303
|
+
chunk2ZWM2RFH_cjs.asCompiledStatementSql(
|
|
3304
|
+
chunk2ZWM2RFH_cjs.sql.raw(`ANALYZE ${quoteSqlIdentifier(tableNames.nodes)}`)
|
|
3229
3305
|
)
|
|
3230
3306
|
);
|
|
3231
3307
|
await executeStatement(
|
|
3232
|
-
|
|
3233
|
-
|
|
3308
|
+
chunk2ZWM2RFH_cjs.asCompiledStatementSql(
|
|
3309
|
+
chunk2ZWM2RFH_cjs.sql.raw(`ANALYZE ${quoteSqlIdentifier(tableNames.edges)}`)
|
|
3234
3310
|
)
|
|
3235
3311
|
);
|
|
3236
3312
|
}
|
|
@@ -3245,7 +3321,7 @@ function postgresArray(values) {
|
|
|
3245
3321
|
function createSqliteTrustedImportSession(executionAdapter, tableNames) {
|
|
3246
3322
|
const executePreparedRunBatch = executionAdapter.executePreparedRunBatch;
|
|
3247
3323
|
if (executePreparedRunBatch === void 0) {
|
|
3248
|
-
throw new
|
|
3324
|
+
throw new chunkKCH7WQA5_cjs.TrustedImportError(
|
|
3249
3325
|
"Trusted import requires a synchronous SQLite driver with prepared statement support.",
|
|
3250
3326
|
"backend_unsupported"
|
|
3251
3327
|
);
|
|
@@ -3417,5 +3493,5 @@ exports.tableExistsFromRow = tableExistsFromRow;
|
|
|
3417
3493
|
exports.vectorSlotFromCreateIndexParams = vectorSlotFromCreateIndexParams;
|
|
3418
3494
|
exports.vectorSlotFromDropIndexParams = vectorSlotFromDropIndexParams;
|
|
3419
3495
|
exports.vectorSlotFromParams = vectorSlotFromParams;
|
|
3420
|
-
//# sourceMappingURL=chunk-
|
|
3421
|
-
//# sourceMappingURL=chunk-
|
|
3496
|
+
//# sourceMappingURL=chunk-RHDOAQCT.cjs.map
|
|
3497
|
+
//# sourceMappingURL=chunk-RHDOAQCT.cjs.map
|