@nicia-ai/typegraph 0.33.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 +20 -0
- package/dist/backend/postgres/index.cjs +26 -22
- package/dist/backend/postgres/index.d.cts +5 -5
- package/dist/backend/postgres/index.d.ts +5 -5
- package/dist/backend/postgres/index.js +13 -9
- package/dist/backend/postgres/pglite.cjs +17 -13
- package/dist/backend/postgres/pglite.cjs.map +1 -1
- package/dist/backend/postgres/pglite.d.cts +2 -2
- package/dist/backend/postgres/pglite.d.ts +2 -2
- package/dist/backend/postgres/pglite.js +13 -9
- package/dist/backend/postgres/pglite.js.map +1 -1
- package/dist/backend/sqlite/index.cjs +24 -20
- package/dist/backend/sqlite/index.d.cts +6 -6
- package/dist/backend/sqlite/index.d.ts +6 -6
- package/dist/backend/sqlite/index.js +12 -8
- package/dist/backend/sqlite/libsql.cjs +18 -14
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +11 -4
- package/dist/backend/sqlite/libsql.d.ts +11 -4
- package/dist/backend/sqlite/libsql.js +14 -10
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +18 -14
- package/dist/backend/sqlite/local.cjs.map +1 -1
- package/dist/backend/sqlite/local.d.cts +2 -2
- package/dist/backend/sqlite/local.d.ts +2 -2
- package/dist/backend/sqlite/local.js +13 -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-GYVBEZAO.js → chunk-2MRAX3UE.js} +3 -18
- package/dist/chunk-2MRAX3UE.js.map +1 -0
- package/dist/{chunk-D3EWZ67S.cjs → chunk-3BRVBQQD.cjs} +999 -2675
- package/dist/chunk-3BRVBQQD.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-6NRFUHMS.js → chunk-4DIBPQNJ.js} +5 -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-NG5N7R45.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-IZ4PCL47.js → chunk-BVTWD66D.js} +4 -66
- package/dist/chunk-BVTWD66D.js.map +1 -0
- package/dist/{chunk-QBYTJSAY.js → chunk-CHXTTSC6.js} +5 -39
- package/dist/chunk-CHXTTSC6.js.map +1 -0
- package/dist/{chunk-DJYRRDHA.js → chunk-CYX2JTDG.js} +3 -3
- package/dist/{chunk-DJYRRDHA.js.map → chunk-CYX2JTDG.js.map} +1 -1
- 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-XVUJY72M.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-SST7XDY6.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-OS6KS3HV.js → chunk-LANHCOXB.js} +8 -7
- 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-OIE2UPVG.cjs → chunk-RHZWOJVA.cjs} +2 -19
- package/dist/chunk-RHZWOJVA.cjs.map +1 -0
- package/dist/{chunk-3IR2GEMJ.cjs → chunk-RRKQAKD6.cjs} +10 -9
- package/dist/chunk-RRKQAKD6.cjs.map +1 -0
- package/dist/{chunk-UPDMJEW6.js → chunk-RY2VIWAM.js} +11 -8
- 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-SPT5JMME.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-MBLXCV2Y.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-BF3ZDEUE.cjs → chunk-TOTPVGOG.cjs} +70 -69
- package/dist/chunk-TOTPVGOG.cjs.map +1 -0
- package/dist/{chunk-KY5SDVA7.cjs → chunk-UJLOZYKT.cjs} +90 -87
- package/dist/chunk-UJLOZYKT.cjs.map +1 -0
- package/dist/{chunk-I4W7MKVG.cjs → chunk-UNNPKQUG.cjs} +19 -155
- 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-PYD3UCDU.js → chunk-V3QNTB7Z.js} +19 -148
- 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-EF3Z645U.cjs → chunk-WL2SG7ZV.cjs} +6 -72
- package/dist/chunk-WL2SG7ZV.cjs.map +1 -0
- package/dist/{chunk-WLP6TKFB.js → chunk-WLRIWYHQ.js} +640 -2307
- package/dist/chunk-WLRIWYHQ.js.map +1 -0
- package/dist/{chunk-4RBAJVEC.cjs → chunk-WVC2Q2FD.cjs} +5 -5
- package/dist/{chunk-4RBAJVEC.cjs.map → chunk-WVC2Q2FD.cjs.map} +1 -1
- 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-3642VBVC.cjs → chunk-ZP5WHI4C.cjs} +106 -80
- 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-JHOBXD7O.js → chunk-ZV5N4DBG.js} +46 -20
- 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-CVnHJcar.d.ts → ddl-BrmPg61z.d.ts} +3 -3
- package/dist/{ddl-Dxt_fBHr.d.cts → ddl-j1-sH6lE.d.cts} +3 -3
- package/dist/graph-extension/index.cjs +18 -17
- package/dist/graph-extension/index.js +3 -2
- package/dist/graph-merge/index.cjs +294 -146
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +3 -3
- package/dist/graph-merge/index.d.ts +3 -3
- package/dist/graph-merge/index.js +172 -24
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/index.cjs +181 -172
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +30 -22
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +27 -25
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/indexes/index.js +9 -7
- package/dist/interchange/index.cjs +25 -16
- package/dist/interchange/index.d.cts +3 -3
- package/dist/interchange/index.d.ts +3 -3
- package/dist/interchange/index.js +12 -3
- package/dist/{manager-C0_r0ALf.d.ts → manager-BZUeN_BU.d.ts} +1 -1
- package/dist/{manager-BYl_zyZR.d.cts → manager-ms9cKdc6.d.cts} +1 -1
- package/dist/{postgres-MzBPkYzq.d.ts → postgres-BhpxGMC5.d.cts} +1 -1
- package/dist/{postgres-_9psmVGm.d.cts → postgres-CWHLwNl1.d.ts} +1 -1
- package/dist/profiler/index.cjs +3 -3
- package/dist/profiler/index.d.cts +5 -5
- package/dist/profiler/index.d.ts +5 -5
- package/dist/profiler/index.js +2 -2
- 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 +36 -32
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +4 -4
- package/dist/schema/index.d.ts +4 -4
- package/dist/schema/index.js +13 -9
- package/dist/schema/index.js.map +1 -1
- package/dist/{sqlite-gm44dShb.d.ts → sqlite-CGu5SLsw.d.ts} +1 -1
- package/dist/{sqlite-BfksSb45.d.cts → sqlite-XrDxNaa7.d.cts} +1 -1
- package/dist/{store-view-FfE5_7eo.d.ts → store-view-BlgnhEYf.d.ts} +33 -5
- package/dist/{store-view-9jQ2rPum.d.cts → store-view-D09po4H6.d.cts} +33 -5
- package/dist/{types-CdWxK-nD.d.ts → types-B1TbZJYS.d.ts} +1 -1
- package/dist/{types-DGylBhWo.d.ts → types-D1Sqeyxy.d.ts} +7 -3
- package/dist/{types-B6mhrcLv.d.cts → types-DiE1AO7p.d.cts} +1 -1
- package/dist/{types-C_UnQOQp.d.cts → types-DkNnF-7K.d.cts} +7 -3
- package/dist/{where-Bpp2ul_z.d.cts → where-DKjuofPr.d.cts} +1 -1
- package/dist/{where-BsEXraKW.d.ts → where-DrUIIWHb.d.ts} +1 -1
- package/package.json +8 -2
- package/dist/chunk-2YMGNYXY.js +0 -40
- package/dist/chunk-2YMGNYXY.js.map +0 -1
- package/dist/chunk-3642VBVC.cjs.map +0 -1
- package/dist/chunk-3IR2GEMJ.cjs.map +0 -1
- package/dist/chunk-454I6GDF.js.map +0 -1
- package/dist/chunk-6NRFUHMS.js.map +0 -1
- package/dist/chunk-6ZR4QC3O.cjs +0 -12
- package/dist/chunk-73KASJGO.cjs.map +0 -1
- package/dist/chunk-BF3ZDEUE.cjs.map +0 -1
- package/dist/chunk-C4C4Q7A6.js.map +0 -1
- package/dist/chunk-CEF2QOTO.js.map +0 -1
- package/dist/chunk-CFNT3ITG.cjs.map +0 -1
- package/dist/chunk-D3EWZ67S.cjs.map +0 -1
- package/dist/chunk-EF3Z645U.cjs.map +0 -1
- package/dist/chunk-FDN43KXV.cjs.map +0 -1
- package/dist/chunk-GYVBEZAO.js.map +0 -1
- package/dist/chunk-I4W7MKVG.cjs.map +0 -1
- package/dist/chunk-IZ4PCL47.js.map +0 -1
- package/dist/chunk-JHOBXD7O.js.map +0 -1
- package/dist/chunk-KTIEB7VH.cjs.map +0 -1
- package/dist/chunk-KY5SDVA7.cjs.map +0 -1
- package/dist/chunk-LM2IC4ZJ.cjs.map +0 -1
- package/dist/chunk-MBLXCV2Y.cjs.map +0 -1
- package/dist/chunk-NG5N7R45.cjs.map +0 -1
- package/dist/chunk-OIE2UPVG.cjs.map +0 -1
- package/dist/chunk-OS6KS3HV.js.map +0 -1
- package/dist/chunk-PRMKPFN5.js.map +0 -1
- package/dist/chunk-PYD3UCDU.js.map +0 -1
- package/dist/chunk-QBYTJSAY.js.map +0 -1
- package/dist/chunk-SPT5JMME.js.map +0 -1
- package/dist/chunk-SST7XDY6.cjs.map +0 -1
- package/dist/chunk-UPDMJEW6.js.map +0 -1
- package/dist/chunk-WLP6TKFB.js.map +0 -1
- package/dist/chunk-XKNAK27R.js.map +0 -1
- package/dist/chunk-XVUJY72M.js.map +0 -1
- package/dist/chunk-YCV72E6L.js.map +0 -1
- package/dist/chunk-YW7GHMF4.cjs.map +0 -1
- package/dist/chunk-ZFWNO3GE.cjs.map +0 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
3
|
+
var chunkUJLOZYKT_cjs = require('./chunk-UJLOZYKT.cjs');
|
|
4
|
+
var chunkWVC2Q2FD_cjs = require('./chunk-WVC2Q2FD.cjs');
|
|
5
|
+
var chunkJJRCLAUN_cjs = require('./chunk-JJRCLAUN.cjs');
|
|
6
|
+
var chunk2JXB3NYJ_cjs = require('./chunk-2JXB3NYJ.cjs');
|
|
7
|
+
var chunkUNNPKQUG_cjs = require('./chunk-UNNPKQUG.cjs');
|
|
8
|
+
var chunkRHZWOJVA_cjs = require('./chunk-RHZWOJVA.cjs');
|
|
8
9
|
var chunkJIEJCTDS_cjs = require('./chunk-JIEJCTDS.cjs');
|
|
9
10
|
var drizzleOrm = require('drizzle-orm');
|
|
10
11
|
var sqliteCore = require('drizzle-orm/sqlite-core');
|
|
@@ -72,7 +73,7 @@ function resolveSqliteClient(db) {
|
|
|
72
73
|
return sqliteClient;
|
|
73
74
|
}
|
|
74
75
|
function getOrCreatePreparedStatement(cache, sqliteClient, sqlText, cacheMax) {
|
|
75
|
-
return
|
|
76
|
+
return chunkUJLOZYKT_cjs.getOrCreateLru(
|
|
76
77
|
cache,
|
|
77
78
|
sqlText,
|
|
78
79
|
cacheMax,
|
|
@@ -108,7 +109,7 @@ function createSqliteExecutionAdapter(db, statementCacheMaxOrOptions = {}) {
|
|
|
108
109
|
supportsCompiledExecution: sqliteClient !== void 0,
|
|
109
110
|
transactionMode
|
|
110
111
|
};
|
|
111
|
-
const compile = (query) =>
|
|
112
|
+
const compile = (query) => chunkUJLOZYKT_cjs.compileQueryWithDialect(db, query, "SQLite");
|
|
112
113
|
if (sqliteClient !== void 0) {
|
|
113
114
|
let executeCompiled2 = function(compiledQuery) {
|
|
114
115
|
const preparedStatement = getOrCreatePreparedStatement(
|
|
@@ -159,30 +160,30 @@ var NODE_INSERT_PARAM_COUNT = 9;
|
|
|
159
160
|
var EDGE_INSERT_PARAM_COUNT = 12;
|
|
160
161
|
var SQLITE_NODE_INSERT_BATCH_SIZE = Math.max(
|
|
161
162
|
1,
|
|
162
|
-
Math.floor(
|
|
163
|
+
Math.floor(chunkUNNPKQUG_cjs.SQLITE_MAX_BIND_PARAMETERS / NODE_INSERT_PARAM_COUNT)
|
|
163
164
|
);
|
|
164
165
|
var SQLITE_EDGE_INSERT_BATCH_SIZE = Math.max(
|
|
165
166
|
1,
|
|
166
|
-
Math.floor(
|
|
167
|
+
Math.floor(chunkUNNPKQUG_cjs.SQLITE_MAX_BIND_PARAMETERS / EDGE_INSERT_PARAM_COUNT)
|
|
167
168
|
);
|
|
168
169
|
var SQLITE_GET_NODES_ID_CHUNK_SIZE = Math.max(
|
|
169
170
|
1,
|
|
170
|
-
|
|
171
|
+
chunkUNNPKQUG_cjs.SQLITE_MAX_BIND_PARAMETERS - 2
|
|
171
172
|
);
|
|
172
173
|
var SQLITE_GET_EDGES_ID_CHUNK_SIZE = Math.max(
|
|
173
174
|
1,
|
|
174
|
-
|
|
175
|
+
chunkUNNPKQUG_cjs.SQLITE_MAX_BIND_PARAMETERS - 1
|
|
175
176
|
);
|
|
176
177
|
var CHECK_UNIQUE_BATCH_FIXED_PARAM_COUNT = 3;
|
|
177
178
|
var SQLITE_CHECK_UNIQUE_BATCH_CHUNK_SIZE = Math.max(
|
|
178
179
|
1,
|
|
179
|
-
|
|
180
|
+
chunkUNNPKQUG_cjs.SQLITE_MAX_BIND_PARAMETERS - CHECK_UNIQUE_BATCH_FIXED_PARAM_COUNT
|
|
180
181
|
);
|
|
181
|
-
var toNodeRow =
|
|
182
|
-
var toEdgeRow =
|
|
183
|
-
var toUniqueRow =
|
|
184
|
-
var toSchemaVersionRow =
|
|
185
|
-
|
|
182
|
+
var toNodeRow = chunkJJRCLAUN_cjs.createNodeRowMapper(chunkJJRCLAUN_cjs.SQLITE_ROW_MAPPER_CONFIG);
|
|
183
|
+
var toEdgeRow = chunkJJRCLAUN_cjs.createEdgeRowMapper(chunkJJRCLAUN_cjs.SQLITE_ROW_MAPPER_CONFIG);
|
|
184
|
+
var toUniqueRow = chunkJJRCLAUN_cjs.createUniqueRowMapper(chunkJJRCLAUN_cjs.SQLITE_ROW_MAPPER_CONFIG);
|
|
185
|
+
var toSchemaVersionRow = chunkJJRCLAUN_cjs.createSchemaVersionRowMapper(
|
|
186
|
+
chunkJJRCLAUN_cjs.SQLITE_ROW_MAPPER_CONFIG
|
|
186
187
|
);
|
|
187
188
|
var PENDING_FOREVER = new Promise(noop);
|
|
188
189
|
function pendingForever() {
|
|
@@ -190,9 +191,30 @@ function pendingForever() {
|
|
|
190
191
|
}
|
|
191
192
|
function noop() {
|
|
192
193
|
}
|
|
194
|
+
var queueTaskContext;
|
|
195
|
+
async function loadQueueTaskContext() {
|
|
196
|
+
try {
|
|
197
|
+
const asyncHooks = await import('async_hooks');
|
|
198
|
+
queueTaskContext = new asyncHooks.AsyncLocalStorage();
|
|
199
|
+
} catch {
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
void loadQueueTaskContext();
|
|
203
|
+
function rejectReentrantQueueSubmission() {
|
|
204
|
+
return Promise.reject(
|
|
205
|
+
new chunkJIEJCTDS_cjs.ConfigurationError(
|
|
206
|
+
"This operation was awaited from inside a transaction running on the same SQLite backend and would deadlock: the transaction holds the backend's serialized execution slot until it completes, so the operation could never run.",
|
|
207
|
+
{ backend: "sqlite", capability: "concurrentRootAccess" },
|
|
208
|
+
{
|
|
209
|
+
suggestion: "Inside a store.transaction callback, use the transaction-scoped context (tx.nodes / tx.edges / tx.backend) instead of the root store or backend, or move the operation outside the transaction."
|
|
210
|
+
}
|
|
211
|
+
)
|
|
212
|
+
);
|
|
213
|
+
}
|
|
193
214
|
function createSerializedExecutionQueue() {
|
|
194
215
|
let tail = Promise.resolve();
|
|
195
216
|
let disposed = false;
|
|
217
|
+
const taskMarker = {};
|
|
196
218
|
function isDisposed() {
|
|
197
219
|
return disposed;
|
|
198
220
|
}
|
|
@@ -202,10 +224,14 @@ function createSerializedExecutionQueue() {
|
|
|
202
224
|
},
|
|
203
225
|
runExclusive(task) {
|
|
204
226
|
if (isDisposed()) return Promise.reject(new chunkJIEJCTDS_cjs.BackendDisposedError());
|
|
227
|
+
if (queueTaskContext?.getStore() === taskMarker) {
|
|
228
|
+
return rejectReentrantQueueSubmission();
|
|
229
|
+
}
|
|
205
230
|
const runTask = async () => {
|
|
206
231
|
if (isDisposed()) return pendingForever();
|
|
207
232
|
try {
|
|
208
|
-
|
|
233
|
+
const context = queueTaskContext;
|
|
234
|
+
return context === void 0 ? await task() : await context.run(taskMarker, () => task());
|
|
209
235
|
} catch (error) {
|
|
210
236
|
if (isDisposed()) return pendingForever();
|
|
211
237
|
throw error;
|
|
@@ -232,11 +258,11 @@ function throwSqliteTransactionsDisabled(message) {
|
|
|
232
258
|
});
|
|
233
259
|
}
|
|
234
260
|
function buildSqliteCapabilities(options) {
|
|
235
|
-
const base = options.transactionMode === "none" ? { ...
|
|
261
|
+
const base = options.transactionMode === "none" ? { ...chunkUNNPKQUG_cjs.SQLITE_CAPABILITIES, transactions: false } : chunkUNNPKQUG_cjs.SQLITE_CAPABILITIES;
|
|
236
262
|
return {
|
|
237
263
|
...base,
|
|
238
|
-
fulltext:
|
|
239
|
-
...options.vectorStrategy === void 0 ? {} : { vector:
|
|
264
|
+
fulltext: chunk2JXB3NYJ_cjs.buildFulltextCapabilities(options.fulltextStrategy),
|
|
265
|
+
...options.vectorStrategy === void 0 ? {} : { vector: chunk2JXB3NYJ_cjs.buildVectorCapabilities(options.vectorStrategy) }
|
|
240
266
|
};
|
|
241
267
|
}
|
|
242
268
|
function createSqliteOperationBackend(options) {
|
|
@@ -267,7 +293,7 @@ function createSqliteOperationBackend(options) {
|
|
|
267
293
|
await db.run(query);
|
|
268
294
|
});
|
|
269
295
|
}
|
|
270
|
-
const commonBackend =
|
|
296
|
+
const commonBackend = chunkUJLOZYKT_cjs.createCommonOperationBackend({
|
|
271
297
|
batchConfig: {
|
|
272
298
|
checkUniqueBatchChunkSize: SQLITE_CHECK_UNIQUE_BATCH_CHUNK_SIZE,
|
|
273
299
|
edgeInsertBatchSize: SQLITE_EDGE_INSERT_BATCH_SIZE,
|
|
@@ -280,7 +306,7 @@ function createSqliteOperationBackend(options) {
|
|
|
280
306
|
execGet,
|
|
281
307
|
execRun
|
|
282
308
|
},
|
|
283
|
-
nowIso:
|
|
309
|
+
nowIso: chunkJJRCLAUN_cjs.nowIso,
|
|
284
310
|
operationStrategy,
|
|
285
311
|
rowMappers: {
|
|
286
312
|
toEdgeRow,
|
|
@@ -306,19 +332,19 @@ function createSqliteOperationBackend(options) {
|
|
|
306
332
|
}
|
|
307
333
|
const vectorEmbeddingMethods = vectorStrategy === void 0 ? {} : {
|
|
308
334
|
async upsertEmbedding(params) {
|
|
309
|
-
const slot =
|
|
335
|
+
const slot = chunkUJLOZYKT_cjs.vectorSlotFromParams(params);
|
|
310
336
|
await ensureVectorSlotStorage(slot);
|
|
311
|
-
const statements = vectorStrategy.buildUpsert(slot, params,
|
|
337
|
+
const statements = vectorStrategy.buildUpsert(slot, params, chunkJJRCLAUN_cjs.nowIso());
|
|
312
338
|
try {
|
|
313
339
|
for (const statement of statements) {
|
|
314
340
|
await execRun(statement);
|
|
315
341
|
}
|
|
316
342
|
} catch (error) {
|
|
317
|
-
throw
|
|
343
|
+
throw chunkUJLOZYKT_cjs.mapVectorWriteError(error, params);
|
|
318
344
|
}
|
|
319
345
|
},
|
|
320
346
|
async deleteEmbedding(params) {
|
|
321
|
-
const slot =
|
|
347
|
+
const slot = chunkUJLOZYKT_cjs.vectorSlotFromParams(params);
|
|
322
348
|
await ensureVectorSlotStorage(slot);
|
|
323
349
|
const statements = vectorStrategy.buildDelete(slot, params);
|
|
324
350
|
for (const statement of statements) {
|
|
@@ -326,15 +352,15 @@ function createSqliteOperationBackend(options) {
|
|
|
326
352
|
}
|
|
327
353
|
},
|
|
328
354
|
async vectorSearch(params) {
|
|
329
|
-
|
|
330
|
-
const slot =
|
|
355
|
+
chunk2JXB3NYJ_cjs.assertVectorSearchLimit(params.limit);
|
|
356
|
+
const slot = chunkUJLOZYKT_cjs.vectorSlotFromParams(params);
|
|
331
357
|
await ensureVectorSlotStorage(slot);
|
|
332
358
|
const query = vectorStrategy.buildSearch(slot, params);
|
|
333
359
|
let rows;
|
|
334
360
|
try {
|
|
335
361
|
rows = await execAll(query);
|
|
336
362
|
} catch (error) {
|
|
337
|
-
throw
|
|
363
|
+
throw chunkUJLOZYKT_cjs.mapVectorWriteError(error, params);
|
|
338
364
|
}
|
|
339
365
|
return rows.map((row) => ({
|
|
340
366
|
nodeId: row.node_id,
|
|
@@ -353,7 +379,7 @@ function createSqliteOperationBackend(options) {
|
|
|
353
379
|
...vectorStrategy === void 0 ? {} : { vectorStrategy },
|
|
354
380
|
async createVectorIndex(params) {
|
|
355
381
|
if (vectorStrategy === void 0) return;
|
|
356
|
-
const slot =
|
|
382
|
+
const slot = chunkUJLOZYKT_cjs.vectorSlotFromCreateIndexParams(params);
|
|
357
383
|
await ensureVectorSlotStorage(slot);
|
|
358
384
|
const indexStatement = vectorStrategy.buildCreateIndex?.(slot);
|
|
359
385
|
if (indexStatement !== void 0) {
|
|
@@ -362,18 +388,18 @@ function createSqliteOperationBackend(options) {
|
|
|
362
388
|
},
|
|
363
389
|
async dropVectorIndex(params) {
|
|
364
390
|
if (vectorStrategy === void 0) return;
|
|
365
|
-
const slot =
|
|
391
|
+
const slot = chunkUJLOZYKT_cjs.vectorSlotFromDropIndexParams(params);
|
|
366
392
|
const dropStatement = vectorStrategy.buildDropIndex?.(slot);
|
|
367
393
|
if (dropStatement === void 0) return;
|
|
368
394
|
try {
|
|
369
395
|
await execRun(dropStatement);
|
|
370
396
|
} catch (error) {
|
|
371
|
-
if (!
|
|
397
|
+
if (!chunkRHZWOJVA_cjs.isMissingTableError(error)) throw error;
|
|
372
398
|
}
|
|
373
399
|
},
|
|
374
400
|
// === Fulltext Operations ===
|
|
375
401
|
async upsertFulltext(params) {
|
|
376
|
-
const timestamp =
|
|
402
|
+
const timestamp = chunkJJRCLAUN_cjs.nowIso();
|
|
377
403
|
const statements = operationStrategy.buildUpsertFulltext(
|
|
378
404
|
params,
|
|
379
405
|
timestamp
|
|
@@ -390,7 +416,7 @@ function createSqliteOperationBackend(options) {
|
|
|
390
416
|
},
|
|
391
417
|
async upsertFulltextBatch(params) {
|
|
392
418
|
if (params.rows.length === 0) return;
|
|
393
|
-
const timestamp =
|
|
419
|
+
const timestamp = chunkJJRCLAUN_cjs.nowIso();
|
|
394
420
|
const statements = operationStrategy.buildUpsertFulltextBatch(
|
|
395
421
|
params,
|
|
396
422
|
timestamp
|
|
@@ -411,7 +437,7 @@ function createSqliteOperationBackend(options) {
|
|
|
411
437
|
const rows = await execAll(query);
|
|
412
438
|
return rows.map((row, index) => ({
|
|
413
439
|
nodeId: row.node_id,
|
|
414
|
-
score:
|
|
440
|
+
score: chunkJJRCLAUN_cjs.coerceNumericScore(row.score),
|
|
415
441
|
rank: index + 1,
|
|
416
442
|
...row.snippet === null ? {} : { snippet: row.snippet }
|
|
417
443
|
}));
|
|
@@ -430,13 +456,13 @@ function createSqliteOperationBackend(options) {
|
|
|
430
456
|
return operationBackend;
|
|
431
457
|
}
|
|
432
458
|
function createSqliteBackend(db, options = {}) {
|
|
433
|
-
const tables2 = options.tables ??
|
|
434
|
-
const fulltextStrategy = options.fulltext ??
|
|
459
|
+
const tables2 = options.tables ?? chunkWVC2Q2FD_cjs.tables;
|
|
460
|
+
const fulltextStrategy = options.fulltext ?? chunk2JXB3NYJ_cjs.fts5Strategy;
|
|
435
461
|
const profileHints = options.executionProfile ?? {};
|
|
436
462
|
const executionAdapter = createSqliteExecutionAdapter(db, { profileHints });
|
|
437
463
|
const { isSync, transactionMode } = executionAdapter.profile;
|
|
438
464
|
const vectorStrategy = options.vector;
|
|
439
|
-
const vectorSlotLatch = vectorStrategy === void 0 ? void 0 :
|
|
465
|
+
const vectorSlotLatch = vectorStrategy === void 0 ? void 0 : chunkUJLOZYKT_cjs.createVectorSlotLatch();
|
|
440
466
|
const capabilities = {
|
|
441
467
|
...buildSqliteCapabilities({
|
|
442
468
|
fulltextStrategy,
|
|
@@ -454,11 +480,11 @@ function createSqliteBackend(db, options = {}) {
|
|
|
454
480
|
fulltext: tables2.fulltextTableName,
|
|
455
481
|
uniques: drizzleOrm.getTableName(tables2.uniques)
|
|
456
482
|
};
|
|
457
|
-
const operationStrategy =
|
|
483
|
+
const operationStrategy = chunkUJLOZYKT_cjs.createSqliteOperationStrategy(
|
|
458
484
|
tables2,
|
|
459
485
|
fulltextStrategy
|
|
460
486
|
);
|
|
461
|
-
const serializedQueue =
|
|
487
|
+
const serializedQueue = transactionMode === "none" ? void 0 : createSerializedExecutionQueue();
|
|
462
488
|
const operations = createSqliteOperationBackend({
|
|
463
489
|
capabilities,
|
|
464
490
|
db,
|
|
@@ -496,17 +522,17 @@ function createSqliteBackend(db, options = {}) {
|
|
|
496
522
|
db,
|
|
497
523
|
executionAdapter,
|
|
498
524
|
operationStrategy,
|
|
499
|
-
profileHints: { isSync
|
|
525
|
+
profileHints: { isSync },
|
|
500
526
|
tableNames,
|
|
501
527
|
fulltextStrategy,
|
|
502
528
|
vectorStrategy});
|
|
503
|
-
db.run(drizzleOrm.sql`BEGIN IMMEDIATE`);
|
|
529
|
+
await db.run(drizzleOrm.sql`BEGIN IMMEDIATE`);
|
|
504
530
|
try {
|
|
505
531
|
const result = await fn(txBackend);
|
|
506
|
-
db.run(drizzleOrm.sql`COMMIT`);
|
|
532
|
+
await db.run(drizzleOrm.sql`COMMIT`);
|
|
507
533
|
return result;
|
|
508
534
|
} catch (error) {
|
|
509
|
-
db.run(drizzleOrm.sql`ROLLBACK`);
|
|
535
|
+
await db.run(drizzleOrm.sql`ROLLBACK`);
|
|
510
536
|
throw error;
|
|
511
537
|
}
|
|
512
538
|
});
|
|
@@ -544,7 +570,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
544
570
|
}
|
|
545
571
|
const matTable = tables2.contributionMaterializations;
|
|
546
572
|
async function ensureContributionMaterializationsTableImpl() {
|
|
547
|
-
await db.run(drizzleOrm.sql.raw(
|
|
573
|
+
await db.run(drizzleOrm.sql.raw(chunkUJLOZYKT_cjs.generateSqliteCreateTableSQL(matTable)));
|
|
548
574
|
}
|
|
549
575
|
async function getContributionMaterializationRow(identity) {
|
|
550
576
|
const rows = await db.select().from(matTable).where(
|
|
@@ -557,16 +583,16 @@ function createSqliteBackend(db, options = {}) {
|
|
|
557
583
|
);
|
|
558
584
|
const row = rows[0];
|
|
559
585
|
if (row === void 0) return void 0;
|
|
560
|
-
return
|
|
586
|
+
return chunkUJLOZYKT_cjs.mapContributionMaterializationRow(
|
|
561
587
|
row,
|
|
562
|
-
|
|
588
|
+
chunkUJLOZYKT_cjs.SQLITE_CONTRIBUTION_MAT_TIMESTAMPS.decode
|
|
563
589
|
);
|
|
564
590
|
}
|
|
565
591
|
async function recordContributionMaterializationRow(params) {
|
|
566
592
|
await db.insert(matTable).values(
|
|
567
|
-
|
|
593
|
+
chunkUJLOZYKT_cjs.buildContributionInsertValues(
|
|
568
594
|
params,
|
|
569
|
-
|
|
595
|
+
chunkUJLOZYKT_cjs.SQLITE_CONTRIBUTION_MAT_TIMESTAMPS.encode
|
|
570
596
|
)
|
|
571
597
|
).onConflictDoUpdate({
|
|
572
598
|
target: [
|
|
@@ -575,13 +601,13 @@ function createSqliteBackend(db, options = {}) {
|
|
|
575
601
|
matTable.owner,
|
|
576
602
|
matTable.tableName
|
|
577
603
|
],
|
|
578
|
-
set:
|
|
604
|
+
set: chunkUJLOZYKT_cjs.buildContributionOnConflictSet(
|
|
579
605
|
matTable.materializedAt,
|
|
580
606
|
params.materializedAt
|
|
581
607
|
)
|
|
582
608
|
});
|
|
583
609
|
}
|
|
584
|
-
const contributionMaterializer =
|
|
610
|
+
const contributionMaterializer = chunkUJLOZYKT_cjs.createContributionMaterializer({
|
|
585
611
|
dialect: "sqlite",
|
|
586
612
|
fulltextStrategy,
|
|
587
613
|
fulltextTableName: tables2.fulltextTableName,
|
|
@@ -601,12 +627,12 @@ function createSqliteBackend(db, options = {}) {
|
|
|
601
627
|
tableNames,
|
|
602
628
|
fulltextStrategy,
|
|
603
629
|
vectorStrategy});
|
|
604
|
-
return
|
|
630
|
+
return chunkUJLOZYKT_cjs.gateFulltext(txBackend, contributionMaterializer.assertInitialized);
|
|
605
631
|
}
|
|
606
632
|
const backend = {
|
|
607
633
|
...operations,
|
|
608
634
|
async bootstrapTables() {
|
|
609
|
-
const statements =
|
|
635
|
+
const statements = chunkUJLOZYKT_cjs.generateSqliteDDL(tables2, fulltextStrategy);
|
|
610
636
|
for (const statement of statements) {
|
|
611
637
|
await db.run(drizzleOrm.sql.raw(statement));
|
|
612
638
|
}
|
|
@@ -616,7 +642,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
616
642
|
// uninitialized database throws `StoreNotInitializedError` rather
|
|
617
643
|
// than self-healing (#135). Shared verbatim with the tx-scoped gate
|
|
618
644
|
// via `gateFulltextMethods`.
|
|
619
|
-
...
|
|
645
|
+
...chunkUJLOZYKT_cjs.gateFulltextMethods(
|
|
620
646
|
operations,
|
|
621
647
|
contributionMaterializer.assertInitialized
|
|
622
648
|
),
|
|
@@ -625,7 +651,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
625
651
|
},
|
|
626
652
|
async ensureIndexMaterializationsTable() {
|
|
627
653
|
await db.run(
|
|
628
|
-
drizzleOrm.sql.raw(
|
|
654
|
+
drizzleOrm.sql.raw(chunkUJLOZYKT_cjs.generateSqliteCreateTableSQL(tables2.indexMaterializations))
|
|
629
655
|
);
|
|
630
656
|
},
|
|
631
657
|
async getIndexMaterialization(indexName) {
|
|
@@ -633,26 +659,26 @@ function createSqliteBackend(db, options = {}) {
|
|
|
633
659
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.indexName, indexName));
|
|
634
660
|
const row = rows[0];
|
|
635
661
|
if (row === void 0) return void 0;
|
|
636
|
-
return
|
|
662
|
+
return chunkUJLOZYKT_cjs.mapMaterializationRow(row, chunkUJLOZYKT_cjs.SQLITE_INDEX_MAT_TIMESTAMPS.decode);
|
|
637
663
|
},
|
|
638
664
|
async getIndexMaterializations(statusKeys) {
|
|
639
665
|
if (statusKeys.length === 0) return [];
|
|
640
666
|
const t = tables2.indexMaterializations;
|
|
641
667
|
const rows = await db.select().from(t).where(drizzleOrm.inArray(t.indexName, [...statusKeys]));
|
|
642
668
|
return rows.map(
|
|
643
|
-
(row) =>
|
|
669
|
+
(row) => chunkUJLOZYKT_cjs.mapMaterializationRow(row, chunkUJLOZYKT_cjs.SQLITE_INDEX_MAT_TIMESTAMPS.decode)
|
|
644
670
|
);
|
|
645
671
|
},
|
|
646
672
|
async recordIndexMaterialization(params) {
|
|
647
673
|
const t = tables2.indexMaterializations;
|
|
648
674
|
await db.insert(t).values(
|
|
649
|
-
|
|
675
|
+
chunkUJLOZYKT_cjs.buildMaterializationInsertValues(
|
|
650
676
|
params,
|
|
651
|
-
|
|
677
|
+
chunkUJLOZYKT_cjs.SQLITE_INDEX_MAT_TIMESTAMPS.encode
|
|
652
678
|
)
|
|
653
679
|
).onConflictDoUpdate({
|
|
654
680
|
target: t.indexName,
|
|
655
|
-
set:
|
|
681
|
+
set: chunkUJLOZYKT_cjs.buildMaterializationOnConflictSet(
|
|
656
682
|
t.materializedAt,
|
|
657
683
|
params.materializedAt
|
|
658
684
|
)
|
|
@@ -671,37 +697,37 @@ function createSqliteBackend(db, options = {}) {
|
|
|
671
697
|
await contributionMaterializer.assertInitialized(graphId);
|
|
672
698
|
},
|
|
673
699
|
async ensureKindRemovalsTable() {
|
|
674
|
-
await db.run(drizzleOrm.sql.raw(
|
|
700
|
+
await db.run(drizzleOrm.sql.raw(chunkUJLOZYKT_cjs.generateSqliteCreateTableSQL(tables2.kindRemovals)));
|
|
675
701
|
},
|
|
676
702
|
async getPendingKindRemovals(graphId) {
|
|
677
703
|
const t = tables2.kindRemovals;
|
|
678
704
|
const rows = await db.select().from(t).where(drizzleOrm.and(drizzleOrm.eq(t.graphId, graphId), drizzleOrm.isNull(t.removedAt)));
|
|
679
705
|
return rows.map(
|
|
680
|
-
(row) =>
|
|
706
|
+
(row) => chunkUJLOZYKT_cjs.mapKindRemovalRow(row, chunkUJLOZYKT_cjs.SQLITE_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
681
707
|
);
|
|
682
708
|
},
|
|
683
709
|
async getAllKindRemovals(graphId) {
|
|
684
710
|
const t = tables2.kindRemovals;
|
|
685
711
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.graphId, graphId));
|
|
686
712
|
return rows.map(
|
|
687
|
-
(row) =>
|
|
713
|
+
(row) => chunkUJLOZYKT_cjs.mapKindRemovalRow(row, chunkUJLOZYKT_cjs.SQLITE_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
688
714
|
);
|
|
689
715
|
},
|
|
690
716
|
async recordKindRemoval(params) {
|
|
691
717
|
const t = tables2.kindRemovals;
|
|
692
718
|
await db.insert(t).values(
|
|
693
|
-
|
|
719
|
+
chunkUJLOZYKT_cjs.buildKindRemovalInsertValues(
|
|
694
720
|
params,
|
|
695
|
-
|
|
721
|
+
chunkUJLOZYKT_cjs.SQLITE_KIND_REMOVAL_TIMESTAMPS.encode
|
|
696
722
|
)
|
|
697
723
|
).onConflictDoUpdate({
|
|
698
724
|
target: [t.graphId, t.kindName, t.entity, t.schemaVersion],
|
|
699
|
-
set:
|
|
725
|
+
set: chunkUJLOZYKT_cjs.buildKindRemovalOnConflictSet(t.removedAt, params.removedAt)
|
|
700
726
|
});
|
|
701
727
|
},
|
|
702
728
|
async ensureReconciliationMarkersTable() {
|
|
703
729
|
await db.run(
|
|
704
|
-
drizzleOrm.sql.raw(
|
|
730
|
+
drizzleOrm.sql.raw(chunkUJLOZYKT_cjs.generateSqliteCreateTableSQL(tables2.reconciliationMarkers))
|
|
705
731
|
);
|
|
706
732
|
},
|
|
707
733
|
async ensureRuntimeContributions(graphId) {
|
|
@@ -753,23 +779,23 @@ function createSqliteBackend(db, options = {}) {
|
|
|
753
779
|
db,
|
|
754
780
|
executionAdapter,
|
|
755
781
|
operationStrategy,
|
|
756
|
-
profileHints: { isSync
|
|
782
|
+
profileHints: { isSync },
|
|
757
783
|
tableNames,
|
|
758
784
|
fulltextStrategy,
|
|
759
785
|
vectorStrategy});
|
|
760
|
-
db.run(drizzleOrm.sql`BEGIN`);
|
|
786
|
+
await db.run(drizzleOrm.sql`BEGIN IMMEDIATE`);
|
|
761
787
|
try {
|
|
762
788
|
const result = await fn(
|
|
763
|
-
|
|
789
|
+
chunkUJLOZYKT_cjs.gateFulltext(
|
|
764
790
|
txBackend,
|
|
765
791
|
contributionMaterializer.assertInitialized
|
|
766
792
|
),
|
|
767
793
|
db
|
|
768
794
|
);
|
|
769
|
-
db.run(drizzleOrm.sql`COMMIT`);
|
|
795
|
+
await db.run(drizzleOrm.sql`COMMIT`);
|
|
770
796
|
return result;
|
|
771
797
|
} catch (error) {
|
|
772
|
-
db.run(drizzleOrm.sql`ROLLBACK`);
|
|
798
|
+
await db.run(drizzleOrm.sql`ROLLBACK`);
|
|
773
799
|
throw error;
|
|
774
800
|
}
|
|
775
801
|
});
|
|
@@ -781,9 +807,9 @@ function createSqliteBackend(db, options = {}) {
|
|
|
781
807
|
}
|
|
782
808
|
return runWithSerializedQueue(
|
|
783
809
|
serializedQueue,
|
|
784
|
-
async () => db.transaction(
|
|
785
|
-
|
|
786
|
-
)
|
|
810
|
+
async () => db.transaction(async (tx) => fn(bindTransactionBackend(tx), tx), {
|
|
811
|
+
behavior: "immediate"
|
|
812
|
+
})
|
|
787
813
|
);
|
|
788
814
|
},
|
|
789
815
|
adoptTransaction(externalTx) {
|
|
@@ -792,7 +818,7 @@ function createSqliteBackend(db, options = {}) {
|
|
|
792
818
|
"Cross-store atomicity is unavailable on this SQLite backend: transactions are disabled (transactionMode: 'none'). Adopting an external transaction here would let the caller's relational write commit with no way to roll back the graph write. Configure a driver that supports transactions (better-sqlite3, libsql, bun:sqlite)."
|
|
793
819
|
);
|
|
794
820
|
}
|
|
795
|
-
|
|
821
|
+
chunkUJLOZYKT_cjs.assertAdoptedDialect(
|
|
796
822
|
externalTx,
|
|
797
823
|
sqliteCore.BaseSQLiteDatabase,
|
|
798
824
|
"sqlite"
|
|
@@ -818,10 +844,10 @@ function createTransactionBackend(options) {
|
|
|
818
844
|
tableNames: options.tableNames,
|
|
819
845
|
fulltextStrategy: options.fulltextStrategy,
|
|
820
846
|
vectorStrategy: options.vectorStrategy,
|
|
821
|
-
...options.vectorStrategy === void 0 ? {} : { vectorSlotLatch:
|
|
847
|
+
...options.vectorStrategy === void 0 ? {} : { vectorSlotLatch: chunkUJLOZYKT_cjs.createVectorSlotLatch() }
|
|
822
848
|
});
|
|
823
849
|
}
|
|
824
850
|
|
|
825
851
|
exports.createSqliteBackend = createSqliteBackend;
|
|
826
|
-
//# sourceMappingURL=chunk-
|
|
827
|
-
//# sourceMappingURL=chunk-
|
|
852
|
+
//# sourceMappingURL=chunk-ZP5WHI4C.cjs.map
|
|
853
|
+
//# sourceMappingURL=chunk-ZP5WHI4C.cjs.map
|