@nicia-ai/typegraph 0.58.0 → 0.60.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/CHANGELOG.md +42 -0
- package/README.md +15 -0
- package/dist/{atomic-mutation-program-CPcn0ZPu.d.ts → atomic-mutation-program-BNvJ13bq.d.ts} +1 -1
- package/dist/{atomic-mutation-program-AqOe51XD.d.cts → atomic-mutation-program-DOVE147J.d.cts} +1 -1
- package/dist/backend/drizzle/engine/index.cjs +8 -8
- package/dist/backend/drizzle/engine/index.d.cts +9 -9
- package/dist/backend/drizzle/engine/index.d.ts +9 -9
- package/dist/backend/drizzle/engine/index.js +3 -3
- package/dist/backend/drizzle/indexes.cjs +6 -6
- package/dist/backend/drizzle/indexes.d.cts +1 -1
- package/dist/backend/drizzle/indexes.d.ts +1 -1
- package/dist/backend/drizzle/indexes.js +2 -2
- package/dist/backend/index.d.cts +7 -7
- package/dist/backend/index.d.ts +7 -7
- package/dist/backend/postgres/index.cjs +17 -17
- package/dist/backend/postgres/index.d.cts +8 -8
- package/dist/backend/postgres/index.d.ts +8 -8
- package/dist/backend/postgres/index.js +3 -3
- package/dist/backend/postgres/pglite-store.cjs +1 -1
- package/dist/backend/postgres/pglite-store.d.cts +6 -6
- package/dist/backend/postgres/pglite-store.d.ts +6 -6
- package/dist/backend/postgres/pglite-store.js +1 -1
- package/dist/backend/postgres/pglite.cjs +5 -5
- package/dist/backend/postgres/pglite.d.cts +3 -3
- package/dist/backend/postgres/pglite.d.ts +3 -3
- package/dist/backend/postgres/pglite.js +4 -4
- package/dist/backend/sqlite/index.cjs +16 -16
- package/dist/backend/sqlite/index.d.cts +7 -7
- package/dist/backend/sqlite/index.d.ts +7 -7
- package/dist/backend/sqlite/index.js +3 -3
- package/dist/backend/sqlite/libsql.cjs +7 -7
- package/dist/backend/sqlite/libsql.d.cts +3 -3
- package/dist/backend/sqlite/libsql.d.ts +3 -3
- package/dist/backend/sqlite/libsql.js +3 -3
- package/dist/backend/sqlite/local-store.cjs +1 -1
- package/dist/backend/sqlite/local-store.d.cts +6 -6
- package/dist/backend/sqlite/local-store.d.ts +6 -6
- package/dist/backend/sqlite/local-store.js +1 -1
- package/dist/backend/sqlite/local.cjs +5 -5
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +4 -4
- package/dist/{chunk-7JUD57B4.js → chunk-2DKIJP2R.js} +1044 -84
- package/dist/chunk-2DKIJP2R.js.map +1 -0
- package/dist/{chunk-QIKO6DL5.js → chunk-2QNFFAMF.js} +3 -3
- package/dist/{chunk-QIKO6DL5.js.map → chunk-2QNFFAMF.js.map} +1 -1
- package/dist/{chunk-6BVZHDAZ.js → chunk-43DOTETB.js} +3 -3
- package/dist/{chunk-6BVZHDAZ.js.map → chunk-43DOTETB.js.map} +1 -1
- package/dist/{chunk-US3BLFWM.js → chunk-7GNPCBS2.js} +3 -3
- package/dist/{chunk-US3BLFWM.js.map → chunk-7GNPCBS2.js.map} +1 -1
- package/dist/{chunk-IV5W7LKW.cjs → chunk-A22XPVBQ.cjs} +2 -2
- package/dist/chunk-A22XPVBQ.cjs.map +1 -0
- package/dist/{chunk-CVO2ZPW5.js → chunk-B4P4DAW3.js} +4 -4
- package/dist/{chunk-CVO2ZPW5.js.map → chunk-B4P4DAW3.js.map} +1 -1
- package/dist/{chunk-FHFPUORN.cjs → chunk-CNFKFE5L.cjs} +1375 -415
- package/dist/chunk-CNFKFE5L.cjs.map +1 -0
- package/dist/{chunk-4MZQVVPX.cjs → chunk-D5CHUSW7.cjs} +33 -2
- package/dist/chunk-D5CHUSW7.cjs.map +1 -0
- package/dist/{chunk-TKEJR2UL.cjs → chunk-DWO6WZP5.cjs} +6 -6
- package/dist/{chunk-TKEJR2UL.cjs.map → chunk-DWO6WZP5.cjs.map} +1 -1
- package/dist/{chunk-GUMNJJFP.cjs → chunk-EHDLHPMK.cjs} +9 -9
- package/dist/{chunk-GUMNJJFP.cjs.map → chunk-EHDLHPMK.cjs.map} +1 -1
- package/dist/{chunk-DV24YZHG.js → chunk-FTDRMXIJ.js} +6 -6
- package/dist/{chunk-DV24YZHG.js.map → chunk-FTDRMXIJ.js.map} +1 -1
- package/dist/{chunk-BYBMDK6X.js → chunk-GYOQAV6R.js} +3 -3
- package/dist/{chunk-BYBMDK6X.js.map → chunk-GYOQAV6R.js.map} +1 -1
- package/dist/{chunk-GTW5YKFV.js → chunk-HCNC53MU.js} +3 -3
- package/dist/{chunk-GTW5YKFV.js.map → chunk-HCNC53MU.js.map} +1 -1
- package/dist/{chunk-M7TRJXFE.js → chunk-ILVXUOQY.js} +3 -3
- package/dist/{chunk-M7TRJXFE.js.map → chunk-ILVXUOQY.js.map} +1 -1
- package/dist/{chunk-FGKWXSHF.cjs → chunk-KGQVK2II.cjs} +40 -40
- package/dist/{chunk-FGKWXSHF.cjs.map → chunk-KGQVK2II.cjs.map} +1 -1
- package/dist/{chunk-BMATB57B.cjs → chunk-KW3ON5IU.cjs} +11 -11
- package/dist/{chunk-BMATB57B.cjs.map → chunk-KW3ON5IU.cjs.map} +1 -1
- package/dist/{chunk-GK62U3S5.js → chunk-LOFUF6L7.js} +3 -3
- package/dist/{chunk-GK62U3S5.js.map → chunk-LOFUF6L7.js.map} +1 -1
- package/dist/{chunk-BPYZUJX5.cjs → chunk-MTJAT6UO.cjs} +5 -5
- package/dist/{chunk-BPYZUJX5.cjs.map → chunk-MTJAT6UO.cjs.map} +1 -1
- package/dist/{chunk-YTYB5KCQ.js → chunk-OH7QRGPQ.js} +33 -2
- package/dist/chunk-OH7QRGPQ.js.map +1 -0
- package/dist/{chunk-U53HFE4L.cjs → chunk-OKA6H3B3.cjs} +22 -22
- package/dist/{chunk-U53HFE4L.cjs.map → chunk-OKA6H3B3.cjs.map} +1 -1
- package/dist/{chunk-QR6V2BXA.cjs → chunk-PTFO3JI5.cjs} +114 -114
- package/dist/{chunk-QR6V2BXA.cjs.map → chunk-PTFO3JI5.cjs.map} +1 -1
- package/dist/{chunk-C3CN2C2T.cjs → chunk-Q6ZVQWH7.cjs} +38 -38
- package/dist/{chunk-C3CN2C2T.cjs.map → chunk-Q6ZVQWH7.cjs.map} +1 -1
- package/dist/{chunk-WAG3NVD7.cjs → chunk-QBQ465OX.cjs} +12 -12
- package/dist/{chunk-WAG3NVD7.cjs.map → chunk-QBQ465OX.cjs.map} +1 -1
- package/dist/{chunk-CRROO6PK.cjs → chunk-QHP2BCBJ.cjs} +4 -4
- package/dist/{chunk-CRROO6PK.cjs.map → chunk-QHP2BCBJ.cjs.map} +1 -1
- package/dist/{chunk-HWWPL2YL.js → chunk-QWIR5533.js} +2 -2
- package/dist/chunk-QWIR5533.js.map +1 -0
- package/dist/{chunk-ZHLWPHNT.cjs → chunk-RJ3GVX73.cjs} +6 -6
- package/dist/{chunk-ZHLWPHNT.cjs.map → chunk-RJ3GVX73.cjs.map} +1 -1
- package/dist/{chunk-SYKR6MVR.cjs → chunk-T2M2S5YZ.cjs} +59 -59
- package/dist/{chunk-SYKR6MVR.cjs.map → chunk-T2M2S5YZ.cjs.map} +1 -1
- package/dist/{chunk-OESX3T5K.js → chunk-TNNDNSNH.js} +4 -4
- package/dist/{chunk-OESX3T5K.js.map → chunk-TNNDNSNH.js.map} +1 -1
- package/dist/{chunk-5C4OYYDD.js → chunk-UVQMUBZ6.js} +6 -6
- package/dist/{chunk-5C4OYYDD.js.map → chunk-UVQMUBZ6.js.map} +1 -1
- package/dist/{chunk-IV3FENV2.js → chunk-W6K6NSRT.js} +5 -5
- package/dist/{chunk-IV3FENV2.js.map → chunk-W6K6NSRT.js.map} +1 -1
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/{ddl-wlEdaCQK.d.cts → ddl-B9lzB8Zi.d.cts} +3 -3
- package/dist/{ddl-DkFrUTn_.d.ts → ddl-DuZWvxBb.d.ts} +3 -3
- package/dist/graph-extension/index.d.cts +2 -2
- package/dist/graph-extension/index.d.ts +2 -2
- package/dist/graph-merge/index.cjs +122 -122
- package/dist/graph-merge/index.d.cts +7 -6
- package/dist/graph-merge/index.d.ts +7 -6
- package/dist/graph-merge/index.js +10 -10
- package/dist/{graph-templates-B4gkXVqg.d.ts → graph-templates-ClBhrXiA.d.ts} +2 -2
- package/dist/{graph-templates-6zTU7bNe.d.cts → graph-templates-DfmKDARd.d.cts} +2 -2
- package/dist/index.cjs +73 -73
- package/dist/index.d.cts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +11 -11
- package/dist/indexes/index.cjs +8 -8
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/indexes/index.js +3 -3
- package/dist/{ingestion-import-target-im9wEB00.d.cts → ingestion-import-target-BSgJagqI.d.cts} +1 -1
- package/dist/{ingestion-import-target-SopMSm-T.d.ts → ingestion-import-target-PNw10V4T.d.ts} +1 -1
- package/dist/interchange/index.cjs +29 -29
- package/dist/interchange/index.d.cts +7 -6
- package/dist/interchange/index.d.ts +7 -6
- package/dist/interchange/index.js +6 -6
- package/dist/{local-store-impl-ARNXBBSF.cjs → local-store-impl-QGSRYFZF.cjs} +17 -17
- package/dist/{local-store-impl-ARNXBBSF.cjs.map → local-store-impl-QGSRYFZF.cjs.map} +1 -1
- package/dist/{local-store-impl-FTGRP2V7.js → local-store-impl-VEVK2VGA.js} +14 -14
- package/dist/{local-store-impl-FTGRP2V7.js.map → local-store-impl-VEVK2VGA.js.map} +1 -1
- package/dist/{pglite-store-impl-CNQZYRBC.cjs → pglite-store-impl-33CI3P3M.cjs} +17 -17
- package/dist/{pglite-store-impl-CNQZYRBC.cjs.map → pglite-store-impl-33CI3P3M.cjs.map} +1 -1
- package/dist/{pglite-store-impl-NULC2IHH.js → pglite-store-impl-RDPTOOP3.js} +14 -14
- package/dist/{pglite-store-impl-NULC2IHH.js.map → pglite-store-impl-RDPTOOP3.js.map} +1 -1
- package/dist/{postgres-Dd3TrFku.d.ts → postgres-2FBMdOE_.d.ts} +3 -3
- package/dist/{postgres-cLQPlKtp.d.cts → postgres-BR3AeXm9.d.ts} +1 -1
- package/dist/{postgres-CLPfTNYN.d.ts → postgres-CRatyTVL.d.cts} +1 -1
- package/dist/{postgres-B4VD_rVy.d.cts → postgres-lbZf0zyg.d.cts} +3 -3
- package/dist/{profile-Co154QBx.d.ts → profile-BipG05-8.d.ts} +2 -2
- package/dist/{profile-BqThShR_.d.cts → profile-DKtvxVyA.d.cts} +2 -2
- package/dist/profiler/index.d.cts +8 -7
- package/dist/profiler/index.d.ts +8 -7
- package/dist/provenance/index.cjs +15 -15
- package/dist/provenance/index.cjs.map +1 -1
- package/dist/provenance/index.d.cts +6 -5
- package/dist/provenance/index.d.ts +6 -5
- package/dist/provenance/index.js +2 -2
- package/dist/provenance/index.js.map +1 -1
- package/dist/{repair-validity-windows-BLoClfCq.d.cts → repair-validity-windows-BnSHFIsR.d.cts} +1 -1
- package/dist/{repair-validity-windows-C__28ckL.d.ts → repair-validity-windows-DfRb4gZm.d.ts} +1 -1
- package/dist/{resolve-DgFSIK99.d.ts → resolve-BbjZDYTw.d.ts} +1 -1
- package/dist/{resolve-DSUxNIqw.d.cts → resolve-mLksuBg2.d.cts} +1 -1
- package/dist/schema/index.cjs +36 -36
- package/dist/schema/index.d.cts +7 -7
- package/dist/schema/index.d.ts +7 -7
- package/dist/schema/index.js +6 -6
- package/dist/{searchable-CZKn12eY.d.cts → searchable-BEAN91Ce.d.cts} +1 -1
- package/dist/{searchable-CUWWphQI.d.ts → searchable-Bg2lMPRm.d.ts} +1 -1
- package/dist/{sqlite-mSd_eVk4.d.ts → sqlite-Cal3rHgZ.d.ts} +3 -3
- package/dist/{sqlite-RdH7w-ix.d.cts → sqlite-CvajLABd.d.cts} +1 -1
- package/dist/{sqlite-qXLIybR2.d.cts → sqlite-DQxKoWAH.d.cts} +3 -3
- package/dist/{sqlite-CoBmhiFd.d.ts → sqlite-jH5J-Jb8.d.ts} +1 -1
- package/dist/{store-BzmMsCcw.d.ts → store-B5WZ8E5m.d.ts} +313 -177
- package/dist/{store-CL6uTm_W.d.cts → store-DdhFpX53.d.cts} +313 -177
- package/dist/{types-BUoh7cc3.d.cts → types-BUA3dZ99.d.cts} +1 -1
- package/dist/{types-ClC0IFIS.d.ts → types-CPtb7KNf.d.ts} +1 -1
- package/dist/{types-Blq8PG_N.d.cts → types-Dky3sCFz.d.cts} +9 -0
- package/dist/{types-Blq8PG_N.d.ts → types-Dky3sCFz.d.ts} +9 -0
- package/dist/{where-61C-QoM8.d.ts → where-BReEkAiy.d.ts} +1 -1
- package/dist/{where-o3Me5iJx.d.cts → where-Cz11nPRu.d.cts} +1 -1
- package/package.json +2 -2
- package/dist/chunk-4MZQVVPX.cjs.map +0 -1
- package/dist/chunk-7JUD57B4.js.map +0 -1
- package/dist/chunk-FHFPUORN.cjs.map +0 -1
- package/dist/chunk-HWWPL2YL.js.map +0 -1
- package/dist/chunk-IV5W7LKW.cjs.map +0 -1
- package/dist/chunk-YTYB5KCQ.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkA22XPVBQ_cjs = require('./chunk-A22XPVBQ.cjs');
|
|
4
4
|
var chunkWEXAMJTA_cjs = require('./chunk-WEXAMJTA.cjs');
|
|
5
5
|
var chunkEOLNL35G_cjs = require('./chunk-EOLNL35G.cjs');
|
|
6
6
|
var chunkFSSQ4YNU_cjs = require('./chunk-FSSQ4YNU.cjs');
|
|
7
7
|
var chunkNWJV4UVW_cjs = require('./chunk-NWJV4UVW.cjs');
|
|
8
|
-
var
|
|
8
|
+
var chunkD5CHUSW7_cjs = require('./chunk-D5CHUSW7.cjs');
|
|
9
9
|
var chunkMAYQDOZB_cjs = require('./chunk-MAYQDOZB.cjs');
|
|
10
10
|
var chunkNYWU6CBZ_cjs = require('./chunk-NYWU6CBZ.cjs');
|
|
11
11
|
var chunkG7W67PZO_cjs = require('./chunk-G7W67PZO.cjs');
|
|
@@ -99,7 +99,7 @@ function spanningDifferentAssertion(assertions, first, second) {
|
|
|
99
99
|
// src/identity/sql-target.ts
|
|
100
100
|
var MAX_REFERENCE_CHUNK_SIZE = 200;
|
|
101
101
|
function identityChunkSize(target, input) {
|
|
102
|
-
const parameterLimit =
|
|
102
|
+
const parameterLimit = chunkA22XPVBQ_cjs.recordedBindParamBudget(target);
|
|
103
103
|
const chunkSize = Math.floor(
|
|
104
104
|
(parameterLimit - input.fixedParameters) / input.parametersPerItem
|
|
105
105
|
);
|
|
@@ -241,10 +241,10 @@ async function lockIdentityEnablementNodes(target, schema) {
|
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
async function loadNodeSnapshot(target, schema, graphId, coordinate) {
|
|
244
|
-
const sqlCoordinate =
|
|
244
|
+
const sqlCoordinate = chunkA22XPVBQ_cjs.identitySqlCoordinate(coordinate, chunkNWJV4UVW_cjs.nowIso());
|
|
245
245
|
const rows = await target.execute(
|
|
246
246
|
chunkMAYQDOZB_cjs.asCompiledRowsSql(
|
|
247
|
-
|
|
247
|
+
chunkA22XPVBQ_cjs.identityNodeSnapshotSource(schema, graphId, sqlCoordinate)
|
|
248
248
|
)
|
|
249
249
|
);
|
|
250
250
|
return rows.map((row) => ({
|
|
@@ -325,7 +325,7 @@ async function loadCurrentStructuralClasses(target, schema, graphId, references)
|
|
|
325
325
|
}
|
|
326
326
|
async function loadCurrentVisibleMembers(target, schema, graphId, ref) {
|
|
327
327
|
const now = chunkNWJV4UVW_cjs.nowIso();
|
|
328
|
-
const coordinate =
|
|
328
|
+
const coordinate = chunkA22XPVBQ_cjs.identitySqlCoordinate(void 0, now);
|
|
329
329
|
const rows = await target.execute(
|
|
330
330
|
chunkMAYQDOZB_cjs.asCompiledRowsSql(chunkMAYQDOZB_cjs.sql`
|
|
331
331
|
WITH anchor AS (
|
|
@@ -351,7 +351,7 @@ async function loadCurrentVisibleMembers(target, schema, graphId, ref) {
|
|
|
351
351
|
WHERE n.graph_id = ${graphId}
|
|
352
352
|
AND n.kind = m.kind
|
|
353
353
|
AND n.id = m.id
|
|
354
|
-
AND ${
|
|
354
|
+
AND ${chunkA22XPVBQ_cjs.identityNodeVisibilitySql(coordinate, "n")}
|
|
355
355
|
`)
|
|
356
356
|
);
|
|
357
357
|
const members = rows.map((row) => ({ kind: row.kind, id: row.id })).toSorted((left, right) => compareReferences(left, right));
|
|
@@ -400,12 +400,12 @@ async function loadHistoricalClasses(target, schema, graphId, references, coordi
|
|
|
400
400
|
return combined;
|
|
401
401
|
}
|
|
402
402
|
const currentInstant = chunkNWJV4UVW_cjs.nowIso();
|
|
403
|
-
const sqlCoordinate =
|
|
403
|
+
const sqlCoordinate = chunkA22XPVBQ_cjs.identitySqlCoordinate(coordinate, currentInstant);
|
|
404
404
|
const seeds = chunkMAYQDOZB_cjs.sql.join(
|
|
405
405
|
uniqueReferences.map((ref) => chunkMAYQDOZB_cjs.sql`(${ref.kind}, ${ref.id})`),
|
|
406
406
|
chunkMAYQDOZB_cjs.sql`, `
|
|
407
407
|
);
|
|
408
|
-
const reconstruction =
|
|
408
|
+
const reconstruction = chunkA22XPVBQ_cjs.historicalIdentityReconstructionCtes({
|
|
409
409
|
schema,
|
|
410
410
|
graphId,
|
|
411
411
|
coordinate: sqlCoordinate,
|
|
@@ -419,7 +419,7 @@ async function loadHistoricalClasses(target, schema, graphId, references, coordi
|
|
|
419
419
|
${reconstruction}
|
|
420
420
|
SELECT member.seed_kind, member.seed_id,
|
|
421
421
|
member.kind AS member_kind, member.id AS member_id,
|
|
422
|
-
CASE WHEN ${
|
|
422
|
+
CASE WHEN ${chunkA22XPVBQ_cjs.identityNodeVisibilitySql(sqlCoordinate, "n")}
|
|
423
423
|
THEN 1 ELSE 0 END AS is_visible
|
|
424
424
|
FROM identity_members member
|
|
425
425
|
JOIN node_snapshot n ON n.kind = member.kind AND n.id = member.id
|
|
@@ -470,10 +470,10 @@ function visibleMembersAtCoordinate(ctx, ref) {
|
|
|
470
470
|
);
|
|
471
471
|
}
|
|
472
472
|
async function loadAssertions(target, schema, graphId, coordinate, currentInstant) {
|
|
473
|
-
const source =
|
|
473
|
+
const source = chunkA22XPVBQ_cjs.identityAssertionSnapshotSource(
|
|
474
474
|
schema,
|
|
475
475
|
graphId,
|
|
476
|
-
|
|
476
|
+
chunkA22XPVBQ_cjs.identitySqlCoordinate(coordinate, currentInstant),
|
|
477
477
|
void 0
|
|
478
478
|
);
|
|
479
479
|
const rows = await target.execute(
|
|
@@ -512,10 +512,10 @@ async function loadAssertionsTouching(target, schema, graphId, references, coord
|
|
|
512
512
|
}
|
|
513
513
|
return [...byId.values()];
|
|
514
514
|
}
|
|
515
|
-
const source =
|
|
515
|
+
const source = chunkA22XPVBQ_cjs.identityAssertionSnapshotSource(
|
|
516
516
|
schema,
|
|
517
517
|
graphId,
|
|
518
|
-
|
|
518
|
+
chunkA22XPVBQ_cjs.identitySqlCoordinate(coordinate, chunkNWJV4UVW_cjs.nowIso()),
|
|
519
519
|
relation
|
|
520
520
|
);
|
|
521
521
|
const aMatches = referenceCondition(
|
|
@@ -530,7 +530,7 @@ async function loadAssertionsTouching(target, schema, graphId, references, coord
|
|
|
530
530
|
);
|
|
531
531
|
const rows = await target.execute(
|
|
532
532
|
chunkMAYQDOZB_cjs.asCompiledRowsSql(chunkMAYQDOZB_cjs.sql`
|
|
533
|
-
SELECT ${
|
|
533
|
+
SELECT ${chunkA22XPVBQ_cjs.IDENTITY_ASSERTION_COLUMNS}
|
|
534
534
|
FROM (${source}) identity_assertions
|
|
535
535
|
WHERE ${aMatches} OR ${bMatches}
|
|
536
536
|
`)
|
|
@@ -551,7 +551,7 @@ async function loadSpanningDifferentAssertion(target, schema, graphId, firstClas
|
|
|
551
551
|
|
|
552
552
|
// src/identity/interchange-read.ts
|
|
553
553
|
function codePointOrderedAssertionId(target) {
|
|
554
|
-
return
|
|
554
|
+
return chunkD5CHUSW7_cjs.getDialect(target.dialect).binaryText(chunkMAYQDOZB_cjs.sql`identity_assertions.id`);
|
|
555
555
|
}
|
|
556
556
|
async function readIdentityAssertionPageAtTarget(ctx, target, mode, options) {
|
|
557
557
|
if (!Number.isSafeInteger(options.limit) || options.limit <= 0) {
|
|
@@ -1238,10 +1238,10 @@ function owedProbeChunkSize(target) {
|
|
|
1238
1238
|
});
|
|
1239
1239
|
}
|
|
1240
1240
|
function liveDifferentSource(schema, graphId) {
|
|
1241
|
-
return
|
|
1241
|
+
return chunkA22XPVBQ_cjs.identityAssertionSnapshotSource(
|
|
1242
1242
|
schema,
|
|
1243
1243
|
graphId,
|
|
1244
|
-
|
|
1244
|
+
chunkA22XPVBQ_cjs.identitySqlCoordinate(void 0, chunkNWJV4UVW_cjs.nowIso()),
|
|
1245
1245
|
"different"
|
|
1246
1246
|
);
|
|
1247
1247
|
}
|
|
@@ -1430,7 +1430,7 @@ async function validateCurrentRelation(ctx, target, relation, operation, a, b) {
|
|
|
1430
1430
|
async function currentAssertionForPair(target, schema, graphId, relation, a, b) {
|
|
1431
1431
|
const rows = await target.execute(
|
|
1432
1432
|
chunkMAYQDOZB_cjs.asCompiledRowsSql(chunkMAYQDOZB_cjs.sql`
|
|
1433
|
-
SELECT ${
|
|
1433
|
+
SELECT ${chunkA22XPVBQ_cjs.IDENTITY_ASSERTION_COLUMNS}
|
|
1434
1434
|
FROM ${schema.identityAssertionsTable}
|
|
1435
1435
|
WHERE graph_id = ${graphId}
|
|
1436
1436
|
AND rel = ${relation}
|
|
@@ -1449,7 +1449,7 @@ async function assertionForExactWindow(target, schema, graphId, relation, a, b,
|
|
|
1449
1449
|
const validToMatch = window.validTo === void 0 ? chunkMAYQDOZB_cjs.sql`valid_to IS NULL` : chunkMAYQDOZB_cjs.sql`valid_to = ${window.validTo}`;
|
|
1450
1450
|
const rows = await target.execute(
|
|
1451
1451
|
chunkMAYQDOZB_cjs.asCompiledRowsSql(chunkMAYQDOZB_cjs.sql`
|
|
1452
|
-
SELECT ${
|
|
1452
|
+
SELECT ${chunkA22XPVBQ_cjs.IDENTITY_ASSERTION_COLUMNS}
|
|
1453
1453
|
FROM ${schema.identityAssertionsTable}
|
|
1454
1454
|
WHERE graph_id = ${graphId}
|
|
1455
1455
|
AND rel = ${relation}
|
|
@@ -1481,7 +1481,7 @@ async function insertAssertion(target, schema, graphId, relation, a, b, operatio
|
|
|
1481
1481
|
function buildAssertionRow(graphId, relation, a, b, timestamp, options) {
|
|
1482
1482
|
return {
|
|
1483
1483
|
graph_id: graphId,
|
|
1484
|
-
id: options?.id ??
|
|
1484
|
+
id: options?.id ?? chunkA22XPVBQ_cjs.generateId(),
|
|
1485
1485
|
rel: relation,
|
|
1486
1486
|
a_kind: a.kind,
|
|
1487
1487
|
a_id: a.id,
|
|
@@ -1650,7 +1650,7 @@ async function loadIdentityWindowLedger(input) {
|
|
|
1650
1650
|
WHERE assertion.graph_id = ${graphId}
|
|
1651
1651
|
AND ${windowOverlapSql("assertion", lowerBoundary, upperBoundary)}
|
|
1652
1652
|
)
|
|
1653
|
-
SELECT 'assertion' AS row_type, ${
|
|
1653
|
+
SELECT 'assertion' AS row_type, ${chunkA22XPVBQ_cjs.IDENTITY_ASSERTION_COLUMNS},
|
|
1654
1654
|
NULL AS node_kind, NULL AS node_id,
|
|
1655
1655
|
NULL AS node_created_at, NULL AS node_deleted_at
|
|
1656
1656
|
FROM selected_assertions
|
|
@@ -1859,7 +1859,7 @@ async function insertAssertionRows(target, schema, rows) {
|
|
|
1859
1859
|
await executeIdentityStatement(
|
|
1860
1860
|
target,
|
|
1861
1861
|
chunkMAYQDOZB_cjs.sql`
|
|
1862
|
-
INSERT INTO ${schema.identityAssertionsTable} (${
|
|
1862
|
+
INSERT INTO ${schema.identityAssertionsTable} (${chunkA22XPVBQ_cjs.IDENTITY_ASSERTION_COLUMNS}) VALUES ${chunkMAYQDOZB_cjs.sql.join(values, chunkMAYQDOZB_cjs.sql`, `)}
|
|
1863
1863
|
`
|
|
1864
1864
|
);
|
|
1865
1865
|
}
|
|
@@ -1880,7 +1880,7 @@ async function loadAssertionsByIds(target, schema, graphId, ids) {
|
|
|
1880
1880
|
);
|
|
1881
1881
|
const rows = await target.execute(
|
|
1882
1882
|
chunkMAYQDOZB_cjs.asCompiledRowsSql(chunkMAYQDOZB_cjs.sql`
|
|
1883
|
-
SELECT ${
|
|
1883
|
+
SELECT ${chunkA22XPVBQ_cjs.IDENTITY_ASSERTION_COLUMNS}
|
|
1884
1884
|
FROM ${schema.identityAssertionsTable}
|
|
1885
1885
|
WHERE graph_id = ${graphId} AND id IN (${idList})
|
|
1886
1886
|
`)
|
|
@@ -2514,7 +2514,7 @@ async function bulkAssertWindowedPairs(ctx, target, relation, pairs, touch, oper
|
|
|
2514
2514
|
async function findCurrentAssertionById(target, schema, graphId, id) {
|
|
2515
2515
|
const rows = await target.execute(
|
|
2516
2516
|
chunkMAYQDOZB_cjs.asCompiledRowsSql(chunkMAYQDOZB_cjs.sql`
|
|
2517
|
-
SELECT ${
|
|
2517
|
+
SELECT ${chunkA22XPVBQ_cjs.IDENTITY_ASSERTION_COLUMNS}
|
|
2518
2518
|
FROM ${schema.identityAssertionsTable}
|
|
2519
2519
|
WHERE graph_id = ${graphId}
|
|
2520
2520
|
AND id = ${id}
|
|
@@ -2565,7 +2565,7 @@ async function retractCurrentAssertions(ctx, target, ids, touch, resolveValidTo)
|
|
|
2565
2565
|
);
|
|
2566
2566
|
const rows = await target.execute(
|
|
2567
2567
|
chunkMAYQDOZB_cjs.asCompiledRowsSql(chunkMAYQDOZB_cjs.sql`
|
|
2568
|
-
SELECT ${
|
|
2568
|
+
SELECT ${chunkA22XPVBQ_cjs.IDENTITY_ASSERTION_COLUMNS}
|
|
2569
2569
|
FROM ${ctx.schema.identityAssertionsTable}
|
|
2570
2570
|
WHERE graph_id = ${ctx.graphId}
|
|
2571
2571
|
AND id IN (${placeholders})
|
|
@@ -2666,7 +2666,7 @@ async function retractPlannedAssertions(ctx, target, retractions, touch) {
|
|
|
2666
2666
|
}
|
|
2667
2667
|
async function runIdentityMutation(ctx, fn) {
|
|
2668
2668
|
const touchedBox = { touched: false };
|
|
2669
|
-
return
|
|
2669
|
+
return chunkA22XPVBQ_cjs.runInWriteTransaction(
|
|
2670
2670
|
{
|
|
2671
2671
|
graphId: ctx.graphId,
|
|
2672
2672
|
schemaVersion: ctx.schemaVersion,
|
|
@@ -2678,7 +2678,7 @@ async function runIdentityMutation(ctx, fn) {
|
|
|
2678
2678
|
async (target) => {
|
|
2679
2679
|
touchedBox.touched = false;
|
|
2680
2680
|
await lockIdentityGraph(target, ctx.graphId);
|
|
2681
|
-
return
|
|
2681
|
+
return chunkA22XPVBQ_cjs.withRecordedIdentityMutationTarget(
|
|
2682
2682
|
target,
|
|
2683
2683
|
(rawTarget, touch) => fn(
|
|
2684
2684
|
rawTarget,
|
|
@@ -3119,7 +3119,7 @@ function rethrowTaggedWithAssertion(error, assertionId, progress) {
|
|
|
3119
3119
|
async function importIdentityAssertionsIntoTarget(ctx, target, assertions, mode, ignoredAssertionIds = /* @__PURE__ */ new Set()) {
|
|
3120
3120
|
let created = 0;
|
|
3121
3121
|
let skipped = 0;
|
|
3122
|
-
await
|
|
3122
|
+
await chunkA22XPVBQ_cjs.withRecordedIdentityMutationTarget(target, async (rawTarget, touch) => {
|
|
3123
3123
|
const operationInstant = chunkNWJV4UVW_cjs.nowIso();
|
|
3124
3124
|
const normalized = assertions.map((assertion) => ({
|
|
3125
3125
|
assertion,
|
|
@@ -3374,7 +3374,7 @@ async function rebuildIdentityClosureForContext(ctx) {
|
|
|
3374
3374
|
requireAtomicIdentityBackend(ctx.backend, ctx.graphId);
|
|
3375
3375
|
async function rebuildAtTarget(target) {
|
|
3376
3376
|
await lockIdentityGraph(target, ctx.graphId);
|
|
3377
|
-
await
|
|
3377
|
+
await chunkA22XPVBQ_cjs.withRecordedIdentityMutationTarget(target, async (rawTarget) => {
|
|
3378
3378
|
const activeKinds = identityActiveKinds(ctx.registry);
|
|
3379
3379
|
const snapshot = await loadSnapshot(
|
|
3380
3380
|
rawTarget,
|
|
@@ -3566,7 +3566,7 @@ async function assertAffectedIdentityClassesConsistent(ctx, target, seeds) {
|
|
|
3566
3566
|
await lockIdentityGraph(target, ctx.graphId);
|
|
3567
3567
|
const observed = await findAffectedClassInconsistency(ctx, target, seeds);
|
|
3568
3568
|
if (observed === void 0) return;
|
|
3569
|
-
await
|
|
3569
|
+
await chunkA22XPVBQ_cjs.withRecordedIdentityMutationTarget(target, async (rawTarget) => {
|
|
3570
3570
|
await replaceClosure(
|
|
3571
3571
|
rawTarget,
|
|
3572
3572
|
ctx.schema,
|
|
@@ -3596,7 +3596,7 @@ async function deleteAssertionsTouchingKinds(target, schema, graphId, kinds, tou
|
|
|
3596
3596
|
);
|
|
3597
3597
|
const rows = await target.execute(
|
|
3598
3598
|
chunkMAYQDOZB_cjs.asCompiledRowsSql(chunkMAYQDOZB_cjs.sql`
|
|
3599
|
-
SELECT ${
|
|
3599
|
+
SELECT ${chunkA22XPVBQ_cjs.IDENTITY_ASSERTION_COLUMNS}
|
|
3600
3600
|
FROM ${schema.identityAssertionsTable}
|
|
3601
3601
|
WHERE graph_id = ${graphId}
|
|
3602
3602
|
AND (a_kind IN (${kindList2}) OR b_kind IN (${kindList2}))
|
|
@@ -3733,7 +3733,7 @@ async function liveNodeKindsSharingIds(ctx, target, ids) {
|
|
|
3733
3733
|
async function foldIdentityForCreatedNodes(ctx, target, references) {
|
|
3734
3734
|
if (references.length === 0 || ctx.sameIdAcrossKinds === "ignore") return;
|
|
3735
3735
|
await lockIdentityGraph(target, ctx.graphId);
|
|
3736
|
-
await
|
|
3736
|
+
await chunkA22XPVBQ_cjs.withRecordedIdentityMutationTarget(target, async (rawTarget) => {
|
|
3737
3737
|
const liveKindsById = await liveNodeKindsSharingIds(
|
|
3738
3738
|
ctx,
|
|
3739
3739
|
rawTarget,
|
|
@@ -3801,7 +3801,7 @@ async function readNodeDeletionInstant(target, schema, graphId, ref) {
|
|
|
3801
3801
|
async function requireNodeValidityEndCompatible(ctx, target, ref, validTo) {
|
|
3802
3802
|
const rows = await target.execute(
|
|
3803
3803
|
chunkMAYQDOZB_cjs.asCompiledRowsSql(chunkMAYQDOZB_cjs.sql`
|
|
3804
|
-
SELECT ${
|
|
3804
|
+
SELECT ${chunkA22XPVBQ_cjs.IDENTITY_ASSERTION_COLUMNS}
|
|
3805
3805
|
FROM ${ctx.schema.identityAssertionsTable}
|
|
3806
3806
|
WHERE graph_id = ${ctx.graphId}
|
|
3807
3807
|
AND deleted_at IS NULL
|
|
@@ -3828,7 +3828,7 @@ async function requireNodeValidityEndCompatible(ctx, target, ref, validTo) {
|
|
|
3828
3828
|
}
|
|
3829
3829
|
async function detachIdentityForNode(ctx, target, ref, mode) {
|
|
3830
3830
|
await lockIdentityGraph(target, ctx.graphId);
|
|
3831
|
-
await
|
|
3831
|
+
await chunkA22XPVBQ_cjs.withRecordedIdentityMutationTarget(target, async (rawTarget, touch) => {
|
|
3832
3832
|
const touchesNode = chunkMAYQDOZB_cjs.sql`
|
|
3833
3833
|
(
|
|
3834
3834
|
(a_kind = ${ref.kind} AND a_id = ${ref.id})
|
|
@@ -3838,7 +3838,7 @@ async function detachIdentityForNode(ctx, target, ref, mode) {
|
|
|
3838
3838
|
const scope = mode === "hard" ? chunkMAYQDOZB_cjs.sql`` : chunkMAYQDOZB_cjs.sql`AND valid_to IS NULL AND deleted_at IS NULL`;
|
|
3839
3839
|
const rows = await rawTarget.execute(
|
|
3840
3840
|
chunkMAYQDOZB_cjs.asCompiledRowsSql(chunkMAYQDOZB_cjs.sql`
|
|
3841
|
-
SELECT ${
|
|
3841
|
+
SELECT ${chunkA22XPVBQ_cjs.IDENTITY_ASSERTION_COLUMNS}
|
|
3842
3842
|
FROM ${ctx.schema.identityAssertionsTable}
|
|
3843
3843
|
WHERE graph_id = ${ctx.graphId}
|
|
3844
3844
|
${scope}
|
|
@@ -3950,5 +3950,5 @@ exports.requireNodeValidityEndCompatible = requireNodeValidityEndCompatible;
|
|
|
3950
3950
|
exports.separationRebuildRequired = separationRebuildRequired;
|
|
3951
3951
|
exports.toTransferAssertion = toTransferAssertion;
|
|
3952
3952
|
exports.validateIdentityForContext = validateIdentityForContext;
|
|
3953
|
-
//# sourceMappingURL=chunk-
|
|
3954
|
-
//# sourceMappingURL=chunk-
|
|
3953
|
+
//# sourceMappingURL=chunk-Q6ZVQWH7.cjs.map
|
|
3954
|
+
//# sourceMappingURL=chunk-Q6ZVQWH7.cjs.map
|