@nicia-ai/typegraph 0.37.1 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -10
- package/dist/backend/drizzle/indexes.cjs +32 -0
- package/dist/backend/drizzle/indexes.cjs.map +1 -0
- package/dist/backend/drizzle/indexes.d.cts +43 -0
- package/dist/backend/drizzle/indexes.d.ts +43 -0
- package/dist/backend/drizzle/indexes.js +11 -0
- package/dist/backend/drizzle/indexes.js.map +1 -0
- package/dist/backend/index.cjs +161 -0
- package/dist/backend/index.cjs.map +1 -0
- package/dist/backend/index.d.cts +3 -0
- package/dist/backend/index.d.ts +3 -0
- package/dist/backend/index.js +8 -0
- package/dist/backend/index.js.map +1 -0
- package/dist/backend/postgres/index.cjs +32 -28
- package/dist/backend/postgres/index.d.cts +13 -12
- package/dist/backend/postgres/index.d.ts +13 -12
- package/dist/backend/postgres/index.js +19 -15
- package/dist/backend/postgres/pglite-store.cjs +67 -0
- package/dist/backend/postgres/pglite-store.cjs.map +1 -0
- package/dist/backend/postgres/pglite-store.d.cts +38 -0
- package/dist/backend/postgres/pglite-store.d.ts +38 -0
- package/dist/backend/postgres/pglite-store.js +65 -0
- package/dist/backend/postgres/pglite-store.js.map +1 -0
- package/dist/backend/postgres/pglite.cjs +25 -50
- package/dist/backend/postgres/pglite.cjs.map +1 -1
- package/dist/backend/postgres/pglite.d.cts +10 -9
- package/dist/backend/postgres/pglite.d.ts +10 -9
- package/dist/backend/postgres/pglite.js +20 -52
- package/dist/backend/postgres/pglite.js.map +1 -1
- package/dist/backend/sqlite/index.cjs +29 -25
- package/dist/backend/sqlite/index.d.cts +11 -11
- package/dist/backend/sqlite/index.d.ts +11 -11
- package/dist/backend/sqlite/index.js +17 -13
- package/dist/backend/sqlite/libsql.cjs +23 -19
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +9 -10
- package/dist/backend/sqlite/libsql.d.ts +9 -10
- package/dist/backend/sqlite/libsql.js +19 -15
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +72 -0
- package/dist/backend/sqlite/local-store.cjs.map +1 -0
- package/dist/backend/sqlite/local-store.d.cts +42 -0
- package/dist/backend/sqlite/local-store.d.ts +42 -0
- package/dist/backend/sqlite/local-store.js +67 -0
- package/dist/backend/sqlite/local-store.js.map +1 -0
- package/dist/backend/sqlite/local.cjs +28 -183
- package/dist/backend/sqlite/local.cjs.map +1 -1
- package/dist/backend/sqlite/local.d.cts +8 -81
- package/dist/backend/sqlite/local.d.ts +8 -81
- package/dist/backend/sqlite/local.js +20 -180
- package/dist/backend/sqlite/local.js.map +1 -1
- package/dist/chunk-2EBMPJBO.js +16 -0
- package/dist/chunk-2EBMPJBO.js.map +1 -0
- package/dist/{chunk-5AVRFNP4.cjs → chunk-2SL7OGPR.cjs} +2866 -1507
- package/dist/chunk-2SL7OGPR.cjs.map +1 -0
- package/dist/chunk-35S6P5ZU.js +27 -0
- package/dist/chunk-35S6P5ZU.js.map +1 -0
- package/dist/chunk-3LKL3S6X.js +50 -0
- package/dist/chunk-3LKL3S6X.js.map +1 -0
- package/dist/chunk-6G5CQ6JX.js +47 -0
- package/dist/chunk-6G5CQ6JX.js.map +1 -0
- package/dist/chunk-6XDBRDZE.js +312 -0
- package/dist/chunk-6XDBRDZE.js.map +1 -0
- package/dist/chunk-764JHTLT.cjs +15 -0
- package/dist/chunk-764JHTLT.cjs.map +1 -0
- package/dist/chunk-76HE7DJP.js +68 -0
- package/dist/chunk-76HE7DJP.js.map +1 -0
- package/dist/{chunk-VGDDG3XJ.cjs → chunk-7M3NACL3.cjs} +12 -12
- package/dist/{chunk-VGDDG3XJ.cjs.map → chunk-7M3NACL3.cjs.map} +1 -1
- package/dist/{chunk-NXQFATMF.cjs → chunk-7VLCN3JB.cjs} +153 -123
- package/dist/chunk-7VLCN3JB.cjs.map +1 -0
- package/dist/{chunk-GA4TT3DH.js → chunk-A2FGSWMQ.js} +1845 -489
- package/dist/chunk-A2FGSWMQ.js.map +1 -0
- package/dist/chunk-AOL64O4Z.js +165 -0
- package/dist/chunk-AOL64O4Z.js.map +1 -0
- package/dist/{chunk-27SSDCEP.cjs → chunk-B63IFHXR.cjs} +53 -74
- package/dist/chunk-B63IFHXR.cjs.map +1 -0
- package/dist/{chunk-3XXGYU62.cjs → chunk-BKAKAVRW.cjs} +56 -53
- package/dist/chunk-BKAKAVRW.cjs.map +1 -0
- package/dist/{chunk-YTSN73ND.js → chunk-BQITNFQJ.js} +3 -3
- package/dist/{chunk-YTSN73ND.js.map → chunk-BQITNFQJ.js.map} +1 -1
- package/dist/{chunk-NUIG3BCV.cjs → chunk-CQC6VBAF.cjs} +93 -155
- package/dist/chunk-CQC6VBAF.cjs.map +1 -0
- package/dist/{chunk-6EEO3OVU.cjs → chunk-CWX77JB4.cjs} +22 -59
- package/dist/chunk-CWX77JB4.cjs.map +1 -0
- package/dist/{chunk-UGZUAYAR.js → chunk-D7PG5D5K.js} +4 -3
- package/dist/chunk-D7PG5D5K.js.map +1 -0
- package/dist/chunk-DDCIXXOO.js +9 -0
- package/dist/chunk-DDCIXXOO.js.map +1 -0
- package/dist/chunk-DDCYVIVV.cjs +44 -0
- package/dist/chunk-DDCYVIVV.cjs.map +1 -0
- package/dist/{chunk-XPCZADMT.cjs → chunk-DOVMTPKE.cjs} +89 -27
- package/dist/chunk-DOVMTPKE.cjs.map +1 -0
- package/dist/{chunk-5PNMDJ7J.js → chunk-DPNA466P.js} +14 -9
- package/dist/chunk-DPNA466P.js.map +1 -0
- package/dist/{chunk-BYPOGQWK.js → chunk-DRACN6XG.js} +6 -4
- package/dist/chunk-DRACN6XG.js.map +1 -0
- package/dist/chunk-E6TXEISH.cjs +175 -0
- package/dist/chunk-E6TXEISH.cjs.map +1 -0
- package/dist/{chunk-TKT2XHED.js → chunk-E6YZRKMM.js} +13 -12
- package/dist/chunk-E6YZRKMM.js.map +1 -0
- package/dist/{chunk-3C2RYI6L.cjs → chunk-EOJFGECD.cjs} +11 -11
- package/dist/chunk-EOJFGECD.cjs.map +1 -0
- package/dist/{chunk-XWV4JT34.js → chunk-ERZ4QPQX.js} +27 -22
- package/dist/chunk-ERZ4QPQX.js.map +1 -0
- package/dist/{chunk-DFVLCOP6.js → chunk-EZH7FNUS.js} +3 -3
- package/dist/{chunk-DFVLCOP6.js.map → chunk-EZH7FNUS.js.map} +1 -1
- package/dist/{chunk-WWFHO375.cjs → chunk-FJMPR3OH.cjs} +4 -3
- package/dist/chunk-FJMPR3OH.cjs.map +1 -0
- package/dist/chunk-FMNUSGZ4.cjs +12 -0
- package/dist/chunk-FMNUSGZ4.cjs.map +1 -0
- package/dist/{chunk-K3Q3LJY3.js → chunk-G32AO634.js} +201 -100
- package/dist/chunk-G32AO634.js.map +1 -0
- package/dist/{chunk-EXU3RASM.js → chunk-G3CSQLLT.js} +20 -474
- package/dist/chunk-G3CSQLLT.js.map +1 -0
- package/dist/chunk-GNPGGLAE.cjs +212 -0
- package/dist/chunk-GNPGGLAE.cjs.map +1 -0
- package/dist/{chunk-QARBLBXT.cjs → chunk-GUUWKPTK.cjs} +7 -7
- package/dist/{chunk-QARBLBXT.cjs.map → chunk-GUUWKPTK.cjs.map} +1 -1
- package/dist/chunk-GYA4JRP5.js +31 -0
- package/dist/chunk-GYA4JRP5.js.map +1 -0
- package/dist/chunk-I6FX7AAG.js +39 -0
- package/dist/chunk-I6FX7AAG.js.map +1 -0
- package/dist/chunk-IMQKXL4E.cjs +12 -0
- package/dist/{chunk-QSXTWU4U.cjs.map → chunk-IMQKXL4E.cjs.map} +1 -1
- package/dist/chunk-J6IJARLG.js +94 -0
- package/dist/chunk-J6IJARLG.js.map +1 -0
- package/dist/{chunk-W63OVYY4.js → chunk-K34OPSJK.js} +3 -3
- package/dist/{chunk-W63OVYY4.js.map → chunk-K34OPSJK.js.map} +1 -1
- package/dist/{chunk-TGOMW4MB.cjs → chunk-KCLZHYPU.cjs} +110 -109
- package/dist/chunk-KCLZHYPU.cjs.map +1 -0
- package/dist/{chunk-XGPUQ56G.js → chunk-KFLXWVUJ.js} +4 -38
- package/dist/chunk-KFLXWVUJ.js.map +1 -0
- package/dist/{chunk-3DS7Z4T4.cjs → chunk-LZ3TVJY4.cjs} +44 -43
- package/dist/chunk-LZ3TVJY4.cjs.map +1 -0
- package/dist/{chunk-UXLSNRYL.js → chunk-MTNEGGM2.js} +4 -4
- package/dist/chunk-MTNEGGM2.js.map +1 -0
- package/dist/{chunk-IP3CGGPA.cjs → chunk-N2V3HJFV.cjs} +92 -185
- package/dist/chunk-N2V3HJFV.cjs.map +1 -0
- package/dist/chunk-NAUA4PW5.cjs +28 -0
- package/dist/chunk-NAUA4PW5.cjs.map +1 -0
- package/dist/chunk-NMQ6C6TS.cjs +61 -0
- package/dist/chunk-NMQ6C6TS.cjs.map +1 -0
- package/dist/{chunk-2N6EOBTH.cjs → chunk-NPWACFQJ.cjs} +58 -53
- package/dist/chunk-NPWACFQJ.cjs.map +1 -0
- package/dist/{chunk-5KEQ74YU.cjs → chunk-NT6ILURI.cjs} +9 -86
- package/dist/chunk-NT6ILURI.cjs.map +1 -0
- package/dist/chunk-NU23DUSJ.cjs +192 -0
- package/dist/chunk-NU23DUSJ.cjs.map +1 -0
- package/dist/{chunk-WOJMKB3N.cjs → chunk-NWYCOFEZ.cjs} +1677 -308
- package/dist/chunk-NWYCOFEZ.cjs.map +1 -0
- package/dist/{chunk-3GH67G4Z.cjs → chunk-O5H62ZWJ.cjs} +4 -42
- package/dist/chunk-O5H62ZWJ.cjs.map +1 -0
- package/dist/{chunk-3SLPDKHQ.js → chunk-PH4IJ3V5.js} +5 -77
- package/dist/chunk-PH4IJ3V5.js.map +1 -0
- package/dist/chunk-PWXGB77L.cjs +56 -0
- package/dist/chunk-PWXGB77L.cjs.map +1 -0
- package/dist/chunk-PZHC5GCD.js +193 -0
- package/dist/chunk-PZHC5GCD.js.map +1 -0
- package/dist/chunk-QMQLUA66.js +12 -0
- package/dist/chunk-QMQLUA66.js.map +1 -0
- package/dist/{chunk-5WWVZMVX.js → chunk-QZ7A6HBM.js} +2 -2
- package/dist/{chunk-5WWVZMVX.js.map → chunk-QZ7A6HBM.js.map} +1 -1
- package/dist/{chunk-VKGKDOKR.js → chunk-RQPRCEIO.js} +1539 -206
- package/dist/chunk-RQPRCEIO.js.map +1 -0
- package/dist/chunk-RW24SAHI.cjs +74 -0
- package/dist/chunk-RW24SAHI.cjs.map +1 -0
- package/dist/{chunk-BVRDGYXQ.cjs → chunk-SAFZ6JTI.cjs} +14 -9
- package/dist/chunk-SAFZ6JTI.cjs.map +1 -0
- package/dist/{chunk-L7HQ2OSI.js → chunk-SCTZRFW5.js} +87 -166
- package/dist/chunk-SCTZRFW5.js.map +1 -0
- package/dist/{chunk-5KPNWT6X.js → chunk-SDHV2MWU.js} +24 -45
- package/dist/chunk-SDHV2MWU.js.map +1 -0
- package/dist/chunk-SVJ5GEXW.cjs +45 -0
- package/dist/chunk-SVJ5GEXW.cjs.map +1 -0
- package/dist/chunk-SVUKGWSN.cjs +102 -0
- package/dist/chunk-SVUKGWSN.cjs.map +1 -0
- package/dist/chunk-TAUGGLNQ.js +59 -0
- package/dist/chunk-TAUGGLNQ.js.map +1 -0
- package/dist/{chunk-UV3WP5WZ.js → chunk-TE5ZA4VX.js} +55 -27
- package/dist/chunk-TE5ZA4VX.js.map +1 -0
- package/dist/{chunk-A42GCBGX.cjs → chunk-TRF4EBJT.cjs} +6 -4
- package/dist/chunk-TRF4EBJT.cjs.map +1 -0
- package/dist/{chunk-KQJ54OG5.js → chunk-U4JDJKPD.js} +19 -56
- package/dist/chunk-U4JDJKPD.js.map +1 -0
- package/dist/chunk-UH2USOMG.cjs +627 -0
- package/dist/chunk-UH2USOMG.cjs.map +1 -0
- package/dist/{chunk-RCVLFTCT.js → chunk-UPXDVI3T.js} +13 -12
- package/dist/chunk-UPXDVI3T.js.map +1 -0
- package/dist/{chunk-5VQM6VWP.cjs → chunk-UWG5GX6E.cjs} +2 -2
- package/dist/{chunk-5VQM6VWP.cjs.map → chunk-UWG5GX6E.cjs.map} +1 -1
- package/dist/{chunk-3RWZPJKV.js → chunk-VBH7ZXSZ.js} +21 -78
- package/dist/chunk-VBH7ZXSZ.js.map +1 -0
- package/dist/{chunk-K5UBVGJN.js → chunk-VDYA2HMS.js} +6 -6
- package/dist/{chunk-K5UBVGJN.js.map → chunk-VDYA2HMS.js.map} +1 -1
- package/dist/chunk-X4PVHAZ6.cjs +83 -0
- package/dist/chunk-X4PVHAZ6.cjs.map +1 -0
- package/dist/{chunk-UYQMBBWJ.js → chunk-X6CNEA32.js} +23 -20
- package/dist/chunk-X6CNEA32.js.map +1 -0
- package/dist/chunk-X6RDQ5NB.cjs +335 -0
- package/dist/chunk-X6RDQ5NB.cjs.map +1 -0
- package/dist/chunk-XD6X7O5R.js +184 -0
- package/dist/chunk-XD6X7O5R.js.map +1 -0
- package/dist/{chunk-DIQ3AV5W.cjs → chunk-XFY73JWD.cjs} +324 -224
- package/dist/chunk-XFY73JWD.cjs.map +1 -0
- package/dist/{chunk-DEFQM7JU.cjs → chunk-XRU7V7FF.cjs} +7 -7
- package/dist/{chunk-DEFQM7JU.cjs.map → chunk-XRU7V7FF.cjs.map} +1 -1
- package/dist/{chunk-TPF25IG6.js → chunk-XZA3Y4YH.js} +3 -3
- package/dist/{chunk-TPF25IG6.js.map → chunk-XZA3Y4YH.js.map} +1 -1
- package/dist/chunk-Y7M44XEK.js +462 -0
- package/dist/chunk-Y7M44XEK.js.map +1 -0
- package/dist/{chunk-RRSNR3TP.js → chunk-YIRLBUNN.js} +3 -3
- package/dist/{chunk-RRSNR3TP.js.map → chunk-YIRLBUNN.js.map} +1 -1
- package/dist/{chunk-IXGYRP2P.js → chunk-YJDSPA5E.js} +79 -49
- package/dist/chunk-YJDSPA5E.js.map +1 -0
- package/dist/{chunk-EJYMTO3K.cjs → chunk-YLINFV7Z.cjs} +144 -116
- package/dist/chunk-YLINFV7Z.cjs.map +1 -0
- package/dist/{chunk-QERAIDRJ.js → chunk-Z2PPIVOO.js} +82 -22
- package/dist/chunk-Z2PPIVOO.js.map +1 -0
- package/dist/chunk-Z5QHVL5U.cjs +12 -0
- package/dist/chunk-Z5QHVL5U.cjs.map +1 -0
- package/dist/chunk-ZDH3DX3C.cjs +30 -0
- package/dist/chunk-ZDH3DX3C.cjs.map +1 -0
- package/dist/chunk-ZE6NVENI.js +77 -0
- package/dist/chunk-ZE6NVENI.js.map +1 -0
- package/dist/chunk-ZHX4KEM7.cjs +49 -0
- package/dist/chunk-ZHX4KEM7.cjs.map +1 -0
- package/dist/chunk-ZKZAIX42.cjs +479 -0
- package/dist/chunk-ZKZAIX42.cjs.map +1 -0
- package/dist/{chunk-TEDRJXOG.cjs → chunk-ZY4GXIVN.cjs} +5 -5
- package/dist/{chunk-TEDRJXOG.cjs.map → chunk-ZY4GXIVN.cjs.map} +1 -1
- package/dist/core/index.cjs +117 -0
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.cts +225 -0
- package/dist/core/index.d.ts +225 -0
- package/dist/core/index.js +12 -0
- package/dist/core/index.js.map +1 -0
- package/dist/{ddl-CS0KUVwB.d.ts → ddl-Dx3Z0_WC.d.ts} +3 -3
- package/dist/{ddl-BD-ZfKeX.d.cts → ddl-J6sDyABg.d.cts} +3 -3
- package/dist/define-graph-CzEvA_8F.d.cts +174 -0
- package/dist/define-graph-DRo9xpYN.d.ts +174 -0
- package/dist/{extension-types-BM2ACfYO.d.cts → extension-types-BLEVH4SG.d.cts} +1 -1
- package/dist/{extension-types-BM2ACfYO.d.ts → extension-types-BLEVH4SG.d.ts} +1 -1
- package/dist/graph-extension/index.cjs +21 -19
- package/dist/graph-extension/index.d.cts +4 -4
- package/dist/graph-extension/index.d.ts +4 -4
- package/dist/graph-extension/index.js +6 -4
- package/dist/graph-merge/index.cjs +265 -214
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +8 -89
- package/dist/graph-merge/index.d.ts +8 -89
- package/dist/graph-merge/index.js +141 -90
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/{index-BeacbPoe.d.ts → index-BD_3TCgh.d.ts} +6 -4
- package/dist/{index-BPM59vsg.d.cts → index-BihFPsPu.d.cts} +6 -4
- package/dist/{fulltext-strategy-C27vXaeB.d.cts → index-Bq7vSPHy.d.ts} +3195 -2646
- package/dist/{fulltext-strategy-DebsMrqg.d.ts → index-CrFL_ENI.d.cts} +3195 -2646
- package/dist/index.cjs +326 -315
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +59 -240
- package/dist/index.d.ts +59 -240
- package/dist/index.js +46 -79
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +26 -38
- package/dist/indexes/index.d.cts +6 -41
- package/dist/indexes/index.d.ts +6 -41
- package/dist/indexes/index.js +14 -10
- package/dist/interchange/index.cjs +48 -39
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +7 -8
- package/dist/interchange/index.d.ts +7 -8
- package/dist/interchange/index.js +23 -14
- package/dist/interchange/index.js.map +1 -1
- package/dist/local-options-CZ1BnIoF.d.cts +29 -0
- package/dist/local-options-CZ1BnIoF.d.ts +29 -0
- package/dist/{manager-D00_NXvT.d.ts → manager-CASfhmzV.d.ts} +4 -173
- package/dist/{manager-nU1vTJLy.d.cts → manager-nCEJiYBb.d.cts} +4 -173
- package/dist/{materialize-indexes-zK2J_flP.d.ts → materialize-indexes-D4iei4Kp.d.ts} +1 -1
- package/dist/{materialize-indexes-CuR3gAZb.d.cts → materialize-indexes-ExQ6OrAh.d.cts} +1 -1
- package/dist/{postgres-IaBA4RgE.d.ts → postgres-Cl1ZAN1G.d.ts} +1 -1
- package/dist/{postgres-YrYmPlaU.d.cts → postgres-DMgIKQU-.d.cts} +1 -1
- package/dist/postgres-execution-fKW0qRiN.d.cts +14 -0
- package/dist/postgres-execution-fKW0qRiN.d.ts +14 -0
- package/dist/profiler/index.cjs +9 -8
- package/dist/profiler/index.cjs.map +1 -1
- package/dist/profiler/index.d.cts +9 -17
- package/dist/profiler/index.d.ts +9 -17
- package/dist/profiler/index.js +8 -7
- package/dist/profiler/index.js.map +1 -1
- package/dist/provenance/index.cjs +61 -55
- package/dist/provenance/index.cjs.map +1 -1
- package/dist/provenance/index.d.cts +7 -8
- package/dist/provenance/index.d.ts +7 -8
- package/dist/provenance/index.js +34 -28
- package/dist/provenance/index.js.map +1 -1
- package/dist/schema/index.cjs +46 -37
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +8 -10
- package/dist/schema/index.d.ts +8 -10
- package/dist/schema/index.js +22 -13
- package/dist/schema/index.js.map +1 -1
- package/dist/{sqlite-BUOHPx7p.d.ts → sqlite-BDkW39aa.d.cts} +1 -1
- package/dist/{sqlite-Pp8O19WE.d.cts → sqlite-CYfhvESj.d.ts} +1 -1
- package/dist/sqlite-execution-DwbE2a9y.d.cts +32 -0
- package/dist/sqlite-execution-DwbE2a9y.d.ts +32 -0
- package/dist/{store-view-X96Rd00T.d.cts → store-view-BoHqdHjB.d.cts} +394 -1393
- package/dist/{store-view-ANL6mTph.d.ts → store-view-Ctq-3OHy.d.ts} +394 -1393
- package/dist/temporal-BC_NQV5Y.d.cts +281 -0
- package/dist/temporal-DqtOEo_B.d.ts +281 -0
- package/dist/{types-r-Zyq2Hz.d.cts → types-COq3-vMC.d.cts} +2 -2
- package/dist/{types-wsvuBgPK.d.ts → types-CUevi_D1.d.ts} +2 -2
- package/dist/{where-CJOpJj3a.d.ts → where-BdE_cYtx.d.ts} +5 -5
- package/dist/{where-K3uBP33l.d.cts → where-C92TXCzT.d.cts} +5 -5
- package/package.json +37 -6
- package/dist/chunk-27SSDCEP.cjs.map +0 -1
- package/dist/chunk-2N6EOBTH.cjs.map +0 -1
- package/dist/chunk-3C2RYI6L.cjs.map +0 -1
- package/dist/chunk-3DS7Z4T4.cjs.map +0 -1
- package/dist/chunk-3GH67G4Z.cjs.map +0 -1
- package/dist/chunk-3RWZPJKV.js.map +0 -1
- package/dist/chunk-3SLPDKHQ.js.map +0 -1
- package/dist/chunk-3XXGYU62.cjs.map +0 -1
- package/dist/chunk-44TA22QT.js +0 -1478
- package/dist/chunk-44TA22QT.js.map +0 -1
- package/dist/chunk-5AVRFNP4.cjs.map +0 -1
- package/dist/chunk-5KEQ74YU.cjs.map +0 -1
- package/dist/chunk-5KPNWT6X.js.map +0 -1
- package/dist/chunk-5PNMDJ7J.js.map +0 -1
- package/dist/chunk-6EEO3OVU.cjs.map +0 -1
- package/dist/chunk-7YSP4V4R.cjs +0 -69
- package/dist/chunk-7YSP4V4R.cjs.map +0 -1
- package/dist/chunk-A42GCBGX.cjs.map +0 -1
- package/dist/chunk-BVRDGYXQ.cjs.map +0 -1
- package/dist/chunk-BYPOGQWK.js.map +0 -1
- package/dist/chunk-CUHM5CWJ.cjs +0 -12
- package/dist/chunk-CUHM5CWJ.cjs.map +0 -1
- package/dist/chunk-DIQ3AV5W.cjs.map +0 -1
- package/dist/chunk-EJYMTO3K.cjs.map +0 -1
- package/dist/chunk-EXU3RASM.js.map +0 -1
- package/dist/chunk-GA4TT3DH.js.map +0 -1
- package/dist/chunk-IP3CGGPA.cjs.map +0 -1
- package/dist/chunk-IPSVVTWT.cjs +0 -1540
- package/dist/chunk-IPSVVTWT.cjs.map +0 -1
- package/dist/chunk-IXGYRP2P.js.map +0 -1
- package/dist/chunk-K3Q3LJY3.js.map +0 -1
- package/dist/chunk-KQJ54OG5.js.map +0 -1
- package/dist/chunk-L7HQ2OSI.js.map +0 -1
- package/dist/chunk-M6VES7V6.js +0 -239
- package/dist/chunk-M6VES7V6.js.map +0 -1
- package/dist/chunk-NUIG3BCV.cjs.map +0 -1
- package/dist/chunk-NXQFATMF.cjs.map +0 -1
- package/dist/chunk-OHMP6N2J.js +0 -47
- package/dist/chunk-OHMP6N2J.js.map +0 -1
- package/dist/chunk-QERAIDRJ.js.map +0 -1
- package/dist/chunk-QSXTWU4U.cjs +0 -12
- package/dist/chunk-RCVLFTCT.js.map +0 -1
- package/dist/chunk-TGOMW4MB.cjs.map +0 -1
- package/dist/chunk-TKT2XHED.js.map +0 -1
- package/dist/chunk-UGZUAYAR.js.map +0 -1
- package/dist/chunk-UV3WP5WZ.js.map +0 -1
- package/dist/chunk-UXLSNRYL.js.map +0 -1
- package/dist/chunk-UYQMBBWJ.js.map +0 -1
- package/dist/chunk-VKGKDOKR.js.map +0 -1
- package/dist/chunk-VL2V6PEN.cjs +0 -261
- package/dist/chunk-VL2V6PEN.cjs.map +0 -1
- package/dist/chunk-WOJMKB3N.cjs.map +0 -1
- package/dist/chunk-WWFHO375.cjs.map +0 -1
- package/dist/chunk-XGPUQ56G.js.map +0 -1
- package/dist/chunk-XGU7DZDA.cjs +0 -1095
- package/dist/chunk-XGU7DZDA.cjs.map +0 -1
- package/dist/chunk-XPCZADMT.cjs.map +0 -1
- package/dist/chunk-XWV4JT34.js.map +0 -1
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
3
|
+
var chunkXFY73JWD_cjs = require('./chunk-XFY73JWD.cjs');
|
|
4
|
+
var chunkB63IFHXR_cjs = require('./chunk-B63IFHXR.cjs');
|
|
5
|
+
var chunkE6TXEISH_cjs = require('./chunk-E6TXEISH.cjs');
|
|
6
|
+
var chunkDOVMTPKE_cjs = require('./chunk-DOVMTPKE.cjs');
|
|
7
|
+
var chunkZDH3DX3C_cjs = require('./chunk-ZDH3DX3C.cjs');
|
|
8
|
+
var chunkGNPGGLAE_cjs = require('./chunk-GNPGGLAE.cjs');
|
|
9
|
+
var chunkO5H62ZWJ_cjs = require('./chunk-O5H62ZWJ.cjs');
|
|
10
|
+
var chunkZKZAIX42_cjs = require('./chunk-ZKZAIX42.cjs');
|
|
11
|
+
var chunkX6RDQ5NB_cjs = require('./chunk-X6RDQ5NB.cjs');
|
|
12
|
+
var chunk764JHTLT_cjs = require('./chunk-764JHTLT.cjs');
|
|
13
|
+
var chunkSAFZ6JTI_cjs = require('./chunk-SAFZ6JTI.cjs');
|
|
10
14
|
var drizzleOrm = require('drizzle-orm');
|
|
11
15
|
var pgCore = require('drizzle-orm/pg-core');
|
|
12
16
|
|
|
@@ -41,7 +45,7 @@ var DEFAULT_POSTGRES_STATEMENT_CACHE_MAX = 256;
|
|
|
41
45
|
var STATEMENT_NAME_CACHE = /* @__PURE__ */ new Map();
|
|
42
46
|
var nextStatementId = 0;
|
|
43
47
|
function statementNameFor(sqlText, cacheMax) {
|
|
44
|
-
return
|
|
48
|
+
return chunkXFY73JWD_cjs.getOrCreateLru(STATEMENT_NAME_CACHE, sqlText, cacheMax, () => {
|
|
45
49
|
const name = `tg_${nextStatementId}`;
|
|
46
50
|
nextStatementId += 1;
|
|
47
51
|
return name;
|
|
@@ -97,15 +101,15 @@ function wrapNodePgClientUnnamed(client) {
|
|
|
97
101
|
queryUnnamed
|
|
98
102
|
};
|
|
99
103
|
}
|
|
100
|
-
function adaptPostgresJsClient(
|
|
104
|
+
function adaptPostgresJsClient(sql3) {
|
|
101
105
|
async function query(sqlText, params) {
|
|
102
|
-
const rows = await
|
|
106
|
+
const rows = await sql3.unsafe(sqlText, params);
|
|
103
107
|
return { rows };
|
|
104
108
|
}
|
|
105
109
|
return {
|
|
106
110
|
query,
|
|
107
111
|
async queryUnnamed(sqlText, params) {
|
|
108
|
-
const rows = await
|
|
112
|
+
const rows = await sql3.unsafe(sqlText, params, { prepare: false });
|
|
109
113
|
return { rows };
|
|
110
114
|
}
|
|
111
115
|
};
|
|
@@ -153,13 +157,16 @@ function createPostgresExecutionAdapter(db, options = {}) {
|
|
|
153
157
|
options.useTransactionClient ?? false
|
|
154
158
|
);
|
|
155
159
|
function compile(query) {
|
|
156
|
-
return
|
|
160
|
+
return chunkDOVMTPKE_cjs.compileQueryWithDialect(db, query, "PostgreSQL");
|
|
157
161
|
}
|
|
158
162
|
if (pgClient === void 0) {
|
|
159
163
|
return {
|
|
160
164
|
compile,
|
|
161
165
|
async execute(query) {
|
|
162
|
-
return executeDrizzleQuery(
|
|
166
|
+
return executeDrizzleQuery(
|
|
167
|
+
db,
|
|
168
|
+
chunkX6RDQ5NB_cjs.isSqlFragment(query) ? chunkDOVMTPKE_cjs.toDrizzleSql(query, "postgres") : query
|
|
169
|
+
);
|
|
163
170
|
}
|
|
164
171
|
};
|
|
165
172
|
}
|
|
@@ -175,7 +182,7 @@ function createPostgresExecutionAdapter(db, options = {}) {
|
|
|
175
182
|
compile,
|
|
176
183
|
async execute(query) {
|
|
177
184
|
const compiled = compile(query);
|
|
178
|
-
if (
|
|
185
|
+
if (chunkX6RDQ5NB_cjs.isSqlFragment(query) && chunkX6RDQ5NB_cjs.shouldForceCustomPlan(query)) {
|
|
179
186
|
const result = await pgQueryClient.queryUnnamed(
|
|
180
187
|
compiled.sql,
|
|
181
188
|
compiled.params
|
|
@@ -199,7 +206,7 @@ function createStatementQueue() {
|
|
|
199
206
|
let closed = false;
|
|
200
207
|
return {
|
|
201
208
|
enqueue(task) {
|
|
202
|
-
if (closed) return Promise.reject(new
|
|
209
|
+
if (closed) return Promise.reject(new chunkSAFZ6JTI_cjs.TransactionClosedError());
|
|
203
210
|
const result = tail.then(() => task());
|
|
204
211
|
tail = result.then(ignoreOutcome, ignoreOutcome);
|
|
205
212
|
return result;
|
|
@@ -247,57 +254,57 @@ var NODE_INSERT_PARAM_COUNT = 9;
|
|
|
247
254
|
var EDGE_INSERT_PARAM_COUNT = 12;
|
|
248
255
|
var POSTGRES_NODE_INSERT_BATCH_SIZE = Math.max(
|
|
249
256
|
1,
|
|
250
|
-
Math.floor(
|
|
257
|
+
Math.floor(chunkGNPGGLAE_cjs.POSTGRES_MAX_BIND_PARAMETERS / NODE_INSERT_PARAM_COUNT)
|
|
251
258
|
);
|
|
252
259
|
var POSTGRES_EDGE_INSERT_BATCH_SIZE = Math.max(
|
|
253
260
|
1,
|
|
254
|
-
Math.floor(
|
|
261
|
+
Math.floor(chunkGNPGGLAE_cjs.POSTGRES_MAX_BIND_PARAMETERS / EDGE_INSERT_PARAM_COUNT)
|
|
255
262
|
);
|
|
256
263
|
var POSTGRES_GET_NODES_ID_CHUNK_SIZE = Math.max(
|
|
257
264
|
1,
|
|
258
|
-
|
|
265
|
+
chunkGNPGGLAE_cjs.POSTGRES_MAX_BIND_PARAMETERS - 2
|
|
259
266
|
);
|
|
260
267
|
var POSTGRES_GET_EDGES_ID_CHUNK_SIZE = Math.max(
|
|
261
268
|
1,
|
|
262
|
-
|
|
269
|
+
chunkGNPGGLAE_cjs.POSTGRES_MAX_BIND_PARAMETERS - 1
|
|
263
270
|
);
|
|
264
271
|
var FULLTEXT_UPSERT_PARAM_COUNT = 6;
|
|
265
272
|
var FULLTEXT_DELETE_FIXED_PARAM_COUNT = 2;
|
|
266
273
|
var POSTGRES_FULLTEXT_UPSERT_BATCH_SIZE = Math.max(
|
|
267
274
|
1,
|
|
268
|
-
Math.floor(
|
|
275
|
+
Math.floor(chunkGNPGGLAE_cjs.POSTGRES_MAX_BIND_PARAMETERS / FULLTEXT_UPSERT_PARAM_COUNT)
|
|
269
276
|
);
|
|
270
277
|
var POSTGRES_FULLTEXT_DELETE_CHUNK_SIZE = Math.max(
|
|
271
278
|
1,
|
|
272
|
-
|
|
279
|
+
chunkGNPGGLAE_cjs.POSTGRES_MAX_BIND_PARAMETERS - FULLTEXT_DELETE_FIXED_PARAM_COUNT
|
|
273
280
|
);
|
|
274
281
|
var CHECK_UNIQUE_BATCH_FIXED_PARAM_COUNT = 3;
|
|
275
282
|
var POSTGRES_CHECK_UNIQUE_BATCH_CHUNK_SIZE = Math.max(
|
|
276
283
|
1,
|
|
277
|
-
|
|
284
|
+
chunkGNPGGLAE_cjs.POSTGRES_MAX_BIND_PARAMETERS - CHECK_UNIQUE_BATCH_FIXED_PARAM_COUNT
|
|
278
285
|
);
|
|
279
286
|
var UNIQUE_INSERT_PARAM_COUNT = 6;
|
|
280
287
|
var POSTGRES_UNIQUE_INSERT_BATCH_SIZE = Math.max(
|
|
281
288
|
1,
|
|
282
|
-
Math.floor(
|
|
289
|
+
Math.floor(chunkGNPGGLAE_cjs.POSTGRES_MAX_BIND_PARAMETERS / UNIQUE_INSERT_PARAM_COUNT)
|
|
283
290
|
);
|
|
284
|
-
var toNodeRow =
|
|
285
|
-
var toEdgeRow =
|
|
286
|
-
var toUniqueRow =
|
|
287
|
-
var toSchemaVersionRow =
|
|
288
|
-
|
|
291
|
+
var toNodeRow = chunkE6TXEISH_cjs.createNodeRowMapper(chunkE6TXEISH_cjs.POSTGRES_ROW_MAPPER_CONFIG);
|
|
292
|
+
var toEdgeRow = chunkE6TXEISH_cjs.createEdgeRowMapper(chunkE6TXEISH_cjs.POSTGRES_ROW_MAPPER_CONFIG);
|
|
293
|
+
var toUniqueRow = chunkE6TXEISH_cjs.createUniqueRowMapper(chunkE6TXEISH_cjs.POSTGRES_ROW_MAPPER_CONFIG);
|
|
294
|
+
var toSchemaVersionRow = chunkE6TXEISH_cjs.createSchemaVersionRowMapper(
|
|
295
|
+
chunkE6TXEISH_cjs.POSTGRES_ROW_MAPPER_CONFIG
|
|
289
296
|
);
|
|
290
297
|
function buildPostgresCapabilities(fulltextStrategy, vectorStrategy) {
|
|
291
298
|
return {
|
|
292
|
-
...
|
|
293
|
-
...vectorStrategy === void 0 ? {} : { vector:
|
|
294
|
-
fulltext:
|
|
299
|
+
...chunkGNPGGLAE_cjs.POSTGRES_CAPABILITIES,
|
|
300
|
+
...vectorStrategy === void 0 ? {} : { vector: chunkZKZAIX42_cjs.buildVectorCapabilities(vectorStrategy) },
|
|
301
|
+
fulltext: chunkZKZAIX42_cjs.buildFulltextCapabilities(fulltextStrategy)
|
|
295
302
|
};
|
|
296
303
|
}
|
|
297
304
|
function createPostgresBackend(db, options = {}) {
|
|
298
|
-
const tables2 = options.tables ??
|
|
299
|
-
const fulltextStrategy = options.fulltext ??
|
|
300
|
-
const vectorStrategy = options.vector === false ? void 0 : options.vector ??
|
|
305
|
+
const tables2 = options.tables ?? chunkXFY73JWD_cjs.tables;
|
|
306
|
+
const fulltextStrategy = options.fulltext ?? chunkZKZAIX42_cjs.tsvectorStrategy;
|
|
307
|
+
const vectorStrategy = options.vector === false ? void 0 : options.vector ?? chunkB63IFHXR_cjs.pgvectorStrategy;
|
|
301
308
|
const iterativeScanProbe = createIterativeScanProbe();
|
|
302
309
|
const baseCapabilities = buildPostgresCapabilities(
|
|
303
310
|
fulltextStrategy,
|
|
@@ -310,7 +317,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
310
317
|
supported: false
|
|
311
318
|
}
|
|
312
319
|
} : {};
|
|
313
|
-
const capabilities =
|
|
320
|
+
const capabilities = chunkGNPGGLAE_cjs.normalizeGraphAnalyticsCapabilities({
|
|
314
321
|
...baseCapabilities,
|
|
315
322
|
...httpOnlyOverrides,
|
|
316
323
|
...options.capabilities
|
|
@@ -335,17 +342,22 @@ function createPostgresBackend(db, options = {}) {
|
|
|
335
342
|
tableNames.edges,
|
|
336
343
|
drizzleOrm.getTableName(tables2.uniques),
|
|
337
344
|
tableNames.fulltext
|
|
338
|
-
].map(
|
|
345
|
+
].map(
|
|
346
|
+
(name) => chunkDOVMTPKE_cjs.toDrizzleSql(
|
|
347
|
+
chunkX6RDQ5NB_cjs.sql`ANALYZE (SKIP_LOCKED) ${chunkX6RDQ5NB_cjs.sql.identifier(name)}`,
|
|
348
|
+
"postgres"
|
|
349
|
+
)
|
|
350
|
+
);
|
|
339
351
|
const recordedAnalyzeTables = [
|
|
340
352
|
tableNames.recordedNodes,
|
|
341
353
|
tableNames.recordedEdges,
|
|
342
354
|
tableNames.recordedClock
|
|
343
355
|
];
|
|
344
|
-
const operationStrategy =
|
|
356
|
+
const operationStrategy = chunkXFY73JWD_cjs.createPostgresOperationStrategy(
|
|
345
357
|
tables2,
|
|
346
358
|
fulltextStrategy
|
|
347
359
|
);
|
|
348
|
-
const recordedTableExists =
|
|
360
|
+
const recordedTableExists = chunkXFY73JWD_cjs.createCachedTableExistence(
|
|
349
361
|
async (tableName) => {
|
|
350
362
|
const rows = await executionAdapter.execute(
|
|
351
363
|
operationStrategy.buildTableExists(tableName)
|
|
@@ -356,7 +368,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
356
368
|
);
|
|
357
369
|
const matTable = tables2.contributionMaterializations;
|
|
358
370
|
async function ensureContributionMaterializationsTableImpl() {
|
|
359
|
-
await db.execute(drizzleOrm.sql.raw(
|
|
371
|
+
await db.execute(drizzleOrm.sql.raw(chunkXFY73JWD_cjs.generatePgCreateTableSQL(matTable)));
|
|
360
372
|
}
|
|
361
373
|
async function getContributionMaterializationRow(identity) {
|
|
362
374
|
const rows = await db.select().from(matTable).where(
|
|
@@ -369,25 +381,25 @@ function createPostgresBackend(db, options = {}) {
|
|
|
369
381
|
);
|
|
370
382
|
const row = rows[0];
|
|
371
383
|
if (row === void 0) return void 0;
|
|
372
|
-
return
|
|
384
|
+
return chunkXFY73JWD_cjs.mapContributionMaterializationRow(
|
|
373
385
|
row,
|
|
374
|
-
|
|
386
|
+
chunkXFY73JWD_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.decode
|
|
375
387
|
);
|
|
376
388
|
}
|
|
377
389
|
async function getContributionMaterializationRows(graphId) {
|
|
378
390
|
const rows = await db.select().from(matTable).where(drizzleOrm.eq(matTable.graphId, graphId));
|
|
379
391
|
return rows.map(
|
|
380
|
-
(row) =>
|
|
392
|
+
(row) => chunkXFY73JWD_cjs.mapContributionMaterializationRow(
|
|
381
393
|
row,
|
|
382
|
-
|
|
394
|
+
chunkXFY73JWD_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.decode
|
|
383
395
|
)
|
|
384
396
|
);
|
|
385
397
|
}
|
|
386
398
|
async function recordContributionMaterializationRow(params) {
|
|
387
399
|
await db.insert(matTable).values(
|
|
388
|
-
|
|
400
|
+
chunkXFY73JWD_cjs.buildContributionInsertValues(
|
|
389
401
|
params,
|
|
390
|
-
|
|
402
|
+
chunkXFY73JWD_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.encode
|
|
391
403
|
)
|
|
392
404
|
).onConflictDoUpdate({
|
|
393
405
|
target: [
|
|
@@ -396,7 +408,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
396
408
|
matTable.owner,
|
|
397
409
|
matTable.tableName
|
|
398
410
|
],
|
|
399
|
-
set:
|
|
411
|
+
set: chunkXFY73JWD_cjs.buildContributionOnConflictSet(
|
|
400
412
|
matTable.materializedAt,
|
|
401
413
|
params.materializedAt
|
|
402
414
|
)
|
|
@@ -412,7 +424,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
412
424
|
)
|
|
413
425
|
);
|
|
414
426
|
}
|
|
415
|
-
const contributionMaterializer =
|
|
427
|
+
const contributionMaterializer = chunkXFY73JWD_cjs.createContributionMaterializer({
|
|
416
428
|
dialect: "postgres",
|
|
417
429
|
fulltextStrategy,
|
|
418
430
|
fulltextTableName: tables2.fulltextTableName,
|
|
@@ -439,7 +451,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
439
451
|
});
|
|
440
452
|
function runSchemaWriteTransaction(graphId, fn) {
|
|
441
453
|
if (!capabilities.transactions) {
|
|
442
|
-
throw new
|
|
454
|
+
throw new chunkSAFZ6JTI_cjs.ConfigurationError(
|
|
443
455
|
"commitSchemaVersion and setActiveVersion 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.",
|
|
444
456
|
{
|
|
445
457
|
backend: "postgres",
|
|
@@ -481,7 +493,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
481
493
|
iterativeScanProbe
|
|
482
494
|
});
|
|
483
495
|
return {
|
|
484
|
-
backend:
|
|
496
|
+
backend: chunkXFY73JWD_cjs.gateFulltext(
|
|
485
497
|
backend2,
|
|
486
498
|
contributionMaterializer.assertInitialized
|
|
487
499
|
),
|
|
@@ -492,47 +504,47 @@ function createPostgresBackend(db, options = {}) {
|
|
|
492
504
|
...operations,
|
|
493
505
|
...capabilities.transactions && executionAdapter.executeCompiled !== void 0 ? {
|
|
494
506
|
async trustedImport(fn) {
|
|
495
|
-
return backend.
|
|
507
|
+
return backend.transactionWithNative(async (tx, rawSql) => {
|
|
496
508
|
const trustedExecutionAdapter = createPostgresExecutionAdapter(
|
|
497
509
|
rawSql,
|
|
498
510
|
{ ...adapterOptions, useTransactionClient: true }
|
|
499
511
|
);
|
|
500
512
|
const executeCompiled = trustedExecutionAdapter.executeCompiled;
|
|
501
513
|
if (executeCompiled === void 0) {
|
|
502
|
-
throw new
|
|
514
|
+
throw new chunkSAFZ6JTI_cjs.ConfigurationError(
|
|
503
515
|
"Trusted import could not bind raw execution to the PostgreSQL transaction.",
|
|
504
516
|
{ capability: "trustedImport", dialect: "postgres" }
|
|
505
517
|
);
|
|
506
518
|
}
|
|
507
|
-
const trustedTx =
|
|
519
|
+
const trustedTx = chunkGNPGGLAE_cjs.createBackendOverlay(tx, {
|
|
508
520
|
executeRaw(sqlText, params) {
|
|
509
521
|
return executeCompiled({ params, sql: sqlText });
|
|
510
522
|
}
|
|
511
523
|
});
|
|
512
|
-
await
|
|
513
|
-
await
|
|
514
|
-
const indexDefinitions = await
|
|
524
|
+
await chunkXFY73JWD_cjs.lockPostgresTrustedImportTables(trustedTx, tableNames);
|
|
525
|
+
await chunkXFY73JWD_cjs.assertTrustedImportDatabaseEmpty(trustedTx, tableNames);
|
|
526
|
+
const indexDefinitions = await chunkXFY73JWD_cjs.suspendPostgresSecondaryIndexes(
|
|
515
527
|
trustedTx,
|
|
516
528
|
tableNames
|
|
517
529
|
);
|
|
518
530
|
const result = await fn(
|
|
519
|
-
|
|
531
|
+
chunkXFY73JWD_cjs.createPostgresTrustedImportSession(trustedTx, tableNames)
|
|
520
532
|
);
|
|
521
|
-
await
|
|
522
|
-
await
|
|
533
|
+
await chunkXFY73JWD_cjs.restoreSecondaryIndexes(trustedTx, indexDefinitions);
|
|
534
|
+
await chunkXFY73JWD_cjs.analyzeImportedTables(trustedTx, tableNames);
|
|
523
535
|
return result;
|
|
524
536
|
});
|
|
525
537
|
}
|
|
526
538
|
} : {},
|
|
527
539
|
async bootstrapTables() {
|
|
528
|
-
const statements =
|
|
540
|
+
const statements = chunkXFY73JWD_cjs.generatePostgresDDL(tables2, fulltextStrategy);
|
|
529
541
|
for (const statement of statements) {
|
|
530
542
|
await db.execute(drizzleOrm.sql.raw(statement));
|
|
531
543
|
}
|
|
532
544
|
},
|
|
533
545
|
async ensureRevisionOriginsTable() {
|
|
534
546
|
await db.execute(
|
|
535
|
-
drizzleOrm.sql.raw(
|
|
547
|
+
drizzleOrm.sql.raw(chunkXFY73JWD_cjs.generatePgCreateTableSQL(tables2.revisionOrigins))
|
|
536
548
|
);
|
|
537
549
|
},
|
|
538
550
|
// Every fulltext-touching method asserts the durable marker instead
|
|
@@ -540,7 +552,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
540
552
|
// uninitialized database throws `StoreNotInitializedError` loudly
|
|
541
553
|
// rather than self-healing on a read/write path (#135). Shared
|
|
542
554
|
// verbatim with the tx-scoped gate via `gateFulltextMethods`.
|
|
543
|
-
...
|
|
555
|
+
...chunkXFY73JWD_cjs.gateFulltextMethods(
|
|
544
556
|
operations,
|
|
545
557
|
contributionMaterializer.assertInitialized
|
|
546
558
|
),
|
|
@@ -549,7 +561,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
549
561
|
},
|
|
550
562
|
async ensureIndexMaterializationsTable() {
|
|
551
563
|
await db.execute(
|
|
552
|
-
drizzleOrm.sql.raw(
|
|
564
|
+
drizzleOrm.sql.raw(chunkXFY73JWD_cjs.generatePgCreateTableSQL(tables2.indexMaterializations))
|
|
553
565
|
);
|
|
554
566
|
const tableName = drizzleOrm.getTableName(tables2.indexMaterializations);
|
|
555
567
|
await db.execute(
|
|
@@ -601,26 +613,26 @@ function createPostgresBackend(db, options = {}) {
|
|
|
601
613
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.indexName, indexName));
|
|
602
614
|
const row = rows[0];
|
|
603
615
|
if (row === void 0) return void 0;
|
|
604
|
-
return
|
|
616
|
+
return chunkXFY73JWD_cjs.mapMaterializationRow(row, chunkXFY73JWD_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.decode);
|
|
605
617
|
},
|
|
606
618
|
async getIndexMaterializations(statusKeys) {
|
|
607
619
|
if (statusKeys.length === 0) return [];
|
|
608
620
|
const t = tables2.indexMaterializations;
|
|
609
621
|
const rows = await db.select().from(t).where(drizzleOrm.inArray(t.indexName, [...statusKeys]));
|
|
610
622
|
return rows.map(
|
|
611
|
-
(row) =>
|
|
623
|
+
(row) => chunkXFY73JWD_cjs.mapMaterializationRow(row, chunkXFY73JWD_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.decode)
|
|
612
624
|
);
|
|
613
625
|
},
|
|
614
626
|
async recordIndexMaterialization(params) {
|
|
615
627
|
const t = tables2.indexMaterializations;
|
|
616
628
|
await db.insert(t).values(
|
|
617
|
-
|
|
629
|
+
chunkXFY73JWD_cjs.buildMaterializationInsertValues(
|
|
618
630
|
params,
|
|
619
|
-
|
|
631
|
+
chunkXFY73JWD_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.encode
|
|
620
632
|
)
|
|
621
633
|
).onConflictDoUpdate({
|
|
622
634
|
target: t.indexName,
|
|
623
|
-
set:
|
|
635
|
+
set: chunkXFY73JWD_cjs.buildMaterializationOnConflictSet(params.materializedAt)
|
|
624
636
|
});
|
|
625
637
|
},
|
|
626
638
|
async ensureContributionMaterializationsTable() {
|
|
@@ -636,37 +648,37 @@ function createPostgresBackend(db, options = {}) {
|
|
|
636
648
|
await contributionMaterializer.assertInitialized(graphId);
|
|
637
649
|
},
|
|
638
650
|
async ensureKindRemovalsTable() {
|
|
639
|
-
await db.execute(drizzleOrm.sql.raw(
|
|
651
|
+
await db.execute(drizzleOrm.sql.raw(chunkXFY73JWD_cjs.generatePgCreateTableSQL(tables2.kindRemovals)));
|
|
640
652
|
},
|
|
641
653
|
async getPendingKindRemovals(graphId) {
|
|
642
654
|
const t = tables2.kindRemovals;
|
|
643
655
|
const rows = await db.select().from(t).where(drizzleOrm.and(drizzleOrm.eq(t.graphId, graphId), drizzleOrm.isNull(t.removedAt)));
|
|
644
656
|
return rows.map(
|
|
645
|
-
(row) =>
|
|
657
|
+
(row) => chunkXFY73JWD_cjs.mapKindRemovalRow(row, chunkXFY73JWD_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
646
658
|
);
|
|
647
659
|
},
|
|
648
660
|
async getAllKindRemovals(graphId) {
|
|
649
661
|
const t = tables2.kindRemovals;
|
|
650
662
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.graphId, graphId));
|
|
651
663
|
return rows.map(
|
|
652
|
-
(row) =>
|
|
664
|
+
(row) => chunkXFY73JWD_cjs.mapKindRemovalRow(row, chunkXFY73JWD_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
653
665
|
);
|
|
654
666
|
},
|
|
655
667
|
async recordKindRemoval(params) {
|
|
656
668
|
const t = tables2.kindRemovals;
|
|
657
669
|
await db.insert(t).values(
|
|
658
|
-
|
|
670
|
+
chunkXFY73JWD_cjs.buildKindRemovalInsertValues(
|
|
659
671
|
params,
|
|
660
|
-
|
|
672
|
+
chunkXFY73JWD_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.encode
|
|
661
673
|
)
|
|
662
674
|
).onConflictDoUpdate({
|
|
663
675
|
target: [t.graphId, t.kindName, t.entity, t.schemaVersion],
|
|
664
|
-
set:
|
|
676
|
+
set: chunkXFY73JWD_cjs.buildKindRemovalOnConflictSet(t.removedAt, params.removedAt)
|
|
665
677
|
});
|
|
666
678
|
},
|
|
667
679
|
async ensureReconciliationMarkersTable() {
|
|
668
680
|
await db.execute(
|
|
669
|
-
drizzleOrm.sql.raw(
|
|
681
|
+
drizzleOrm.sql.raw(chunkXFY73JWD_cjs.generatePgCreateTableSQL(tables2.reconciliationMarkers))
|
|
670
682
|
);
|
|
671
683
|
},
|
|
672
684
|
async ensureRuntimeContributions(graphId) {
|
|
@@ -726,7 +738,10 @@ function createPostgresBackend(db, options = {}) {
|
|
|
726
738
|
const presentRecordedTables = tablePresence.filter((entry) => entry.exists).map((entry) => entry.tableName);
|
|
727
739
|
for (const tableName of presentRecordedTables) {
|
|
728
740
|
await db.execute(
|
|
729
|
-
|
|
741
|
+
chunkDOVMTPKE_cjs.toDrizzleSql(
|
|
742
|
+
chunkX6RDQ5NB_cjs.sql`ANALYZE (SKIP_LOCKED) ${chunkX6RDQ5NB_cjs.sql.identifier(tableName)}`,
|
|
743
|
+
"postgres"
|
|
744
|
+
)
|
|
730
745
|
);
|
|
731
746
|
}
|
|
732
747
|
},
|
|
@@ -743,9 +758,12 @@ function createPostgresBackend(db, options = {}) {
|
|
|
743
758
|
);
|
|
744
759
|
},
|
|
745
760
|
async transaction(fn, options2) {
|
|
746
|
-
|
|
761
|
+
return backend.transactionWithNative((tx) => fn(tx), options2);
|
|
762
|
+
},
|
|
763
|
+
async transactionWithNative(fn, options2) {
|
|
764
|
+
const temporaryWrites = options2?.temporaryWrites === chunkGNPGGLAE_cjs.INTERNAL_TEMPORARY_WRITES;
|
|
747
765
|
if (temporaryWrites && options2.accessMode !== "read_only") {
|
|
748
|
-
throw new
|
|
766
|
+
throw new chunkSAFZ6JTI_cjs.ConfigurationError(
|
|
749
767
|
"Temporary-write transactions must be semantically read-only.",
|
|
750
768
|
{ dialect: "postgres" }
|
|
751
769
|
);
|
|
@@ -755,7 +773,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
755
773
|
isolationLevel: options2.isolationLevel.replace("_", " ")
|
|
756
774
|
},
|
|
757
775
|
...options2.accessMode === void 0 && !temporaryWrites ? {} : {
|
|
758
|
-
accessMode: temporaryWrites ? "read write" : options2.accessMode.replace("_", " ")
|
|
776
|
+
accessMode: temporaryWrites ? "read write" : chunk764JHTLT_cjs.requireDefined(options2.accessMode).replace("_", " ")
|
|
759
777
|
}
|
|
760
778
|
} : void 0;
|
|
761
779
|
return db.transaction(async (tx) => {
|
|
@@ -769,7 +787,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
769
787
|
},
|
|
770
788
|
adoptTransaction(externalTx) {
|
|
771
789
|
if (!capabilities.transactions) {
|
|
772
|
-
throw new
|
|
790
|
+
throw new chunkSAFZ6JTI_cjs.ConfigurationError(
|
|
773
791
|
"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.",
|
|
774
792
|
{
|
|
775
793
|
backend: "postgres",
|
|
@@ -778,7 +796,11 @@ function createPostgresBackend(db, options = {}) {
|
|
|
778
796
|
}
|
|
779
797
|
);
|
|
780
798
|
}
|
|
781
|
-
|
|
799
|
+
chunkXFY73JWD_cjs.assertAdoptedDialect(
|
|
800
|
+
externalTx,
|
|
801
|
+
pgCore.PgTransaction,
|
|
802
|
+
"postgres"
|
|
803
|
+
);
|
|
782
804
|
return bindTransactionBackend(externalTx).backend;
|
|
783
805
|
},
|
|
784
806
|
async close() {
|
|
@@ -882,7 +904,7 @@ function createPostgresOperationBackend(options) {
|
|
|
882
904
|
async function runVectorSearchGucGroup(overrides, query) {
|
|
883
905
|
const runExclusive = executionAdapter.runExclusive;
|
|
884
906
|
if (runExclusive === void 0) {
|
|
885
|
-
throw new
|
|
907
|
+
throw new chunkSAFZ6JTI_cjs.CompilerInvariantError(
|
|
886
908
|
"A transaction-scoped Postgres backend must expose runExclusive; its execution adapter was not wrapped by createSerialExecutionAdapter."
|
|
887
909
|
);
|
|
888
910
|
}
|
|
@@ -934,7 +956,7 @@ function createPostgresOperationBackend(options) {
|
|
|
934
956
|
embeddingUpsertBatchSize: Math.max(
|
|
935
957
|
1,
|
|
936
958
|
Math.floor(
|
|
937
|
-
(capabilities.maxBindParameters ??
|
|
959
|
+
(capabilities.maxBindParameters ?? chunkGNPGGLAE_cjs.POSTGRES_MAX_BIND_PARAMETERS) / chunkXFY73JWD_cjs.EMBEDDING_UPSERT_PARAM_COUNT
|
|
938
960
|
)
|
|
939
961
|
),
|
|
940
962
|
getEdgesChunkSize: POSTGRES_GET_EDGES_ID_CHUNK_SIZE,
|
|
@@ -942,14 +964,14 @@ function createPostgresOperationBackend(options) {
|
|
|
942
964
|
nodeInsertBatchSize: POSTGRES_NODE_INSERT_BATCH_SIZE,
|
|
943
965
|
uniqueInsertBatchSize: POSTGRES_UNIQUE_INSERT_BATCH_SIZE
|
|
944
966
|
};
|
|
945
|
-
const commonBackend =
|
|
967
|
+
const commonBackend = chunkXFY73JWD_cjs.createCommonOperationBackend({
|
|
946
968
|
batchConfig,
|
|
947
969
|
execution: {
|
|
948
970
|
execAll,
|
|
949
971
|
execGet,
|
|
950
972
|
execRun
|
|
951
973
|
},
|
|
952
|
-
nowIso:
|
|
974
|
+
nowIso: chunkE6TXEISH_cjs.nowIso,
|
|
953
975
|
operationStrategy,
|
|
954
976
|
rowMappers: {
|
|
955
977
|
toEdgeRow,
|
|
@@ -967,28 +989,28 @@ function createPostgresOperationBackend(options) {
|
|
|
967
989
|
};
|
|
968
990
|
const vectorEmbeddingMethods = vectorStrategy === void 0 ? {} : {
|
|
969
991
|
async upsertEmbedding(params) {
|
|
970
|
-
const slot =
|
|
992
|
+
const slot = chunkXFY73JWD_cjs.vectorSlotFromParams(params);
|
|
971
993
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
972
|
-
const statements = vectorStrategy.buildUpsert(slot, params,
|
|
994
|
+
const statements = vectorStrategy.buildUpsert(slot, params, chunkE6TXEISH_cjs.nowIso());
|
|
973
995
|
try {
|
|
974
996
|
for (const statement of statements) {
|
|
975
997
|
await execRun(statement);
|
|
976
998
|
}
|
|
977
999
|
} catch (error) {
|
|
978
|
-
throw
|
|
1000
|
+
throw chunkXFY73JWD_cjs.mapVectorWriteError(error, params);
|
|
979
1001
|
}
|
|
980
1002
|
},
|
|
981
1003
|
async upsertEmbeddingBatch(params) {
|
|
982
1004
|
if (params.rows.length === 0) return;
|
|
983
|
-
const slot =
|
|
1005
|
+
const slot = chunkXFY73JWD_cjs.vectorSlotFromParams(params);
|
|
984
1006
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
985
1007
|
const rowsById = new Map(
|
|
986
1008
|
params.rows.map((row) => [row.nodeId, row])
|
|
987
1009
|
);
|
|
988
1010
|
const rows = [...rowsById.values()];
|
|
989
|
-
const timestamp =
|
|
1011
|
+
const timestamp = chunkE6TXEISH_cjs.nowIso();
|
|
990
1012
|
try {
|
|
991
|
-
for (const chunk2 of
|
|
1013
|
+
for (const chunk2 of chunkZDH3DX3C_cjs.chunk(
|
|
992
1014
|
rows,
|
|
993
1015
|
batchConfig.embeddingUpsertBatchSize
|
|
994
1016
|
)) {
|
|
@@ -1017,11 +1039,11 @@ function createPostgresOperationBackend(options) {
|
|
|
1017
1039
|
}
|
|
1018
1040
|
}
|
|
1019
1041
|
} catch (error) {
|
|
1020
|
-
throw
|
|
1042
|
+
throw chunkXFY73JWD_cjs.mapVectorWriteError(error, params);
|
|
1021
1043
|
}
|
|
1022
1044
|
},
|
|
1023
1045
|
async deleteEmbedding(params) {
|
|
1024
|
-
const slot =
|
|
1046
|
+
const slot = chunkXFY73JWD_cjs.vectorSlotFromParams(params);
|
|
1025
1047
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
1026
1048
|
const statements = vectorStrategy.buildDelete(slot, params);
|
|
1027
1049
|
for (const statement of statements) {
|
|
@@ -1029,17 +1051,19 @@ function createPostgresOperationBackend(options) {
|
|
|
1029
1051
|
}
|
|
1030
1052
|
},
|
|
1031
1053
|
async vectorSearch(params) {
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
const slot =
|
|
1054
|
+
chunkZKZAIX42_cjs.assertVectorSearchLimit(params.limit);
|
|
1055
|
+
chunkB63IFHXR_cjs.assertPgvectorEfSearch(params.efSearch);
|
|
1056
|
+
const slot = chunkXFY73JWD_cjs.vectorSlotFromParams(params);
|
|
1035
1057
|
const query = vectorStrategy.buildSearch(
|
|
1036
1058
|
slot,
|
|
1037
1059
|
params,
|
|
1038
1060
|
// Store-compiled candidates (predicates + subclass + currency)
|
|
1039
1061
|
// take precedence; the live-node default covers direct backend use.
|
|
1040
|
-
params.candidates ??
|
|
1062
|
+
params.candidates ?? chunkXFY73JWD_cjs.buildLiveNodeCandidates(
|
|
1063
|
+
tableNames.nodes,
|
|
1041
1064
|
params.graphId,
|
|
1042
|
-
params.nodeKind
|
|
1065
|
+
params.nodeKind,
|
|
1066
|
+
chunkE6TXEISH_cjs.nowIso()
|
|
1043
1067
|
)
|
|
1044
1068
|
);
|
|
1045
1069
|
const gucOverrides = await vectorSearchGucOverrides(params);
|
|
@@ -1047,7 +1071,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1047
1071
|
try {
|
|
1048
1072
|
rows = await runVectorSearch(gucOverrides, query);
|
|
1049
1073
|
} catch (error) {
|
|
1050
|
-
throw
|
|
1074
|
+
throw chunkXFY73JWD_cjs.mapVectorWriteError(error, params);
|
|
1051
1075
|
}
|
|
1052
1076
|
return rows.map((row) => ({
|
|
1053
1077
|
nodeId: row.node_id,
|
|
@@ -1059,10 +1083,10 @@ function createPostgresOperationBackend(options) {
|
|
|
1059
1083
|
// multi-statement fallback by simply not exposing the member.
|
|
1060
1084
|
...capabilities.windowFunctions ? {
|
|
1061
1085
|
async hybridSearch(params) {
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
const slot =
|
|
1086
|
+
chunkZKZAIX42_cjs.assertVectorSearchLimit(params.limit);
|
|
1087
|
+
chunkZKZAIX42_cjs.assertVectorSearchLimit(params.vector.k);
|
|
1088
|
+
chunkB63IFHXR_cjs.assertPgvectorEfSearch(params.vector.efSearch);
|
|
1089
|
+
const slot = chunkXFY73JWD_cjs.vectorSlotFromParams({
|
|
1066
1090
|
graphId: params.graphId,
|
|
1067
1091
|
nodeKind: params.nodeKind,
|
|
1068
1092
|
fieldPath: params.vector.fieldPath,
|
|
@@ -1070,9 +1094,11 @@ function createPostgresOperationBackend(options) {
|
|
|
1070
1094
|
metric: params.vector.metric,
|
|
1071
1095
|
indexType: params.vector.indexType
|
|
1072
1096
|
});
|
|
1073
|
-
const candidates = params.candidates ??
|
|
1097
|
+
const candidates = params.candidates ?? chunkXFY73JWD_cjs.buildLiveNodeCandidates(
|
|
1098
|
+
tableNames.nodes,
|
|
1074
1099
|
params.graphId,
|
|
1075
|
-
params.nodeKind
|
|
1100
|
+
params.nodeKind,
|
|
1101
|
+
chunkE6TXEISH_cjs.nowIso()
|
|
1076
1102
|
);
|
|
1077
1103
|
const vectorParams = {
|
|
1078
1104
|
graphId: params.graphId,
|
|
@@ -1088,11 +1114,11 @@ function createPostgresOperationBackend(options) {
|
|
|
1088
1114
|
const vectorSql = vectorStrategy.buildSearch(
|
|
1089
1115
|
slot,
|
|
1090
1116
|
vectorParams,
|
|
1091
|
-
|
|
1117
|
+
chunkX6RDQ5NB_cjs.sql.raw("SELECT node_id FROM tg_hybrid_cand")
|
|
1092
1118
|
);
|
|
1093
1119
|
const statement = operationStrategy.buildHybridSearch(
|
|
1094
1120
|
{ ...params, candidates },
|
|
1095
|
-
vectorSql,
|
|
1121
|
+
chunkDOVMTPKE_cjs.toDrizzleSql(vectorSql, "postgres"),
|
|
1096
1122
|
params.vector.metric === "cosine"
|
|
1097
1123
|
);
|
|
1098
1124
|
const gucOverrides = await vectorSearchGucOverrides({
|
|
@@ -1106,9 +1132,9 @@ function createPostgresOperationBackend(options) {
|
|
|
1106
1132
|
statement
|
|
1107
1133
|
);
|
|
1108
1134
|
} catch (error) {
|
|
1109
|
-
throw
|
|
1135
|
+
throw chunkXFY73JWD_cjs.mapVectorWriteError(error, vectorParams);
|
|
1110
1136
|
}
|
|
1111
|
-
return raw.map((row) =>
|
|
1137
|
+
return raw.map((row) => chunkXFY73JWD_cjs.mapHybridSearchRow(row, toNodeRow));
|
|
1112
1138
|
}
|
|
1113
1139
|
} : {}
|
|
1114
1140
|
};
|
|
@@ -1124,7 +1150,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1124
1150
|
// === Vector Index Operations ===
|
|
1125
1151
|
async createVectorIndex(params) {
|
|
1126
1152
|
if (vectorStrategy === void 0) return;
|
|
1127
|
-
const slot =
|
|
1153
|
+
const slot = chunkXFY73JWD_cjs.vectorSlotFromCreateIndexParams(params);
|
|
1128
1154
|
await contributionMaterializer.ensureVectorSlot(slot);
|
|
1129
1155
|
const indexStatement = vectorStrategy.buildCreateIndex?.(slot, {
|
|
1130
1156
|
concurrent: params.concurrent === true
|
|
@@ -1133,30 +1159,34 @@ function createPostgresOperationBackend(options) {
|
|
|
1133
1159
|
try {
|
|
1134
1160
|
await execRun(indexStatement);
|
|
1135
1161
|
} catch (error) {
|
|
1136
|
-
if (!
|
|
1162
|
+
if (!chunkO5H62ZWJ_cjs.isInsufficientResourcesError(error)) throw error;
|
|
1137
1163
|
const dropStatement = vectorStrategy.buildDropIndex?.(slot);
|
|
1138
1164
|
if (dropStatement !== void 0) {
|
|
1139
1165
|
await execRun(dropStatement);
|
|
1140
1166
|
}
|
|
1141
|
-
const table =
|
|
1167
|
+
const table = chunkX6RDQ5NB_cjs.sql.identifier(
|
|
1142
1168
|
vectorStrategy.tableName(
|
|
1143
1169
|
slot.graphId,
|
|
1144
1170
|
slot.nodeKind,
|
|
1145
1171
|
slot.fieldPath
|
|
1146
1172
|
)
|
|
1147
1173
|
);
|
|
1148
|
-
await execRun(
|
|
1174
|
+
await execRun(
|
|
1175
|
+
chunkX6RDQ5NB_cjs.sql`ALTER TABLE ${table} SET (parallel_workers = 0)`
|
|
1176
|
+
);
|
|
1149
1177
|
try {
|
|
1150
1178
|
await execRun(indexStatement);
|
|
1151
1179
|
} finally {
|
|
1152
|
-
await execRun(
|
|
1180
|
+
await execRun(
|
|
1181
|
+
chunkX6RDQ5NB_cjs.sql`ALTER TABLE ${table} RESET (parallel_workers)`
|
|
1182
|
+
);
|
|
1153
1183
|
}
|
|
1154
1184
|
}
|
|
1155
1185
|
}
|
|
1156
1186
|
},
|
|
1157
1187
|
// === Fulltext Operations ===
|
|
1158
1188
|
async upsertFulltext(params) {
|
|
1159
|
-
const timestamp =
|
|
1189
|
+
const timestamp = chunkE6TXEISH_cjs.nowIso();
|
|
1160
1190
|
const statements = operationStrategy.buildUpsertFulltext(
|
|
1161
1191
|
params,
|
|
1162
1192
|
timestamp
|
|
@@ -1173,8 +1203,8 @@ function createPostgresOperationBackend(options) {
|
|
|
1173
1203
|
},
|
|
1174
1204
|
async upsertFulltextBatch(params) {
|
|
1175
1205
|
if (params.rows.length === 0) return;
|
|
1176
|
-
const timestamp =
|
|
1177
|
-
for (const rows of
|
|
1206
|
+
const timestamp = chunkE6TXEISH_cjs.nowIso();
|
|
1207
|
+
for (const rows of chunkZDH3DX3C_cjs.chunk(
|
|
1178
1208
|
params.rows,
|
|
1179
1209
|
POSTGRES_FULLTEXT_UPSERT_BATCH_SIZE
|
|
1180
1210
|
)) {
|
|
@@ -1189,7 +1219,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1189
1219
|
},
|
|
1190
1220
|
async deleteFulltextBatch(params) {
|
|
1191
1221
|
if (params.nodeIds.length === 0) return;
|
|
1192
|
-
for (const nodeIds of
|
|
1222
|
+
for (const nodeIds of chunkZDH3DX3C_cjs.chunk(
|
|
1193
1223
|
params.nodeIds,
|
|
1194
1224
|
POSTGRES_FULLTEXT_DELETE_CHUNK_SIZE
|
|
1195
1225
|
)) {
|
|
@@ -1207,25 +1237,25 @@ function createPostgresOperationBackend(options) {
|
|
|
1207
1237
|
const rows = await execAll(query);
|
|
1208
1238
|
return rows.map((row, index) => ({
|
|
1209
1239
|
nodeId: row.node_id,
|
|
1210
|
-
score:
|
|
1240
|
+
score: chunkE6TXEISH_cjs.coerceNumericScore(row.score),
|
|
1211
1241
|
rank: index + 1,
|
|
1212
1242
|
...row.snippet === null ? {} : { snippet: row.snippet }
|
|
1213
1243
|
}));
|
|
1214
1244
|
},
|
|
1215
1245
|
async dropVectorIndex(params) {
|
|
1216
1246
|
if (vectorStrategy === void 0) return;
|
|
1217
|
-
const slot =
|
|
1247
|
+
const slot = chunkXFY73JWD_cjs.vectorSlotFromDropIndexParams(params);
|
|
1218
1248
|
const dropStatement = vectorStrategy.buildDropIndex?.(slot);
|
|
1219
1249
|
if (dropStatement === void 0) return;
|
|
1220
1250
|
try {
|
|
1221
1251
|
await execRun(dropStatement);
|
|
1222
1252
|
} catch (error) {
|
|
1223
|
-
if (!
|
|
1253
|
+
if (!chunkO5H62ZWJ_cjs.isMissingTableError(error)) throw error;
|
|
1224
1254
|
}
|
|
1225
1255
|
},
|
|
1226
1256
|
// === Query Execution ===
|
|
1227
1257
|
async execute(query) {
|
|
1228
|
-
const annTypes =
|
|
1258
|
+
const annTypes = chunkX6RDQ5NB_cjs.isSqlFragment(query) ? chunkX6RDQ5NB_cjs.annIndexScanTypes(query) : void 0;
|
|
1229
1259
|
if (annTypes !== void 0 && vectorStrategy !== void 0) {
|
|
1230
1260
|
const overrides = [];
|
|
1231
1261
|
for (const indexType of annTypes) {
|
|
@@ -1264,5 +1294,5 @@ function createTransactionBackend(options) {
|
|
|
1264
1294
|
}
|
|
1265
1295
|
|
|
1266
1296
|
exports.createPostgresBackend = createPostgresBackend;
|
|
1267
|
-
//# sourceMappingURL=chunk-
|
|
1268
|
-
//# sourceMappingURL=chunk-
|
|
1297
|
+
//# sourceMappingURL=chunk-7VLCN3JB.cjs.map
|
|
1298
|
+
//# sourceMappingURL=chunk-7VLCN3JB.cjs.map
|