@nicia-ai/typegraph 0.32.0 → 0.34.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 +51 -0
- package/dist/backend/postgres/index.cjs +36 -19
- package/dist/backend/postgres/index.d.cts +6 -6
- package/dist/backend/postgres/index.d.ts +6 -6
- package/dist/backend/postgres/index.js +14 -9
- package/dist/backend/postgres/pglite.cjs +18 -13
- package/dist/backend/postgres/pglite.cjs.map +1 -1
- 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 -9
- package/dist/backend/postgres/pglite.js.map +1 -1
- package/dist/backend/sqlite/index.cjs +34 -17
- package/dist/backend/sqlite/index.d.cts +7 -7
- package/dist/backend/sqlite/index.d.ts +7 -7
- package/dist/backend/sqlite/index.js +13 -8
- package/dist/backend/sqlite/libsql.cjs +19 -14
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +12 -5
- package/dist/backend/sqlite/libsql.d.ts +12 -5
- package/dist/backend/sqlite/libsql.js +15 -10
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +19 -14
- package/dist/backend/sqlite/local.cjs.map +1 -1
- 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 -9
- 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-CFNT3ITG.cjs → chunk-2JXB3NYJ.cjs} +15 -35
- package/dist/chunk-2JXB3NYJ.cjs.map +1 -0
- package/dist/chunk-2MRAX3UE.js +105 -0
- package/dist/chunk-2MRAX3UE.js.map +1 -0
- package/dist/{chunk-2LAT5BIK.cjs → chunk-3BRVBQQD.cjs} +2328 -3131
- package/dist/chunk-3BRVBQQD.cjs.map +1 -0
- package/dist/chunk-3E7SNSIA.cjs +55 -0
- package/dist/chunk-3E7SNSIA.cjs.map +1 -0
- package/dist/{chunk-FDN43KXV.cjs → chunk-3Z6TW3CT.cjs} +20 -19
- package/dist/chunk-3Z6TW3CT.cjs.map +1 -0
- package/dist/{chunk-IJORSAC3.js → chunk-4DIBPQNJ.js} +6 -4
- package/dist/chunk-4DIBPQNJ.js.map +1 -0
- package/dist/chunk-4S2FXGBJ.js +9 -0
- package/dist/chunk-4S2FXGBJ.js.map +1 -0
- package/dist/chunk-5IQIX7LU.cjs +2070 -0
- package/dist/chunk-5IQIX7LU.cjs.map +1 -0
- package/dist/{chunk-CWFPJ3RC.js → chunk-6GNSY7AV.js} +3 -3
- package/dist/{chunk-CWFPJ3RC.js.map → chunk-6GNSY7AV.js.map} +1 -1
- package/dist/{chunk-LAZGHOZW.cjs → chunk-6HVOHZHS.cjs} +184 -117
- package/dist/chunk-6HVOHZHS.cjs.map +1 -0
- package/dist/chunk-6SCVW4AS.js +20 -0
- package/dist/chunk-6SCVW4AS.js.map +1 -0
- package/dist/chunk-A7SZZFAG.js +2010 -0
- package/dist/chunk-A7SZZFAG.js.map +1 -0
- package/dist/chunk-ACSVZPK7.cjs +21 -0
- package/dist/chunk-ACSVZPK7.cjs.map +1 -0
- package/dist/{chunk-MXE2U3EX.js → chunk-BVTWD66D.js} +4 -115
- package/dist/chunk-BVTWD66D.js.map +1 -0
- package/dist/{chunk-W4ZX2GCP.js → chunk-CHXTTSC6.js} +5 -39
- package/dist/chunk-CHXTTSC6.js.map +1 -0
- package/dist/{chunk-XQFAJVYW.js → chunk-CYX2JTDG.js} +124 -5
- package/dist/chunk-CYX2JTDG.js.map +1 -0
- package/dist/{chunk-PRMKPFN5.js → chunk-DEQFL35G.js} +4 -3
- package/dist/chunk-DEQFL35G.js.map +1 -0
- package/dist/chunk-DI74SMXS.cjs +29 -0
- package/dist/chunk-DI74SMXS.cjs.map +1 -0
- package/dist/{chunk-WWVV44DY.cjs → chunk-G6SOJEDI.cjs} +11 -11
- package/dist/{chunk-WWVV44DY.cjs.map → chunk-G6SOJEDI.cjs.map} +1 -1
- package/dist/{chunk-LM2IC4ZJ.cjs → chunk-GQANNXXT.cjs} +15 -14
- package/dist/chunk-GQANNXXT.cjs.map +1 -0
- package/dist/chunk-GZCNZ7QW.js +24 -0
- package/dist/chunk-GZCNZ7QW.js.map +1 -0
- package/dist/{chunk-KTIEB7VH.cjs → chunk-HK5SATYM.cjs} +35 -58
- package/dist/chunk-HK5SATYM.cjs.map +1 -0
- package/dist/chunk-HMFK4BXR.cjs +12 -0
- package/dist/{chunk-6ZR4QC3O.cjs.map → chunk-HMFK4BXR.cjs.map} +1 -1
- package/dist/chunk-ITE4IXAK.js +25 -0
- package/dist/chunk-ITE4IXAK.js.map +1 -0
- package/dist/chunk-JJRCLAUN.cjs +155 -0
- package/dist/chunk-JJRCLAUN.cjs.map +1 -0
- package/dist/{chunk-ZFWNO3GE.cjs → chunk-JQGIPGVL.cjs} +66 -2
- package/dist/chunk-JQGIPGVL.cjs.map +1 -0
- package/dist/{chunk-2BVHPOIG.js → chunk-K2TGS3EN.js} +105 -38
- package/dist/chunk-K2TGS3EN.js.map +1 -0
- package/dist/chunk-K34OPSJK.js +29 -0
- package/dist/chunk-K34OPSJK.js.map +1 -0
- package/dist/{chunk-YW7GHMF4.cjs → chunk-KGC4LY5T.cjs} +18 -17
- package/dist/chunk-KGC4LY5T.cjs.map +1 -0
- package/dist/{chunk-SB65GJNY.cjs → chunk-KNHYNQQ3.cjs} +111 -72
- package/dist/chunk-KNHYNQQ3.cjs.map +1 -0
- package/dist/{chunk-C4C4Q7A6.js → chunk-KUTNI6SI.js} +6 -21
- package/dist/chunk-KUTNI6SI.js.map +1 -0
- package/dist/{chunk-NDM5PXEH.js → chunk-LANHCOXB.js} +44 -11
- package/dist/chunk-LANHCOXB.js.map +1 -0
- package/dist/chunk-N6WTUSBV.cjs +23 -0
- package/dist/chunk-N6WTUSBV.cjs.map +1 -0
- package/dist/{chunk-73KASJGO.cjs → chunk-NAUA4PW5.cjs} +4 -28
- package/dist/chunk-NAUA4PW5.cjs.map +1 -0
- package/dist/chunk-QV245VMN.js +145 -0
- package/dist/chunk-QV245VMN.js.map +1 -0
- package/dist/{chunk-CEF2QOTO.js → chunk-RBV7YCQD.js} +4 -3
- package/dist/chunk-RBV7YCQD.js.map +1 -0
- package/dist/chunk-RHZWOJVA.cjs +109 -0
- package/dist/chunk-RHZWOJVA.cjs.map +1 -0
- package/dist/{chunk-6RMLO5O4.cjs → chunk-RRKQAKD6.cjs} +13 -11
- package/dist/chunk-RRKQAKD6.cjs.map +1 -0
- package/dist/{chunk-TUA3MEJJ.js → chunk-RY2VIWAM.js} +612 -564
- package/dist/chunk-RY2VIWAM.js.map +1 -0
- package/dist/{chunk-PIHXFF73.js → chunk-SHLY4MCM.js} +3 -3
- package/dist/{chunk-PIHXFF73.js.map → chunk-SHLY4MCM.js.map} +1 -1
- package/dist/{chunk-HFBRAOF7.js → chunk-T2DWPQNE.js} +103 -64
- package/dist/chunk-T2DWPQNE.js.map +1 -0
- package/dist/{chunk-WYTUF3QO.js → chunk-T46GR2VY.js} +3 -3
- package/dist/{chunk-WYTUF3QO.js.map → chunk-T46GR2VY.js.map} +1 -1
- package/dist/{chunk-EEYV6UOE.cjs → chunk-T6SPUYLX.cjs} +5 -43
- package/dist/chunk-T6SPUYLX.cjs.map +1 -0
- package/dist/{chunk-3QRBXYT5.cjs → chunk-TGJE22RM.cjs} +6 -6
- package/dist/{chunk-3QRBXYT5.cjs.map → chunk-TGJE22RM.cjs.map} +1 -1
- package/dist/{chunk-YL4F3CMD.cjs → chunk-TOTPVGOG.cjs} +105 -72
- package/dist/chunk-TOTPVGOG.cjs.map +1 -0
- package/dist/{chunk-3HQDMOBK.cjs → chunk-UJLOZYKT.cjs} +680 -636
- package/dist/chunk-UJLOZYKT.cjs.map +1 -0
- package/dist/chunk-UNNPKQUG.cjs +1390 -0
- package/dist/chunk-UNNPKQUG.cjs.map +1 -0
- package/dist/chunk-UR7W5YQK.js +18 -0
- package/dist/chunk-UR7W5YQK.js.map +1 -0
- package/dist/chunk-V3QNTB7Z.js +1351 -0
- package/dist/chunk-V3QNTB7Z.js.map +1 -0
- package/dist/{chunk-XKNAK27R.js → chunk-VCGO4V26.js} +4 -3
- package/dist/chunk-VCGO4V26.js.map +1 -0
- package/dist/{chunk-YQGLVWB2.cjs → chunk-WL2SG7ZV.cjs} +6 -122
- package/dist/chunk-WL2SG7ZV.cjs.map +1 -0
- package/dist/{chunk-WNORITK6.js → chunk-WLRIWYHQ.js} +2041 -2834
- package/dist/chunk-WLRIWYHQ.js.map +1 -0
- package/dist/{chunk-JKRKIEVA.cjs → chunk-WVC2Q2FD.cjs} +128 -6
- package/dist/chunk-WVC2Q2FD.cjs.map +1 -0
- package/dist/chunk-XLUNB2TZ.js +53 -0
- package/dist/chunk-XLUNB2TZ.js.map +1 -0
- package/dist/chunk-XXVEULWX.js +39 -0
- package/dist/chunk-XXVEULWX.js.map +1 -0
- package/dist/chunk-YAZE7QZR.cjs +32 -0
- package/dist/chunk-YAZE7QZR.cjs.map +1 -0
- package/dist/chunk-YC6PWTHY.cjs +44 -0
- package/dist/chunk-YC6PWTHY.cjs.map +1 -0
- package/dist/chunk-Z5HBYM7U.cjs +11 -0
- package/dist/chunk-Z5HBYM7U.cjs.map +1 -0
- package/dist/{chunk-454I6GDF.js → chunk-Z5XBMDXU.js} +63 -3
- package/dist/chunk-Z5XBMDXU.js.map +1 -0
- package/dist/{chunk-CAMMC3E4.cjs → chunk-ZP5WHI4C.cjs} +109 -81
- package/dist/chunk-ZP5WHI4C.cjs.map +1 -0
- package/dist/{chunk-YCV72E6L.js → chunk-ZURTTSCM.js} +4 -25
- package/dist/chunk-ZURTTSCM.js.map +1 -0
- package/dist/{chunk-7WW3WL6E.js → chunk-ZV5N4DBG.js} +49 -21
- package/dist/chunk-ZV5N4DBG.js.map +1 -0
- package/dist/chunk-ZY4GXIVN.cjs +32 -0
- package/dist/chunk-ZY4GXIVN.cjs.map +1 -0
- package/dist/{ddl-C8e8zDAE.d.ts → ddl-BrmPg61z.d.ts} +3 -3
- package/dist/{ddl-CwyG4HoQ.d.cts → ddl-j1-sH6lE.d.cts} +3 -3
- package/dist/{extension-types-D1k0inWU.d.cts → extension-types-YGFJPrzK.d.cts} +1 -1
- package/dist/{extension-types-D1k0inWU.d.ts → extension-types-YGFJPrzK.d.ts} +1 -1
- package/dist/graph-extension/index.cjs +18 -17
- package/dist/graph-extension/index.d.cts +4 -4
- package/dist/graph-extension/index.d.ts +4 -4
- package/dist/graph-extension/index.js +3 -2
- package/dist/graph-merge/index.cjs +295 -146
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +6 -6
- package/dist/graph-merge/index.d.ts +6 -6
- package/dist/graph-merge/index.js +173 -24
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/{index-BEK0VtNB.d.ts → index-DGX6D9j1.d.ts} +2 -2
- package/dist/{index-C8sSTErx.d.cts → index-SEvUHDA6.d.cts} +2 -2
- package/dist/index.cjs +206 -172
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -55
- package/dist/index.d.ts +25 -55
- package/dist/index.js +32 -22
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +28 -25
- package/dist/indexes/index.d.cts +5 -5
- package/dist/indexes/index.d.ts +5 -5
- package/dist/indexes/index.js +10 -7
- package/dist/interchange/index.cjs +25 -16
- package/dist/interchange/index.d.cts +5 -5
- package/dist/interchange/index.d.ts +5 -5
- package/dist/interchange/index.js +12 -3
- package/dist/{manager-8htmuGr-.d.ts → manager-BZUeN_BU.d.ts} +2 -2
- package/dist/{manager-aVgxbGt-.d.cts → manager-ms9cKdc6.d.cts} +2 -2
- package/dist/{materialize-indexes-CAGhqPHQ.d.ts → materialize-indexes-CAkIYFV-.d.ts} +1 -1
- package/dist/{materialize-indexes-DEYkU-wr.d.cts → materialize-indexes-D20xNluI.d.cts} +1 -1
- package/dist/{postgres-Dhom7iiX.d.ts → postgres-BhpxGMC5.d.cts} +2651 -596
- package/dist/{postgres-jgXmD45C.d.cts → postgres-CWHLwNl1.d.ts} +2651 -596
- package/dist/profiler/index.cjs +5 -4
- package/dist/profiler/index.cjs.map +1 -1
- package/dist/profiler/index.d.cts +7 -7
- package/dist/profiler/index.d.ts +7 -7
- package/dist/profiler/index.js +3 -2
- package/dist/profiler/index.js.map +1 -1
- package/dist/provenance/index.cjs +591 -0
- package/dist/provenance/index.cjs.map +1 -0
- package/dist/provenance/index.d.cts +73 -0
- package/dist/provenance/index.d.ts +73 -0
- package/dist/provenance/index.js +589 -0
- package/dist/provenance/index.js.map +1 -0
- package/dist/schema/index.cjs +37 -32
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +7 -7
- package/dist/schema/index.d.ts +7 -7
- package/dist/schema/index.js +14 -9
- package/dist/schema/index.js.map +1 -1
- package/dist/{sqlite-DcQ_BCUW.d.cts → sqlite-CGu5SLsw.d.ts} +2726 -455
- package/dist/{sqlite-BfLsCEqO.d.ts → sqlite-XrDxNaa7.d.cts} +2726 -455
- package/dist/{store-view-pBOUrQte.d.ts → store-view-BlgnhEYf.d.ts} +467 -131
- package/dist/{store-view-lTcb_cnp.d.cts → store-view-D09po4H6.d.cts} +467 -131
- package/dist/{types-DGDiXAYc.d.ts → types-B1TbZJYS.d.ts} +2 -2
- package/dist/{types-Dk8r09KY.d.ts → types-D1Sqeyxy.d.ts} +161 -26
- package/dist/{types-5RQwzWXx.d.cts → types-DiE1AO7p.d.cts} +2 -2
- package/dist/{types-Dvmn-eal.d.cts → types-DkNnF-7K.d.cts} +161 -26
- package/dist/{where-Cx_glEEB.d.cts → where-DKjuofPr.d.cts} +2 -2
- package/dist/{where-CHZFELX0.d.ts → where-DrUIIWHb.d.ts} +2 -2
- package/package.json +8 -2
- package/dist/chunk-2BVHPOIG.js.map +0 -1
- package/dist/chunk-2LAT5BIK.cjs.map +0 -1
- package/dist/chunk-2YMGNYXY.js +0 -40
- package/dist/chunk-2YMGNYXY.js.map +0 -1
- package/dist/chunk-3HQDMOBK.cjs.map +0 -1
- package/dist/chunk-454I6GDF.js.map +0 -1
- package/dist/chunk-6G35I3VW.cjs +0 -40
- package/dist/chunk-6G35I3VW.cjs.map +0 -1
- package/dist/chunk-6RMLO5O4.cjs.map +0 -1
- package/dist/chunk-6ZR4QC3O.cjs +0 -12
- package/dist/chunk-73KASJGO.cjs.map +0 -1
- package/dist/chunk-7WW3WL6E.js.map +0 -1
- package/dist/chunk-C4C4Q7A6.js.map +0 -1
- package/dist/chunk-CAMMC3E4.cjs.map +0 -1
- package/dist/chunk-CEF2QOTO.js.map +0 -1
- package/dist/chunk-CFNT3ITG.cjs.map +0 -1
- package/dist/chunk-EEYV6UOE.cjs.map +0 -1
- package/dist/chunk-FDN43KXV.cjs.map +0 -1
- package/dist/chunk-HFBRAOF7.js.map +0 -1
- package/dist/chunk-IJORSAC3.js.map +0 -1
- package/dist/chunk-JKRKIEVA.cjs.map +0 -1
- package/dist/chunk-KTIEB7VH.cjs.map +0 -1
- package/dist/chunk-LAZGHOZW.cjs.map +0 -1
- package/dist/chunk-LM2IC4ZJ.cjs.map +0 -1
- package/dist/chunk-M6OC455F.js +0 -65
- package/dist/chunk-M6OC455F.js.map +0 -1
- package/dist/chunk-MXE2U3EX.js.map +0 -1
- package/dist/chunk-NDM5PXEH.js.map +0 -1
- package/dist/chunk-PRMKPFN5.js.map +0 -1
- package/dist/chunk-RP7YITHX.cjs +0 -70
- package/dist/chunk-RP7YITHX.cjs.map +0 -1
- package/dist/chunk-SAJSMR2B.js +0 -35
- package/dist/chunk-SAJSMR2B.js.map +0 -1
- package/dist/chunk-SB65GJNY.cjs.map +0 -1
- package/dist/chunk-TUA3MEJJ.js.map +0 -1
- package/dist/chunk-W4ZX2GCP.js.map +0 -1
- package/dist/chunk-WNORITK6.js.map +0 -1
- package/dist/chunk-XKNAK27R.js.map +0 -1
- package/dist/chunk-XQFAJVYW.js.map +0 -1
- package/dist/chunk-YCV72E6L.js.map +0 -1
- package/dist/chunk-YL4F3CMD.cjs.map +0 -1
- package/dist/chunk-YQGLVWB2.cjs.map +0 -1
- package/dist/chunk-YW7GHMF4.cjs.map +0 -1
- package/dist/chunk-ZFWNO3GE.cjs.map +0 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkUJLOZYKT_cjs = require('./chunk-UJLOZYKT.cjs');
|
|
4
|
+
var chunkKGC4LY5T_cjs = require('./chunk-KGC4LY5T.cjs');
|
|
4
5
|
var chunkHTGDWIDE_cjs = require('./chunk-HTGDWIDE.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
6
|
+
var chunkJJRCLAUN_cjs = require('./chunk-JJRCLAUN.cjs');
|
|
7
|
+
var chunk2JXB3NYJ_cjs = require('./chunk-2JXB3NYJ.cjs');
|
|
8
|
+
var chunkUNNPKQUG_cjs = require('./chunk-UNNPKQUG.cjs');
|
|
9
|
+
var chunkRHZWOJVA_cjs = require('./chunk-RHZWOJVA.cjs');
|
|
9
10
|
var chunkJIEJCTDS_cjs = require('./chunk-JIEJCTDS.cjs');
|
|
10
11
|
var drizzleOrm = require('drizzle-orm');
|
|
11
12
|
var pgCore = require('drizzle-orm/pg-core');
|
|
@@ -35,7 +36,7 @@ var DEFAULT_POSTGRES_STATEMENT_CACHE_MAX = 256;
|
|
|
35
36
|
var STATEMENT_NAME_CACHE = /* @__PURE__ */ new Map();
|
|
36
37
|
var nextStatementId = 0;
|
|
37
38
|
function statementNameFor(sqlText, cacheMax) {
|
|
38
|
-
return
|
|
39
|
+
return chunkUJLOZYKT_cjs.getOrCreateLru(STATEMENT_NAME_CACHE, sqlText, cacheMax, () => {
|
|
39
40
|
const name = `tg_${nextStatementId}`;
|
|
40
41
|
nextStatementId += 1;
|
|
41
42
|
return name;
|
|
@@ -129,7 +130,7 @@ function createPostgresExecutionAdapter(db, options = {}) {
|
|
|
129
130
|
const cacheMax = options.preparedStatementCacheMax ?? DEFAULT_POSTGRES_STATEMENT_CACHE_MAX;
|
|
130
131
|
const pgClient = resolvePgClient(db, prepareStatements, cacheMax);
|
|
131
132
|
function compile(query) {
|
|
132
|
-
return
|
|
133
|
+
return chunkUJLOZYKT_cjs.compileQueryWithDialect(db, query, "PostgreSQL");
|
|
133
134
|
}
|
|
134
135
|
if (pgClient === void 0) {
|
|
135
136
|
return {
|
|
@@ -161,48 +162,47 @@ function createPostgresExecutionAdapter(db, options = {}) {
|
|
|
161
162
|
}
|
|
162
163
|
|
|
163
164
|
// src/backend/drizzle/postgres.ts
|
|
164
|
-
var POSTGRES_MAX_BIND_PARAMETERS = 65535;
|
|
165
165
|
var NODE_INSERT_PARAM_COUNT = 9;
|
|
166
166
|
var EDGE_INSERT_PARAM_COUNT = 12;
|
|
167
167
|
var POSTGRES_NODE_INSERT_BATCH_SIZE = Math.max(
|
|
168
168
|
1,
|
|
169
|
-
Math.floor(POSTGRES_MAX_BIND_PARAMETERS / NODE_INSERT_PARAM_COUNT)
|
|
169
|
+
Math.floor(chunkUNNPKQUG_cjs.POSTGRES_MAX_BIND_PARAMETERS / NODE_INSERT_PARAM_COUNT)
|
|
170
170
|
);
|
|
171
171
|
var POSTGRES_EDGE_INSERT_BATCH_SIZE = Math.max(
|
|
172
172
|
1,
|
|
173
|
-
Math.floor(POSTGRES_MAX_BIND_PARAMETERS / EDGE_INSERT_PARAM_COUNT)
|
|
173
|
+
Math.floor(chunkUNNPKQUG_cjs.POSTGRES_MAX_BIND_PARAMETERS / EDGE_INSERT_PARAM_COUNT)
|
|
174
174
|
);
|
|
175
175
|
var POSTGRES_GET_NODES_ID_CHUNK_SIZE = Math.max(
|
|
176
176
|
1,
|
|
177
|
-
POSTGRES_MAX_BIND_PARAMETERS - 2
|
|
177
|
+
chunkUNNPKQUG_cjs.POSTGRES_MAX_BIND_PARAMETERS - 2
|
|
178
178
|
);
|
|
179
179
|
var POSTGRES_GET_EDGES_ID_CHUNK_SIZE = Math.max(
|
|
180
180
|
1,
|
|
181
|
-
POSTGRES_MAX_BIND_PARAMETERS - 1
|
|
181
|
+
chunkUNNPKQUG_cjs.POSTGRES_MAX_BIND_PARAMETERS - 1
|
|
182
182
|
);
|
|
183
183
|
var CHECK_UNIQUE_BATCH_FIXED_PARAM_COUNT = 3;
|
|
184
184
|
var POSTGRES_CHECK_UNIQUE_BATCH_CHUNK_SIZE = Math.max(
|
|
185
185
|
1,
|
|
186
|
-
POSTGRES_MAX_BIND_PARAMETERS - CHECK_UNIQUE_BATCH_FIXED_PARAM_COUNT
|
|
186
|
+
chunkUNNPKQUG_cjs.POSTGRES_MAX_BIND_PARAMETERS - CHECK_UNIQUE_BATCH_FIXED_PARAM_COUNT
|
|
187
187
|
);
|
|
188
|
-
var toNodeRow =
|
|
189
|
-
var toEdgeRow =
|
|
190
|
-
var toUniqueRow =
|
|
191
|
-
var toSchemaVersionRow =
|
|
192
|
-
|
|
188
|
+
var toNodeRow = chunkJJRCLAUN_cjs.createNodeRowMapper(chunkJJRCLAUN_cjs.POSTGRES_ROW_MAPPER_CONFIG);
|
|
189
|
+
var toEdgeRow = chunkJJRCLAUN_cjs.createEdgeRowMapper(chunkJJRCLAUN_cjs.POSTGRES_ROW_MAPPER_CONFIG);
|
|
190
|
+
var toUniqueRow = chunkJJRCLAUN_cjs.createUniqueRowMapper(chunkJJRCLAUN_cjs.POSTGRES_ROW_MAPPER_CONFIG);
|
|
191
|
+
var toSchemaVersionRow = chunkJJRCLAUN_cjs.createSchemaVersionRowMapper(
|
|
192
|
+
chunkJJRCLAUN_cjs.POSTGRES_ROW_MAPPER_CONFIG
|
|
193
193
|
);
|
|
194
194
|
function buildPostgresCapabilities(fulltextStrategy, vectorStrategy) {
|
|
195
195
|
return {
|
|
196
|
-
...
|
|
197
|
-
...vectorStrategy === void 0 ? {} : { vector:
|
|
198
|
-
fulltext:
|
|
196
|
+
...chunkUNNPKQUG_cjs.POSTGRES_CAPABILITIES,
|
|
197
|
+
...vectorStrategy === void 0 ? {} : { vector: chunk2JXB3NYJ_cjs.buildVectorCapabilities(vectorStrategy) },
|
|
198
|
+
fulltext: chunk2JXB3NYJ_cjs.buildFulltextCapabilities(fulltextStrategy)
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
201
|
function createPostgresBackend(db, options = {}) {
|
|
202
|
-
const tables2 = options.tables ??
|
|
203
|
-
const fulltextStrategy = options.fulltext ??
|
|
204
|
-
const vectorStrategy = options.vector === false ? void 0 : options.vector ??
|
|
205
|
-
const vectorSlotLatch = vectorStrategy === void 0 ? void 0 :
|
|
202
|
+
const tables2 = options.tables ?? chunkUJLOZYKT_cjs.tables;
|
|
203
|
+
const fulltextStrategy = options.fulltext ?? chunk2JXB3NYJ_cjs.tsvectorStrategy;
|
|
204
|
+
const vectorStrategy = options.vector === false ? void 0 : options.vector ?? chunkKGC4LY5T_cjs.pgvectorStrategy;
|
|
205
|
+
const vectorSlotLatch = vectorStrategy === void 0 ? void 0 : chunkUJLOZYKT_cjs.createVectorSlotLatch();
|
|
206
206
|
const baseCapabilities = buildPostgresCapabilities(
|
|
207
207
|
fulltextStrategy,
|
|
208
208
|
vectorStrategy
|
|
@@ -221,10 +221,13 @@ function createPostgresBackend(db, options = {}) {
|
|
|
221
221
|
const tableNames = {
|
|
222
222
|
nodes: drizzleOrm.getTableName(tables2.nodes),
|
|
223
223
|
edges: drizzleOrm.getTableName(tables2.edges),
|
|
224
|
+
recordedNodes: drizzleOrm.getTableName(tables2.recordedNodes),
|
|
225
|
+
recordedEdges: drizzleOrm.getTableName(tables2.recordedEdges),
|
|
226
|
+
recordedClock: drizzleOrm.getTableName(tables2.recordedClock),
|
|
224
227
|
fulltext: tables2.fulltextTableName,
|
|
225
228
|
uniques: drizzleOrm.getTableName(tables2.uniques)
|
|
226
229
|
};
|
|
227
|
-
const
|
|
230
|
+
const coreAnalyzeStatement = drizzleOrm.sql`ANALYZE ${drizzleOrm.sql.join(
|
|
228
231
|
[
|
|
229
232
|
tableNames.nodes,
|
|
230
233
|
tableNames.edges,
|
|
@@ -233,7 +236,12 @@ function createPostgresBackend(db, options = {}) {
|
|
|
233
236
|
].map((name) => chunkHTGDWIDE_cjs.quoteIdentifier(name)),
|
|
234
237
|
drizzleOrm.sql`, `
|
|
235
238
|
)}`;
|
|
236
|
-
const
|
|
239
|
+
const recordedAnalyzeTables = [
|
|
240
|
+
tableNames.recordedNodes,
|
|
241
|
+
tableNames.recordedEdges,
|
|
242
|
+
tableNames.recordedClock
|
|
243
|
+
];
|
|
244
|
+
const operationStrategy = chunkUJLOZYKT_cjs.createPostgresOperationStrategy(
|
|
237
245
|
tables2,
|
|
238
246
|
fulltextStrategy
|
|
239
247
|
);
|
|
@@ -248,6 +256,15 @@ function createPostgresBackend(db, options = {}) {
|
|
|
248
256
|
vectorStrategy,
|
|
249
257
|
vectorSlotLatch
|
|
250
258
|
});
|
|
259
|
+
const recordedTableExists = chunkUJLOZYKT_cjs.createCachedTableExistence(
|
|
260
|
+
async (tableName) => {
|
|
261
|
+
const rows = await executionAdapter.execute(
|
|
262
|
+
operationStrategy.buildTableExists(tableName)
|
|
263
|
+
);
|
|
264
|
+
return rows[0];
|
|
265
|
+
},
|
|
266
|
+
{ cacheExisting: false }
|
|
267
|
+
);
|
|
251
268
|
function runSchemaWriteTransaction(graphId, fn) {
|
|
252
269
|
if (!capabilities.transactions) {
|
|
253
270
|
throw new chunkJIEJCTDS_cjs.ConfigurationError(
|
|
@@ -274,7 +291,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
274
291
|
}
|
|
275
292
|
const matTable = tables2.contributionMaterializations;
|
|
276
293
|
async function ensureContributionMaterializationsTableImpl() {
|
|
277
|
-
await db.execute(drizzleOrm.sql.raw(
|
|
294
|
+
await db.execute(drizzleOrm.sql.raw(chunkUJLOZYKT_cjs.generatePgCreateTableSQL(matTable)));
|
|
278
295
|
}
|
|
279
296
|
async function getContributionMaterializationRow(identity) {
|
|
280
297
|
const rows = await db.select().from(matTable).where(
|
|
@@ -287,16 +304,16 @@ function createPostgresBackend(db, options = {}) {
|
|
|
287
304
|
);
|
|
288
305
|
const row = rows[0];
|
|
289
306
|
if (row === void 0) return void 0;
|
|
290
|
-
return
|
|
307
|
+
return chunkUJLOZYKT_cjs.mapContributionMaterializationRow(
|
|
291
308
|
row,
|
|
292
|
-
|
|
309
|
+
chunkUJLOZYKT_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.decode
|
|
293
310
|
);
|
|
294
311
|
}
|
|
295
312
|
async function recordContributionMaterializationRow(params) {
|
|
296
313
|
await db.insert(matTable).values(
|
|
297
|
-
|
|
314
|
+
chunkUJLOZYKT_cjs.buildContributionInsertValues(
|
|
298
315
|
params,
|
|
299
|
-
|
|
316
|
+
chunkUJLOZYKT_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.encode
|
|
300
317
|
)
|
|
301
318
|
).onConflictDoUpdate({
|
|
302
319
|
target: [
|
|
@@ -305,13 +322,13 @@ function createPostgresBackend(db, options = {}) {
|
|
|
305
322
|
matTable.owner,
|
|
306
323
|
matTable.tableName
|
|
307
324
|
],
|
|
308
|
-
set:
|
|
325
|
+
set: chunkUJLOZYKT_cjs.buildContributionOnConflictSet(
|
|
309
326
|
matTable.materializedAt,
|
|
310
327
|
params.materializedAt
|
|
311
328
|
)
|
|
312
329
|
});
|
|
313
330
|
}
|
|
314
|
-
const contributionMaterializer =
|
|
331
|
+
const contributionMaterializer = chunkUJLOZYKT_cjs.createContributionMaterializer({
|
|
315
332
|
dialect: "postgres",
|
|
316
333
|
fulltextStrategy,
|
|
317
334
|
fulltextTableName: tables2.fulltextTableName,
|
|
@@ -331,12 +348,12 @@ function createPostgresBackend(db, options = {}) {
|
|
|
331
348
|
capabilities,
|
|
332
349
|
fulltextStrategy,
|
|
333
350
|
vectorStrategy});
|
|
334
|
-
return
|
|
351
|
+
return chunkUJLOZYKT_cjs.gateFulltext(txBackend, contributionMaterializer.assertInitialized);
|
|
335
352
|
}
|
|
336
353
|
const backend = {
|
|
337
354
|
...operations,
|
|
338
355
|
async bootstrapTables() {
|
|
339
|
-
const statements =
|
|
356
|
+
const statements = chunkUJLOZYKT_cjs.generatePostgresDDL(tables2, fulltextStrategy);
|
|
340
357
|
for (const statement of statements) {
|
|
341
358
|
await db.execute(drizzleOrm.sql.raw(statement));
|
|
342
359
|
}
|
|
@@ -346,7 +363,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
346
363
|
// uninitialized database throws `StoreNotInitializedError` loudly
|
|
347
364
|
// rather than self-healing on a read/write path (#135). Shared
|
|
348
365
|
// verbatim with the tx-scoped gate via `gateFulltextMethods`.
|
|
349
|
-
...
|
|
366
|
+
...chunkUJLOZYKT_cjs.gateFulltextMethods(
|
|
350
367
|
operations,
|
|
351
368
|
contributionMaterializer.assertInitialized
|
|
352
369
|
),
|
|
@@ -355,7 +372,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
355
372
|
},
|
|
356
373
|
async ensureIndexMaterializationsTable() {
|
|
357
374
|
await db.execute(
|
|
358
|
-
drizzleOrm.sql.raw(
|
|
375
|
+
drizzleOrm.sql.raw(chunkUJLOZYKT_cjs.generatePgCreateTableSQL(tables2.indexMaterializations))
|
|
359
376
|
);
|
|
360
377
|
},
|
|
361
378
|
async getIndexMaterialization(indexName) {
|
|
@@ -363,26 +380,26 @@ function createPostgresBackend(db, options = {}) {
|
|
|
363
380
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.indexName, indexName));
|
|
364
381
|
const row = rows[0];
|
|
365
382
|
if (row === void 0) return void 0;
|
|
366
|
-
return
|
|
383
|
+
return chunkUJLOZYKT_cjs.mapMaterializationRow(row, chunkUJLOZYKT_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.decode);
|
|
367
384
|
},
|
|
368
385
|
async getIndexMaterializations(statusKeys) {
|
|
369
386
|
if (statusKeys.length === 0) return [];
|
|
370
387
|
const t = tables2.indexMaterializations;
|
|
371
388
|
const rows = await db.select().from(t).where(drizzleOrm.inArray(t.indexName, [...statusKeys]));
|
|
372
389
|
return rows.map(
|
|
373
|
-
(row) =>
|
|
390
|
+
(row) => chunkUJLOZYKT_cjs.mapMaterializationRow(row, chunkUJLOZYKT_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.decode)
|
|
374
391
|
);
|
|
375
392
|
},
|
|
376
393
|
async recordIndexMaterialization(params) {
|
|
377
394
|
const t = tables2.indexMaterializations;
|
|
378
395
|
await db.insert(t).values(
|
|
379
|
-
|
|
396
|
+
chunkUJLOZYKT_cjs.buildMaterializationInsertValues(
|
|
380
397
|
params,
|
|
381
|
-
|
|
398
|
+
chunkUJLOZYKT_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.encode
|
|
382
399
|
)
|
|
383
400
|
).onConflictDoUpdate({
|
|
384
401
|
target: t.indexName,
|
|
385
|
-
set:
|
|
402
|
+
set: chunkUJLOZYKT_cjs.buildMaterializationOnConflictSet(
|
|
386
403
|
t.materializedAt,
|
|
387
404
|
params.materializedAt
|
|
388
405
|
)
|
|
@@ -401,37 +418,37 @@ function createPostgresBackend(db, options = {}) {
|
|
|
401
418
|
await contributionMaterializer.assertInitialized(graphId);
|
|
402
419
|
},
|
|
403
420
|
async ensureKindRemovalsTable() {
|
|
404
|
-
await db.execute(drizzleOrm.sql.raw(
|
|
421
|
+
await db.execute(drizzleOrm.sql.raw(chunkUJLOZYKT_cjs.generatePgCreateTableSQL(tables2.kindRemovals)));
|
|
405
422
|
},
|
|
406
423
|
async getPendingKindRemovals(graphId) {
|
|
407
424
|
const t = tables2.kindRemovals;
|
|
408
425
|
const rows = await db.select().from(t).where(drizzleOrm.and(drizzleOrm.eq(t.graphId, graphId), drizzleOrm.isNull(t.removedAt)));
|
|
409
426
|
return rows.map(
|
|
410
|
-
(row) =>
|
|
427
|
+
(row) => chunkUJLOZYKT_cjs.mapKindRemovalRow(row, chunkUJLOZYKT_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
411
428
|
);
|
|
412
429
|
},
|
|
413
430
|
async getAllKindRemovals(graphId) {
|
|
414
431
|
const t = tables2.kindRemovals;
|
|
415
432
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.graphId, graphId));
|
|
416
433
|
return rows.map(
|
|
417
|
-
(row) =>
|
|
434
|
+
(row) => chunkUJLOZYKT_cjs.mapKindRemovalRow(row, chunkUJLOZYKT_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
418
435
|
);
|
|
419
436
|
},
|
|
420
437
|
async recordKindRemoval(params) {
|
|
421
438
|
const t = tables2.kindRemovals;
|
|
422
439
|
await db.insert(t).values(
|
|
423
|
-
|
|
440
|
+
chunkUJLOZYKT_cjs.buildKindRemovalInsertValues(
|
|
424
441
|
params,
|
|
425
|
-
|
|
442
|
+
chunkUJLOZYKT_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.encode
|
|
426
443
|
)
|
|
427
444
|
).onConflictDoUpdate({
|
|
428
445
|
target: [t.graphId, t.kindName, t.entity, t.schemaVersion],
|
|
429
|
-
set:
|
|
446
|
+
set: chunkUJLOZYKT_cjs.buildKindRemovalOnConflictSet(t.removedAt, params.removedAt)
|
|
430
447
|
});
|
|
431
448
|
},
|
|
432
449
|
async ensureReconciliationMarkersTable() {
|
|
433
450
|
await db.execute(
|
|
434
|
-
drizzleOrm.sql.raw(
|
|
451
|
+
drizzleOrm.sql.raw(chunkUJLOZYKT_cjs.generatePgCreateTableSQL(tables2.reconciliationMarkers))
|
|
435
452
|
);
|
|
436
453
|
},
|
|
437
454
|
async ensureRuntimeContributions(graphId) {
|
|
@@ -458,7 +475,22 @@ function createPostgresBackend(db, options = {}) {
|
|
|
458
475
|
});
|
|
459
476
|
},
|
|
460
477
|
async refreshStatistics() {
|
|
461
|
-
await db.execute(
|
|
478
|
+
await db.execute(coreAnalyzeStatement);
|
|
479
|
+
const tablePresence = await Promise.all(
|
|
480
|
+
recordedAnalyzeTables.map(async (tableName) => ({
|
|
481
|
+
tableName,
|
|
482
|
+
exists: await recordedTableExists(tableName)
|
|
483
|
+
}))
|
|
484
|
+
);
|
|
485
|
+
const presentRecordedTables = tablePresence.filter((entry) => entry.exists).map((entry) => entry.tableName);
|
|
486
|
+
if (presentRecordedTables.length > 0) {
|
|
487
|
+
await db.execute(
|
|
488
|
+
drizzleOrm.sql`ANALYZE ${drizzleOrm.sql.join(
|
|
489
|
+
presentRecordedTables.map((name) => chunkHTGDWIDE_cjs.quoteIdentifier(name)),
|
|
490
|
+
drizzleOrm.sql`, `
|
|
491
|
+
)}`
|
|
492
|
+
);
|
|
493
|
+
}
|
|
462
494
|
},
|
|
463
495
|
async commitSchemaVersion(params) {
|
|
464
496
|
return runSchemaWriteTransaction(
|
|
@@ -492,7 +524,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
492
524
|
}
|
|
493
525
|
);
|
|
494
526
|
}
|
|
495
|
-
|
|
527
|
+
chunkUJLOZYKT_cjs.assertAdoptedDialect(externalTx, pgCore.PgDatabase, "postgres");
|
|
496
528
|
return bindTransactionBackend(externalTx);
|
|
497
529
|
},
|
|
498
530
|
async close() {
|
|
@@ -567,7 +599,7 @@ function createPostgresOperationBackend(options) {
|
|
|
567
599
|
await execRun(drizzleOrm.sql.raw(statement));
|
|
568
600
|
});
|
|
569
601
|
}
|
|
570
|
-
const commonBackend =
|
|
602
|
+
const commonBackend = chunkUJLOZYKT_cjs.createCommonOperationBackend({
|
|
571
603
|
batchConfig: {
|
|
572
604
|
checkUniqueBatchChunkSize: POSTGRES_CHECK_UNIQUE_BATCH_CHUNK_SIZE,
|
|
573
605
|
edgeInsertBatchSize: POSTGRES_EDGE_INSERT_BATCH_SIZE,
|
|
@@ -580,14 +612,15 @@ function createPostgresOperationBackend(options) {
|
|
|
580
612
|
execGet,
|
|
581
613
|
execRun
|
|
582
614
|
},
|
|
583
|
-
nowIso:
|
|
615
|
+
nowIso: chunkJJRCLAUN_cjs.nowIso,
|
|
584
616
|
operationStrategy,
|
|
585
617
|
rowMappers: {
|
|
586
618
|
toEdgeRow,
|
|
587
619
|
toNodeRow,
|
|
588
620
|
toSchemaVersionRow,
|
|
589
621
|
toUniqueRow
|
|
590
|
-
}
|
|
622
|
+
},
|
|
623
|
+
tableExistenceCache: { cacheExisting: false }
|
|
591
624
|
});
|
|
592
625
|
const executeCompiled = executionAdapter.executeCompiled;
|
|
593
626
|
const executeRawMethod = executeCompiled === void 0 ? {} : {
|
|
@@ -597,19 +630,19 @@ function createPostgresOperationBackend(options) {
|
|
|
597
630
|
};
|
|
598
631
|
const vectorEmbeddingMethods = vectorStrategy === void 0 ? {} : {
|
|
599
632
|
async upsertEmbedding(params) {
|
|
600
|
-
const slot =
|
|
633
|
+
const slot = chunkUJLOZYKT_cjs.vectorSlotFromParams(params);
|
|
601
634
|
await ensureVectorSlotStorage(slot);
|
|
602
|
-
const statements = vectorStrategy.buildUpsert(slot, params,
|
|
635
|
+
const statements = vectorStrategy.buildUpsert(slot, params, chunkJJRCLAUN_cjs.nowIso());
|
|
603
636
|
try {
|
|
604
637
|
for (const statement of statements) {
|
|
605
638
|
await execRun(statement);
|
|
606
639
|
}
|
|
607
640
|
} catch (error) {
|
|
608
|
-
throw
|
|
641
|
+
throw chunkUJLOZYKT_cjs.mapVectorWriteError(error, params);
|
|
609
642
|
}
|
|
610
643
|
},
|
|
611
644
|
async deleteEmbedding(params) {
|
|
612
|
-
const slot =
|
|
645
|
+
const slot = chunkUJLOZYKT_cjs.vectorSlotFromParams(params);
|
|
613
646
|
await ensureVectorSlotStorage(slot);
|
|
614
647
|
const statements = vectorStrategy.buildDelete(slot, params);
|
|
615
648
|
for (const statement of statements) {
|
|
@@ -617,16 +650,16 @@ function createPostgresOperationBackend(options) {
|
|
|
617
650
|
}
|
|
618
651
|
},
|
|
619
652
|
async vectorSearch(params) {
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
const slot =
|
|
653
|
+
chunk2JXB3NYJ_cjs.assertVectorSearchLimit(params.limit);
|
|
654
|
+
chunkKGC4LY5T_cjs.assertPgvectorEfSearch(params.efSearch);
|
|
655
|
+
const slot = chunkUJLOZYKT_cjs.vectorSlotFromParams(params);
|
|
623
656
|
await ensureVectorSlotStorage(slot);
|
|
624
657
|
const query = vectorStrategy.buildSearch(slot, params);
|
|
625
658
|
let rows;
|
|
626
659
|
try {
|
|
627
660
|
rows = await runVectorSearch(params.efSearch, query);
|
|
628
661
|
} catch (error) {
|
|
629
|
-
throw
|
|
662
|
+
throw chunkUJLOZYKT_cjs.mapVectorWriteError(error, params);
|
|
630
663
|
}
|
|
631
664
|
return rows.map((row) => ({
|
|
632
665
|
nodeId: row.node_id,
|
|
@@ -646,7 +679,7 @@ function createPostgresOperationBackend(options) {
|
|
|
646
679
|
// === Vector Index Operations ===
|
|
647
680
|
async createVectorIndex(params) {
|
|
648
681
|
if (vectorStrategy === void 0) return;
|
|
649
|
-
const slot =
|
|
682
|
+
const slot = chunkUJLOZYKT_cjs.vectorSlotFromCreateIndexParams(params);
|
|
650
683
|
await ensureVectorSlotStorage(slot);
|
|
651
684
|
const indexStatement = vectorStrategy.buildCreateIndex?.(slot, {
|
|
652
685
|
concurrent: params.concurrent === true
|
|
@@ -657,7 +690,7 @@ function createPostgresOperationBackend(options) {
|
|
|
657
690
|
},
|
|
658
691
|
// === Fulltext Operations ===
|
|
659
692
|
async upsertFulltext(params) {
|
|
660
|
-
const timestamp =
|
|
693
|
+
const timestamp = chunkJJRCLAUN_cjs.nowIso();
|
|
661
694
|
const statements = operationStrategy.buildUpsertFulltext(
|
|
662
695
|
params,
|
|
663
696
|
timestamp
|
|
@@ -674,7 +707,7 @@ function createPostgresOperationBackend(options) {
|
|
|
674
707
|
},
|
|
675
708
|
async upsertFulltextBatch(params) {
|
|
676
709
|
if (params.rows.length === 0) return;
|
|
677
|
-
const timestamp =
|
|
710
|
+
const timestamp = chunkJJRCLAUN_cjs.nowIso();
|
|
678
711
|
const statements = operationStrategy.buildUpsertFulltextBatch(
|
|
679
712
|
params,
|
|
680
713
|
timestamp
|
|
@@ -695,20 +728,20 @@ function createPostgresOperationBackend(options) {
|
|
|
695
728
|
const rows = await execAll(query);
|
|
696
729
|
return rows.map((row, index) => ({
|
|
697
730
|
nodeId: row.node_id,
|
|
698
|
-
score:
|
|
731
|
+
score: chunkJJRCLAUN_cjs.coerceNumericScore(row.score),
|
|
699
732
|
rank: index + 1,
|
|
700
733
|
...row.snippet === null ? {} : { snippet: row.snippet }
|
|
701
734
|
}));
|
|
702
735
|
},
|
|
703
736
|
async dropVectorIndex(params) {
|
|
704
737
|
if (vectorStrategy === void 0) return;
|
|
705
|
-
const slot =
|
|
738
|
+
const slot = chunkUJLOZYKT_cjs.vectorSlotFromDropIndexParams(params);
|
|
706
739
|
const dropStatement = vectorStrategy.buildDropIndex?.(slot);
|
|
707
740
|
if (dropStatement === void 0) return;
|
|
708
741
|
try {
|
|
709
742
|
await execRun(dropStatement);
|
|
710
743
|
} catch (error) {
|
|
711
|
-
if (!
|
|
744
|
+
if (!chunkRHZWOJVA_cjs.isMissingTableError(error)) throw error;
|
|
712
745
|
}
|
|
713
746
|
},
|
|
714
747
|
// === Query Execution ===
|
|
@@ -732,10 +765,10 @@ function createTransactionBackend(options) {
|
|
|
732
765
|
capabilities: options.capabilities,
|
|
733
766
|
fulltextStrategy: options.fulltextStrategy,
|
|
734
767
|
vectorStrategy: options.vectorStrategy,
|
|
735
|
-
vectorSlotLatch: options.vectorStrategy === void 0 ? void 0 :
|
|
768
|
+
vectorSlotLatch: options.vectorStrategy === void 0 ? void 0 : chunkUJLOZYKT_cjs.createVectorSlotLatch()
|
|
736
769
|
});
|
|
737
770
|
}
|
|
738
771
|
|
|
739
772
|
exports.createPostgresBackend = createPostgresBackend;
|
|
740
|
-
//# sourceMappingURL=chunk-
|
|
741
|
-
//# sourceMappingURL=chunk-
|
|
773
|
+
//# sourceMappingURL=chunk-TOTPVGOG.cjs.map
|
|
774
|
+
//# sourceMappingURL=chunk-TOTPVGOG.cjs.map
|