@nicia-ai/typegraph 0.38.0 → 0.40.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/dist/backend/drizzle/indexes.cjs +8 -10
- package/dist/backend/drizzle/indexes.d.cts +2 -2
- package/dist/backend/drizzle/indexes.d.ts +2 -2
- package/dist/backend/drizzle/indexes.js +4 -6
- package/dist/backend/index.cjs +60 -39
- package/dist/backend/index.d.cts +60 -1
- package/dist/backend/index.d.ts +60 -1
- package/dist/backend/index.js +12 -3
- package/dist/backend/postgres/index.cjs +25 -27
- package/dist/backend/postgres/index.d.cts +6 -6
- package/dist/backend/postgres/index.d.ts +6 -6
- package/dist/backend/postgres/index.js +12 -14
- package/dist/backend/postgres/pglite-store.cjs +26 -27
- package/dist/backend/postgres/pglite-store.cjs.map +1 -1
- package/dist/backend/postgres/pglite-store.d.cts +6 -5
- package/dist/backend/postgres/pglite-store.d.ts +6 -5
- package/dist/backend/postgres/pglite-store.js +22 -23
- package/dist/backend/postgres/pglite-store.js.map +1 -1
- package/dist/backend/postgres/pglite.cjs +14 -16
- package/dist/backend/postgres/pglite.d.cts +3 -3
- package/dist/backend/postgres/pglite.d.ts +3 -3
- package/dist/backend/postgres/pglite.js +13 -15
- package/dist/backend/sqlite/index.cjs +26 -28
- package/dist/backend/sqlite/index.d.cts +6 -6
- package/dist/backend/sqlite/index.d.ts +6 -6
- package/dist/backend/sqlite/index.js +10 -12
- package/dist/backend/sqlite/libsql.cjs +16 -18
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +3 -3
- package/dist/backend/sqlite/libsql.d.ts +3 -3
- package/dist/backend/sqlite/libsql.js +15 -17
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +27 -28
- package/dist/backend/sqlite/local-store.cjs.map +1 -1
- package/dist/backend/sqlite/local-store.d.cts +6 -5
- package/dist/backend/sqlite/local-store.d.ts +6 -5
- package/dist/backend/sqlite/local-store.js +23 -24
- package/dist/backend/sqlite/local-store.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +15 -17
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +13 -15
- package/dist/{chunk-U4JDJKPD.js → chunk-2I3DNNBU.js} +4 -4
- package/dist/{chunk-U4JDJKPD.js.map → chunk-2I3DNNBU.js.map} +1 -1
- package/dist/{chunk-NPWACFQJ.cjs → chunk-2J5NMMVR.cjs} +43 -43
- package/dist/{chunk-NPWACFQJ.cjs.map → chunk-2J5NMMVR.cjs.map} +1 -1
- package/dist/{chunk-NU23DUSJ.cjs → chunk-2X73QTIC.cjs} +12 -13
- package/dist/chunk-2X73QTIC.cjs.map +1 -0
- package/dist/{chunk-A2FGSWMQ.js → chunk-3BL3JFHL.js} +202 -52
- package/dist/chunk-3BL3JFHL.js.map +1 -0
- package/dist/chunk-3SHAUJRB.js +79 -0
- package/dist/chunk-3SHAUJRB.js.map +1 -0
- package/dist/{chunk-UPXDVI3T.js → chunk-53BSOG3O.js} +8 -7
- package/dist/chunk-53BSOG3O.js.map +1 -0
- package/dist/chunk-5J4VNCUD.js +856 -0
- package/dist/chunk-5J4VNCUD.js.map +1 -0
- package/dist/chunk-5YBDB7UG.cjs +12 -0
- package/dist/{chunk-FMNUSGZ4.cjs.map → chunk-5YBDB7UG.cjs.map} +1 -1
- package/dist/{chunk-6XDBRDZE.js → chunk-6N7QBIWN.js} +7 -3
- package/dist/chunk-6N7QBIWN.js.map +1 -0
- package/dist/{chunk-EZH7FNUS.js → chunk-6QP4QXBR.js} +3 -3
- package/dist/{chunk-EZH7FNUS.js.map → chunk-6QP4QXBR.js.map} +1 -1
- package/dist/{chunk-E6TXEISH.cjs → chunk-7UTUKH4E.cjs} +4 -4
- package/dist/{chunk-E6TXEISH.cjs.map → chunk-7UTUKH4E.cjs.map} +1 -1
- package/dist/chunk-7WLEQIHA.cjs +605 -0
- package/dist/chunk-7WLEQIHA.cjs.map +1 -0
- package/dist/{chunk-BQITNFQJ.js → chunk-AQVDAKXH.js} +3 -3
- package/dist/{chunk-BQITNFQJ.js.map → chunk-AQVDAKXH.js.map} +1 -1
- package/dist/{chunk-X6CNEA32.js → chunk-BUZWMDNL.js} +5 -5
- package/dist/{chunk-X6CNEA32.js.map → chunk-BUZWMDNL.js.map} +1 -1
- package/dist/{chunk-7M3NACL3.cjs → chunk-CKFBZ4LV.cjs} +4 -4
- package/dist/{chunk-7M3NACL3.cjs.map → chunk-CKFBZ4LV.cjs.map} +1 -1
- package/dist/{chunk-VBH7ZXSZ.js → chunk-CU3LPYNB.js} +5 -5
- package/dist/{chunk-VBH7ZXSZ.js.map → chunk-CU3LPYNB.js.map} +1 -1
- package/dist/{chunk-YJDSPA5E.js → chunk-EFZ4S22A.js} +11 -10
- package/dist/chunk-EFZ4S22A.js.map +1 -0
- package/dist/chunk-ELA3V6UN.js +601 -0
- package/dist/chunk-ELA3V6UN.js.map +1 -0
- package/dist/{chunk-2SL7OGPR.cjs → chunk-H6I36MGT.cjs} +1037 -887
- package/dist/chunk-H6I36MGT.cjs.map +1 -0
- package/dist/chunk-HAQVISUF.cjs +1098 -0
- package/dist/chunk-HAQVISUF.cjs.map +1 -0
- package/dist/{chunk-O5H62ZWJ.cjs → chunk-HP6LWBLB.cjs} +14 -2
- package/dist/chunk-HP6LWBLB.cjs.map +1 -0
- package/dist/{chunk-BKAKAVRW.cjs → chunk-HQRZEYYB.cjs} +44 -44
- package/dist/{chunk-BKAKAVRW.cjs.map → chunk-HQRZEYYB.cjs.map} +1 -1
- package/dist/{chunk-XD6X7O5R.js → chunk-I5CRUPKO.js} +9 -10
- package/dist/{chunk-XD6X7O5R.js.map → chunk-I5CRUPKO.js.map} +1 -1
- package/dist/{chunk-RQPRCEIO.js → chunk-JHK6NPFV.js} +218 -306
- package/dist/chunk-JHK6NPFV.js.map +1 -0
- package/dist/chunk-JZYMOHHM.cjs +226 -0
- package/dist/chunk-JZYMOHHM.cjs.map +1 -0
- package/dist/{chunk-CQC6VBAF.cjs → chunk-K4FB2RMO.cjs} +10 -10
- package/dist/{chunk-CQC6VBAF.cjs.map → chunk-K4FB2RMO.cjs.map} +1 -1
- package/dist/{chunk-ERZ4QPQX.js → chunk-K6CD6W5J.js} +5 -5
- package/dist/{chunk-ERZ4QPQX.js.map → chunk-K6CD6W5J.js.map} +1 -1
- package/dist/{chunk-LZ3TVJY4.cjs → chunk-KHNKYSGP.cjs} +34 -34
- package/dist/{chunk-LZ3TVJY4.cjs.map → chunk-KHNKYSGP.cjs.map} +1 -1
- package/dist/{chunk-CWX77JB4.cjs → chunk-KLR77R5A.cjs} +13 -13
- package/dist/{chunk-CWX77JB4.cjs.map → chunk-KLR77R5A.cjs.map} +1 -1
- package/dist/{chunk-AOL64O4Z.js → chunk-L3DDZUZP.js} +3 -3
- package/dist/{chunk-AOL64O4Z.js.map → chunk-L3DDZUZP.js.map} +1 -1
- package/dist/{chunk-PZHC5GCD.js → chunk-L5ET7FYQ.js} +3 -3
- package/dist/{chunk-PZHC5GCD.js.map → chunk-L5ET7FYQ.js.map} +1 -1
- package/dist/{chunk-B63IFHXR.cjs → chunk-LFFVD5ZR.cjs} +41 -41
- package/dist/{chunk-B63IFHXR.cjs.map → chunk-LFFVD5ZR.cjs.map} +1 -1
- package/dist/chunk-LL5D5T5W.cjs +157 -0
- package/dist/chunk-LL5D5T5W.cjs.map +1 -0
- package/dist/{chunk-GUUWKPTK.cjs → chunk-LLE25NRD.cjs} +7 -7
- package/dist/{chunk-GUUWKPTK.cjs.map → chunk-LLE25NRD.cjs.map} +1 -1
- package/dist/chunk-LLHMAHG4.cjs +886 -0
- package/dist/chunk-LLHMAHG4.cjs.map +1 -0
- package/dist/{chunk-ZHX4KEM7.cjs → chunk-M2RPZS7J.cjs} +10 -10
- package/dist/{chunk-ZHX4KEM7.cjs.map → chunk-M2RPZS7J.cjs.map} +1 -1
- package/dist/chunk-MNURF4RF.cjs +85 -0
- package/dist/chunk-MNURF4RF.cjs.map +1 -0
- package/dist/chunk-QOHTVDHU.js +144 -0
- package/dist/chunk-QOHTVDHU.js.map +1 -0
- package/dist/{chunk-7VLCN3JB.cjs → chunk-QXKVUJLI.cjs} +113 -112
- package/dist/chunk-QXKVUJLI.cjs.map +1 -0
- package/dist/{chunk-GNPGGLAE.cjs → chunk-QYDUCWD2.cjs} +4 -4
- package/dist/{chunk-GNPGGLAE.cjs.map → chunk-QYDUCWD2.cjs.map} +1 -1
- package/dist/{chunk-TE5ZA4VX.js → chunk-QZYGZVUI.js} +45 -41
- package/dist/chunk-QZYGZVUI.js.map +1 -0
- package/dist/{chunk-YLINFV7Z.cjs → chunk-SAMJLDGG.cjs} +114 -110
- package/dist/chunk-SAMJLDGG.cjs.map +1 -0
- package/dist/{chunk-DOVMTPKE.cjs → chunk-SE422RES.cjs} +27 -27
- package/dist/{chunk-DOVMTPKE.cjs.map → chunk-SE422RES.cjs.map} +1 -1
- package/dist/{chunk-NWYCOFEZ.cjs → chunk-UCHW2MGP.cjs} +332 -433
- package/dist/chunk-UCHW2MGP.cjs.map +1 -0
- package/dist/{chunk-XFY73JWD.cjs → chunk-UDS5DZNY.cjs} +498 -1098
- package/dist/chunk-UDS5DZNY.cjs.map +1 -0
- package/dist/{chunk-KFLXWVUJ.js → chunk-UUIBACKJ.js} +14 -3
- package/dist/chunk-UUIBACKJ.js.map +1 -0
- package/dist/{chunk-VDYA2HMS.js → chunk-VWEFXG73.js} +3 -3
- package/dist/{chunk-VDYA2HMS.js.map → chunk-VWEFXG73.js.map} +1 -1
- package/dist/{chunk-G32AO634.js → chunk-W66YCXWT.js} +464 -1048
- package/dist/chunk-W66YCXWT.js.map +1 -0
- package/dist/{chunk-E6YZRKMM.js → chunk-XMEYZYGE.js} +6 -6
- package/dist/{chunk-E6YZRKMM.js.map → chunk-XMEYZYGE.js.map} +1 -1
- package/dist/{chunk-G3CSQLLT.js → chunk-Y5UC3IXF.js} +461 -6
- package/dist/chunk-Y5UC3IXF.js.map +1 -0
- package/dist/{chunk-SDHV2MWU.js → chunk-YGX4PMG6.js} +5 -5
- package/dist/{chunk-SDHV2MWU.js.map → chunk-YGX4PMG6.js.map} +1 -1
- package/dist/{chunk-KCLZHYPU.cjs → chunk-YIX3BEBR.cjs} +86 -85
- package/dist/chunk-YIX3BEBR.cjs.map +1 -0
- package/dist/{chunk-X6RDQ5NB.cjs → chunk-YX3H63VV.cjs} +8 -2
- package/dist/chunk-YX3H63VV.cjs.map +1 -0
- package/dist/chunk-YYLMXERH.js +211 -0
- package/dist/chunk-YYLMXERH.js.map +1 -0
- package/dist/{chunk-6G5CQ6JX.js → chunk-ZE7E46IZ.js} +5 -5
- package/dist/{chunk-6G5CQ6JX.js.map → chunk-ZE7E46IZ.js.map} +1 -1
- package/dist/{chunk-Z2PPIVOO.js → chunk-ZVME6OSV.js} +5 -5
- package/dist/{chunk-Z2PPIVOO.js.map → chunk-ZVME6OSV.js.map} +1 -1
- package/dist/core/index.cjs +15 -3
- package/dist/core/index.d.cts +4 -3
- package/dist/core/index.d.ts +4 -3
- package/dist/core/index.js +2 -2
- package/dist/{ddl-Dx3Z0_WC.d.ts → ddl-BLEzHw6j.d.ts} +3 -3
- package/dist/{ddl-J6sDyABg.d.cts → ddl-KnCdF_le.d.cts} +3 -3
- package/dist/{define-graph-CzEvA_8F.d.cts → define-graph-Cv3CFwKm.d.cts} +1 -1
- package/dist/{define-graph-DRo9xpYN.d.ts → define-graph-DQnj3fNH.d.ts} +1 -1
- package/dist/graph-merge/index.cjs +40 -43
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +15 -9
- package/dist/graph-merge/index.d.ts +15 -9
- package/dist/graph-merge/index.js +19 -22
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/index.cjs +143 -119
- package/dist/index.d.cts +12 -10
- package/dist/index.d.ts +12 -10
- package/dist/index.js +23 -23
- package/dist/indexes/index.cjs +12 -14
- package/dist/indexes/index.d.cts +5 -5
- package/dist/indexes/index.d.ts +5 -5
- package/dist/indexes/index.js +5 -7
- package/dist/interchange/index.cjs +29 -30
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +6 -5
- package/dist/interchange/index.d.ts +6 -5
- package/dist/interchange/index.js +10 -11
- package/dist/interchange/index.js.map +1 -1
- package/dist/{manager-CASfhmzV.d.ts → manager-DjE6Mhag.d.ts} +2 -2
- package/dist/{manager-nCEJiYBb.d.cts → manager-mqee5MVB.d.cts} +2 -2
- package/dist/{postgres-DMgIKQU-.d.cts → postgres-Bm4DyFQU.d.cts} +100 -49
- package/dist/{postgres-Cl1ZAN1G.d.ts → postgres-DtaVALOZ.d.ts} +100 -49
- package/dist/profiler/index.d.cts +8 -7
- package/dist/profiler/index.d.ts +8 -7
- package/dist/provenance/index.cjs +20 -20
- package/dist/provenance/index.d.cts +6 -5
- package/dist/provenance/index.d.ts +6 -5
- package/dist/provenance/index.js +7 -7
- package/dist/schema/index.cjs +26 -28
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +5 -5
- package/dist/schema/index.d.ts +5 -5
- package/dist/schema/index.js +7 -9
- package/dist/schema/index.js.map +1 -1
- package/dist/{temporal-DqtOEo_B.d.ts → searchable-BxlJQVFw.d.cts} +3 -58
- package/dist/{temporal-BC_NQV5Y.d.cts → searchable-ChJ29MCd.d.ts} +3 -58
- package/dist/{sqlite-BDkW39aa.d.cts → sqlite-DT6tTHOG.d.cts} +124 -97
- package/dist/{sqlite-CYfhvESj.d.ts → sqlite-m9Izphk_.d.ts} +124 -97
- package/dist/{store-view-BoHqdHjB.d.cts → store-view-C-buB8Q8.d.cts} +46 -31
- package/dist/{store-view-Ctq-3OHy.d.ts → store-view-CagdeyNn.d.ts} +46 -31
- package/dist/temporal-CyFsSPe8.d.ts +73 -0
- package/dist/temporal-Dn_JADWY.d.cts +73 -0
- package/dist/{types-CUevi_D1.d.ts → types-CYdXzZef.d.ts} +1 -1
- package/dist/{types-COq3-vMC.d.cts → types-CqSfMRW3.d.cts} +1 -1
- package/dist/{where-C92TXCzT.d.cts → where-C3-HRgUq.d.cts} +1 -1
- package/dist/{where-BdE_cYtx.d.ts → where-sQL4u5h-.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-2SL7OGPR.cjs.map +0 -1
- package/dist/chunk-6XDBRDZE.js.map +0 -1
- package/dist/chunk-7VLCN3JB.cjs.map +0 -1
- package/dist/chunk-A2FGSWMQ.js.map +0 -1
- package/dist/chunk-DDCIXXOO.js +0 -9
- package/dist/chunk-DDCIXXOO.js.map +0 -1
- package/dist/chunk-DDCYVIVV.cjs +0 -44
- package/dist/chunk-DDCYVIVV.cjs.map +0 -1
- package/dist/chunk-EOJFGECD.cjs +0 -284
- package/dist/chunk-EOJFGECD.cjs.map +0 -1
- package/dist/chunk-FMNUSGZ4.cjs +0 -12
- package/dist/chunk-G32AO634.js.map +0 -1
- package/dist/chunk-G3CSQLLT.js.map +0 -1
- package/dist/chunk-I6FX7AAG.js +0 -39
- package/dist/chunk-I6FX7AAG.js.map +0 -1
- package/dist/chunk-J6IJARLG.js +0 -94
- package/dist/chunk-J6IJARLG.js.map +0 -1
- package/dist/chunk-KCLZHYPU.cjs.map +0 -1
- package/dist/chunk-KFLXWVUJ.js.map +0 -1
- package/dist/chunk-MTNEGGM2.js +0 -273
- package/dist/chunk-MTNEGGM2.js.map +0 -1
- package/dist/chunk-NU23DUSJ.cjs.map +0 -1
- package/dist/chunk-NWYCOFEZ.cjs.map +0 -1
- package/dist/chunk-O5H62ZWJ.cjs.map +0 -1
- package/dist/chunk-RQPRCEIO.js.map +0 -1
- package/dist/chunk-SVUKGWSN.cjs +0 -102
- package/dist/chunk-SVUKGWSN.cjs.map +0 -1
- package/dist/chunk-TE5ZA4VX.js.map +0 -1
- package/dist/chunk-UH2USOMG.cjs +0 -627
- package/dist/chunk-UH2USOMG.cjs.map +0 -1
- package/dist/chunk-UPXDVI3T.js.map +0 -1
- package/dist/chunk-X6RDQ5NB.cjs.map +0 -1
- package/dist/chunk-XFY73JWD.cjs.map +0 -1
- package/dist/chunk-Y7M44XEK.js +0 -462
- package/dist/chunk-Y7M44XEK.js.map +0 -1
- package/dist/chunk-YJDSPA5E.js.map +0 -1
- package/dist/chunk-YLINFV7Z.cjs.map +0 -1
- package/dist/chunk-Z5QHVL5U.cjs +0 -12
- package/dist/chunk-Z5QHVL5U.cjs.map +0 -1
- package/dist/chunk-ZKZAIX42.cjs +0 -479
- package/dist/chunk-ZKZAIX42.cjs.map +0 -1
- package/dist/{index-CrFL_ENI.d.cts → types-C5pZeKTl.d.cts} +1 -1
- package/dist/{index-Bq7vSPHy.d.ts → types-D8szWDUo.d.ts} +1 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { compareStrings, compareCodePoints } from './chunk-DRACN6XG.js';
|
|
2
|
-
import { createEdgeRowMapper, createNodeRowMapper, SQLITE_ROW_MAPPER_CONFIG, POSTGRES_ROW_MAPPER_CONFIG } from './chunk-
|
|
3
|
-
import { rowToNode, executeNodeBulkFindByIndex, executeNodeBulkFindByConstraint, executeNodeFindByConstraint, executeNodeBulkGetOrCreateByConstraint, executeNodeGetOrCreateByConstraint, executeNodeHardDelete, executeNodeDelete, nodeUpsertDirtyCheck, executeNodeUpsertUpdate, executeNodeUpdate, executeNodeCreateNoReturnBatch, executeNodeCreateBatch, executeNodeCreate, rowToEdge, runInWriteTransaction, checkCardinalityConstraint, runHookedWriteOperation, rowToNodeMeta, rowToEdgeMeta } from './chunk-
|
|
4
|
-
import { isParameterRef, fieldRef, buildFieldBuilderForTypeInfo, stringField, createFulltextAccessor, storeRuntime, CURRENT_READ_INSTANT_PLACEHOLDER,
|
|
2
|
+
import { createEdgeRowMapper, createNodeRowMapper, SQLITE_ROW_MAPPER_CONFIG, POSTGRES_ROW_MAPPER_CONFIG } from './chunk-L3DDZUZP.js';
|
|
3
|
+
import { rowToNode, executeNodeBulkFindByIndex, executeNodeBulkFindByConstraint, executeNodeFindByConstraint, executeNodeBulkGetOrCreateByConstraint, executeNodeGetOrCreateByConstraint, executeNodeHardDelete, executeNodeDelete, nodeUpsertDirtyCheck, executeNodeUpsertUpdate, executeNodeUpdate, executeNodeCreateNoReturnBatch, executeNodeCreateBatch, executeNodeCreate, rowToEdge, runInWriteTransaction, checkCardinalityConstraint, runHookedWriteOperation, rowToNodeMeta, rowToEdgeMeta } from './chunk-53BSOG3O.js';
|
|
4
|
+
import { isParameterRef, fieldRef, buildFieldBuilderForTypeInfo, stringField, createFulltextAccessor, storeRuntime, CURRENT_READ_INSTANT_PLACEHOLDER, withPinnedReadInstant, STORE_RUNTIME, assertRevisionTrackableBackend, createRecordedBackend, readRecordedClock, ensureRevisionOrigin, TRANSACTION_RUNTIME, withRecordedFlushObserver, recordedCaptureRequiresCallbackTransactionError, assertRecordedCaptureTransactionIsolation, createRecordedTransactionScope, lockRecordedGraphWrite, generateId, createGraphBackendProjection, assertCurrentRecordedSchema, baseField, objectField, arrayField, dateField, numberField, computeFulltextContent, AUTO_REFRESH_STATISTICS_ROW_THRESHOLD, advanceRevisionClock, runInsertBatch, edgeInsertDispatch, runInsertBatchReturning, projectBackendMembers, sqlValueList, getEmbeddingFields, getNodeRowsByIds, getEdgeRowsByIds, compileKindFilter, currentReadInstant, compileTemporalFilter, validateEdgeEndpoints, buildPredicateIndex, compileFieldValue, recordedBindParamBudget, extractVectorSimilarityPredicates, extractFulltextMatchPredicates, currentReadInstantFor, extractTemporalOptions, compilePredicateExpression, getPredicatesForAlias, getFieldPointer, getNodeKindsForAlias, getHybridTargetAlias, closeRecordedHardDeletedKind, throwHistoryUnsafeSqlAccess, throwRevisionTrackingUnsafeSqlAccess, compilePredicateClauses } from './chunk-JHK6NPFV.js';
|
|
5
5
|
import { chunk } from './chunk-35S6P5ZU.js';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { DEFAULT_SQL_SCHEMA, requireSqlSchema, recordedReadSchemaFor, createSqlSchema, requireExternalRecordedReadSource, createRecordedReadBinding, vectorSlotKey, recordedReadSqlSchema, requireRecordedReadBinding, ALIAS_CTE_PREFIX, EMBEDDINGS_CTE_ALIAS, FULLTEXT_CTE_ALIAS, HYBRID_CANDIDATES_CTE_ALIAS } from './chunk-YYLMXERH.js';
|
|
7
|
+
import { runOptionallyInTransaction, createTransactionReadBackend, rowPropsToObject, createBackendOverlay, INTERNAL_TEMPORARY_WRITES } from './chunk-L5ET7FYQ.js';
|
|
8
|
+
import { resolveReadCoordinate, withRecordedCoordinate, describeCoordinate, coordinateContext, recordedInstantWallTime, asRecordedInstant, assertValidRecordedInstant } from './chunk-QOHTVDHU.js';
|
|
9
|
+
import { loadAndMergeGraphExtensionDocument, ensureSchema, loadAndVerifyGraph, buildKindRegistry, mergeGraphExtension, commitNewSchemaVersion, applyDeprecatedKinds, loadActiveSchemaWithBootstrap, parseSerializedSchema, extensionKindNames, serializeSchemaProperties, buildGraphExtensionOntologyKeySet, compileTimeOntologyKey, serializeIndexDeclaration } from './chunk-CU3LPYNB.js';
|
|
9
10
|
import { getTypeName } from './chunk-76HE7DJP.js';
|
|
10
11
|
import { validateEdgeProps } from './chunk-ZE6NVENI.js';
|
|
11
12
|
import { canonicalEqual, sortedReplacer } from './chunk-UR7W5YQK.js';
|
|
12
|
-
import { withRecordedRelationsPrecondition, isMissingTableError } from './chunk-
|
|
13
|
+
import { withRecordedRelationsPrecondition, isMissingTableError } from './chunk-UUIBACKJ.js';
|
|
13
14
|
import { isKnownKind } from './chunk-PH4IJ3V5.js';
|
|
14
|
-
import { nowIso, validateOptionalCanonicalIsoDate } from './chunk-
|
|
15
|
-
import { generateIndexDDL } from './chunk-
|
|
16
|
-
import { SYSTEM_INDEX_DECLARATIONS, resolveSystemIndexTableName, systemIndexName, resolveSystemIndexNames, generateSystemIndexDDL } from './chunk-
|
|
17
|
-
import { NODE_META_KEYS, EDGE_META_KEYS } from './chunk-
|
|
15
|
+
import { nowIso, validateOptionalCanonicalIsoDate } from './chunk-3SHAUJRB.js';
|
|
16
|
+
import { generateIndexDDL } from './chunk-2I3DNNBU.js';
|
|
17
|
+
import { SYSTEM_INDEX_DECLARATIONS, resolveSystemIndexTableName, systemIndexName, resolveSystemIndexNames, generateSystemIndexDDL } from './chunk-AQVDAKXH.js';
|
|
18
|
+
import { NODE_META_KEYS, EDGE_META_KEYS } from './chunk-VWEFXG73.js';
|
|
18
19
|
import { sha256Hex, fnv1aBase36 } from './chunk-K34OPSJK.js';
|
|
19
20
|
import { DEFAULT_PAGINATION_LIMIT, DEFAULT_STREAM_BATCH_SIZE, SQLITE_PATH_DELIMITER, PG_ARRAY_START, PG_ARRAY_END, PG_PATH_ELEMENT_SEPARATOR, MAX_PG_IDENTIFIER_LENGTH } from './chunk-2EBMPJBO.js';
|
|
20
|
-
import { getDialect } from './chunk-
|
|
21
|
-
import {
|
|
22
|
-
import { isSqlPlaceholder, bindSqlValue, markAnnIndexScan, asCompiledSelectSql, isRawExecutable, annIndexScanTypes, sql, asCompiledRowsSql, markForceCustomPlan, asCompiledTemporaryStatementSql, asCompiledStatementSql } from './chunk-6XDBRDZE.js';
|
|
21
|
+
import { getDialect, assertVectorMinScore, vectorScoreExpression, vectorMinScoreCondition } from './chunk-Y5UC3IXF.js';
|
|
22
|
+
import { isSqlPlaceholder, bindSqlValue, markAnnIndexScan, asCompiledSelectSql, isRawExecutable, annIndexScanTypes, sql, asCompiledRowsSql, markForceCustomPlan, asCompiledTemporaryStatementSql, asCompiledStatementSql } from './chunk-6N7QBIWN.js';
|
|
23
23
|
import { createSchemaIntrospector } from './chunk-D7PG5D5K.js';
|
|
24
24
|
import { requireDefined, isPresent } from './chunk-QMQLUA66.js';
|
|
25
25
|
import { getSearchableFields, resolveEmbeddingFields, resolveGraphVectorSlots, resolveDeclaredFulltextLanguage } from './chunk-PC2UBAUB.js';
|
|
@@ -183,7 +183,7 @@ function createBatchReadRefusal(entity, method, coordinate) {
|
|
|
183
183
|
function createRecordedUnsupportedRefusal(entity, method, coordinate) {
|
|
184
184
|
return () => Promise.reject(
|
|
185
185
|
new ConfigurationError(
|
|
186
|
-
`'${method}' is not available on a RecordedStoreView (${describeCoordinate(coordinate)}). Recorded-time reads are reconstructing reads; this view exposes only query, subgraph, graph algorithms, and
|
|
186
|
+
`'${method}' is not available on a RecordedStoreView (${describeCoordinate(coordinate)}). Recorded-time reads are reconstructing reads; this view exposes only query, subgraph, graph algorithms, and collection getById/getByIds/scan reads.`,
|
|
187
187
|
{
|
|
188
188
|
code: "RECORDED_STORE_VIEW_UNSUPPORTED",
|
|
189
189
|
entity,
|
|
@@ -314,14 +314,16 @@ function pinnedEdgeCollectionsFor(store, coordinate, wrap) {
|
|
|
314
314
|
function recordedNodeCollection(store, kind, live, coordinate) {
|
|
315
315
|
const reads = {
|
|
316
316
|
getById: (id) => storeRuntime(store).recordedNodeGetById(kind, id, coordinate),
|
|
317
|
-
getByIds: (ids) => storeRuntime(store).recordedNodeGetByIds(kind, ids, coordinate)
|
|
317
|
+
getByIds: (ids) => storeRuntime(store).recordedNodeGetByIds(kind, ids, coordinate),
|
|
318
|
+
scan: (options) => storeRuntime(store).recordedNodeScan(kind, coordinate, options)
|
|
318
319
|
};
|
|
319
320
|
return recordedCollectionProxy(reads, live, coordinate, "node");
|
|
320
321
|
}
|
|
321
322
|
function recordedEdgeCollection(store, kind, live, coordinate) {
|
|
322
323
|
const reads = {
|
|
323
324
|
getById: (id) => storeRuntime(store).recordedEdgeGetById(kind, id, coordinate),
|
|
324
|
-
getByIds: (ids) => storeRuntime(store).recordedEdgeGetByIds(kind, ids, coordinate)
|
|
325
|
+
getByIds: (ids) => storeRuntime(store).recordedEdgeGetByIds(kind, ids, coordinate),
|
|
326
|
+
scan: (options) => storeRuntime(store).recordedEdgeScan(kind, coordinate, options)
|
|
325
327
|
};
|
|
326
328
|
return recordedCollectionProxy(reads, live, coordinate, "edge");
|
|
327
329
|
}
|
|
@@ -608,7 +610,7 @@ var RecordedStoreView = class extends CoordinatePinnedView {
|
|
|
608
610
|
}
|
|
609
611
|
});
|
|
610
612
|
}
|
|
611
|
-
/** The recorded/system-time
|
|
613
|
+
/** The recorded/system-time anchor this view reconstructs. */
|
|
612
614
|
get asOfRecorded() {
|
|
613
615
|
const recorded = this.coordinate.recorded;
|
|
614
616
|
if (recorded === void 0) {
|
|
@@ -619,7 +621,7 @@ var RecordedStoreView = class extends CoordinatePinnedView {
|
|
|
619
621
|
}
|
|
620
622
|
return recorded.asOf;
|
|
621
623
|
}
|
|
622
|
-
/** Recorded-time node
|
|
624
|
+
/** Recorded-time node reconstructing-read collections. */
|
|
623
625
|
get nodes() {
|
|
624
626
|
this.#nodes ??= pinnedNodeCollectionsFor(
|
|
625
627
|
this.store,
|
|
@@ -628,7 +630,7 @@ var RecordedStoreView = class extends CoordinatePinnedView {
|
|
|
628
630
|
);
|
|
629
631
|
return this.#nodes;
|
|
630
632
|
}
|
|
631
|
-
/** Recorded-time edge
|
|
633
|
+
/** Recorded-time edge reconstructing-read collections. */
|
|
632
634
|
get edges() {
|
|
633
635
|
this.#edges ??= pinnedEdgeCollectionsFor(
|
|
634
636
|
this.store,
|
|
@@ -16352,6 +16354,7 @@ async function executeEdgeBulkGetOrCreateByEndpoints(ctx, kind, items, backend,
|
|
|
16352
16354
|
|
|
16353
16355
|
// src/store/recorded-read-service.ts
|
|
16354
16356
|
var RECORDED_POINT_READ_FIXED_BIND_PARAMS = 8;
|
|
16357
|
+
var RECORDED_SCAN_LIMIT = 1e3;
|
|
16355
16358
|
function recordedPointReadIdChunk(backend) {
|
|
16356
16359
|
const budget = recordedBindParamBudget(backend);
|
|
16357
16360
|
return Math.max(1, budget - RECORDED_POINT_READ_FIXED_BIND_PARAMS);
|
|
@@ -16396,7 +16399,7 @@ function recordedTemporalFilter(backend, coordinate, tableAlias) {
|
|
|
16396
16399
|
}
|
|
16397
16400
|
function recordedRelationInvariantError(params) {
|
|
16398
16401
|
return new ConfigurationError(
|
|
16399
|
-
"Recorded relation invariant violation: more than one recorded row matched the requested
|
|
16402
|
+
"Recorded relation invariant violation: more than one recorded row matched the requested read.",
|
|
16400
16403
|
{
|
|
16401
16404
|
code: "RECORDED_RELATION_INVARIANT_VIOLATION",
|
|
16402
16405
|
graphId: params.graphId,
|
|
@@ -16412,6 +16415,57 @@ function recordedRelationInvariantError(params) {
|
|
|
16412
16415
|
}
|
|
16413
16416
|
);
|
|
16414
16417
|
}
|
|
16418
|
+
function validateRecordedScanLimit(limit) {
|
|
16419
|
+
if (limit === void 0) return RECORDED_SCAN_LIMIT;
|
|
16420
|
+
if (!Number.isInteger(limit) || limit <= 0 || limit > RECORDED_SCAN_LIMIT) {
|
|
16421
|
+
throw new ValidationError(
|
|
16422
|
+
`Recorded scan limit must be an integer between 1 and ${RECORDED_SCAN_LIMIT}, got: ${String(limit)}`,
|
|
16423
|
+
{
|
|
16424
|
+
issues: [
|
|
16425
|
+
{
|
|
16426
|
+
path: "limit",
|
|
16427
|
+
message: `Must be an integer between 1 and ${RECORDED_SCAN_LIMIT}.`
|
|
16428
|
+
}
|
|
16429
|
+
]
|
|
16430
|
+
}
|
|
16431
|
+
);
|
|
16432
|
+
}
|
|
16433
|
+
return limit;
|
|
16434
|
+
}
|
|
16435
|
+
function recordedScanCursorScope(graphId, entity, kind, coordinate) {
|
|
16436
|
+
return JSON.stringify([
|
|
16437
|
+
"recorded-scan",
|
|
16438
|
+
graphId,
|
|
16439
|
+
entity,
|
|
16440
|
+
kind,
|
|
16441
|
+
coordinate.valid.mode,
|
|
16442
|
+
coordinate.valid.asOf,
|
|
16443
|
+
coordinate.recorded?.asOf
|
|
16444
|
+
]);
|
|
16445
|
+
}
|
|
16446
|
+
function invalidRecordedScanCursor() {
|
|
16447
|
+
return new ValidationError(
|
|
16448
|
+
"Recorded scan cursor does not match this graph, collection, or temporal coordinate.",
|
|
16449
|
+
{
|
|
16450
|
+
issues: [
|
|
16451
|
+
{
|
|
16452
|
+
path: "after",
|
|
16453
|
+
message: "Use a cursor returned by the same recorded collection scan."
|
|
16454
|
+
}
|
|
16455
|
+
]
|
|
16456
|
+
}
|
|
16457
|
+
);
|
|
16458
|
+
}
|
|
16459
|
+
function decodeRecordedScanCursor(cursor, expectedScope) {
|
|
16460
|
+
const decoded = decodeCursor(cursor);
|
|
16461
|
+
if (decoded.d !== "f" || decoded.cols.length !== 1 || decoded.cols[0] !== expectedScope || decoded.vals.length !== 1 || typeof decoded.vals[0] !== "string") {
|
|
16462
|
+
throw invalidRecordedScanCursor();
|
|
16463
|
+
}
|
|
16464
|
+
return decoded.vals[0];
|
|
16465
|
+
}
|
|
16466
|
+
function encodeRecordedScanCursor(id, scope) {
|
|
16467
|
+
return encodeCursor({ v: 1, d: "f", vals: [id], cols: [scope] });
|
|
16468
|
+
}
|
|
16415
16469
|
function createRecordedReadService(params) {
|
|
16416
16470
|
const {
|
|
16417
16471
|
graphId,
|
|
@@ -16421,6 +16475,11 @@ function createRecordedReadService(params) {
|
|
|
16421
16475
|
mapRecordedEdgeRow
|
|
16422
16476
|
} = params;
|
|
16423
16477
|
const recordedSchema = recordedReadBinding === void 0 ? void 0 : recordedReadSqlSchema(recordedReadBinding);
|
|
16478
|
+
function schemaForRecordedRead(surface) {
|
|
16479
|
+
return recordedSchema ?? recordedReadSqlSchema(
|
|
16480
|
+
requireRecordedReadBinding(recordedReadBinding, surface)
|
|
16481
|
+
);
|
|
16482
|
+
}
|
|
16424
16483
|
async function recordedGetByIds(read) {
|
|
16425
16484
|
const { table, alias, kind, ids, coordinate, toEntity, entity } = read;
|
|
16426
16485
|
if (ids.length === 0) return [];
|
|
@@ -16463,10 +16522,51 @@ function createRecordedReadService(params) {
|
|
|
16463
16522
|
}
|
|
16464
16523
|
return ids.map((id) => byId.get(id));
|
|
16465
16524
|
}
|
|
16525
|
+
async function recordedScan(scan) {
|
|
16526
|
+
const { table, alias, kind, coordinate, options, toEntity, entity } = scan;
|
|
16527
|
+
const limit = validateRecordedScanLimit(options?.limit);
|
|
16528
|
+
const scope = recordedScanCursorScope(graphId, entity, kind, coordinate);
|
|
16529
|
+
const after = options?.after === void 0 ? void 0 : decodeRecordedScanCursor(options.after, scope);
|
|
16530
|
+
const aliasSql = sql.raw(alias);
|
|
16531
|
+
const temporalFilter = recordedTemporalFilter(backend, coordinate, alias);
|
|
16532
|
+
const rows = await withRelationsPrecondition(
|
|
16533
|
+
backend,
|
|
16534
|
+
backend.execute(
|
|
16535
|
+
asCompiledRowsSql(sql`
|
|
16536
|
+
SELECT * FROM ${table} ${aliasSql}
|
|
16537
|
+
WHERE ${aliasSql}.graph_id = ${graphId}
|
|
16538
|
+
AND ${aliasSql}.kind = ${kind}
|
|
16539
|
+
${after === void 0 ? sql.raw("") : sql`AND ${aliasSql}.id > ${after}`}
|
|
16540
|
+
AND ${temporalFilter}
|
|
16541
|
+
ORDER BY ${aliasSql}.id ASC, ${aliasSql}.recorded_from ASC
|
|
16542
|
+
LIMIT ${limit + 1}
|
|
16543
|
+
`)
|
|
16544
|
+
),
|
|
16545
|
+
"recorded-scan"
|
|
16546
|
+
);
|
|
16547
|
+
const entities = rows.map((row) => toEntity(row));
|
|
16548
|
+
for (let index = 1; index < entities.length; index += 1) {
|
|
16549
|
+
const previous = requireDefined(entities[index - 1]);
|
|
16550
|
+
const current = requireDefined(entities[index]);
|
|
16551
|
+
if (previous.id !== current.id) continue;
|
|
16552
|
+
throw recordedRelationInvariantError({
|
|
16553
|
+
graphId,
|
|
16554
|
+
entity,
|
|
16555
|
+
kind,
|
|
16556
|
+
id: current.id,
|
|
16557
|
+
coordinate
|
|
16558
|
+
});
|
|
16559
|
+
}
|
|
16560
|
+
const hasNextPage = entities.length > limit;
|
|
16561
|
+
const data = hasNextPage ? entities.slice(0, limit) : entities;
|
|
16562
|
+
return {
|
|
16563
|
+
data,
|
|
16564
|
+
nextCursor: hasNextPage ? encodeRecordedScanCursor(requireDefined(data.at(-1)).id, scope) : void 0,
|
|
16565
|
+
hasNextPage
|
|
16566
|
+
};
|
|
16567
|
+
}
|
|
16466
16568
|
function nodeGetByIds(kind, ids, coordinate) {
|
|
16467
|
-
const schema =
|
|
16468
|
-
requireRecordedReadBinding(recordedReadBinding, "recorded-point-read")
|
|
16469
|
-
);
|
|
16569
|
+
const schema = schemaForRecordedRead("recorded-point-read");
|
|
16470
16570
|
return recordedGetByIds({
|
|
16471
16571
|
entity: "node",
|
|
16472
16572
|
table: schema.nodesTable,
|
|
@@ -16478,9 +16578,7 @@ function createRecordedReadService(params) {
|
|
|
16478
16578
|
});
|
|
16479
16579
|
}
|
|
16480
16580
|
function edgeGetByIds(kind, ids, coordinate) {
|
|
16481
|
-
const schema =
|
|
16482
|
-
requireRecordedReadBinding(recordedReadBinding, "recorded-point-read")
|
|
16483
|
-
);
|
|
16581
|
+
const schema = schemaForRecordedRead("recorded-point-read");
|
|
16484
16582
|
return recordedGetByIds({
|
|
16485
16583
|
entity: "edge",
|
|
16486
16584
|
table: schema.edgesTable,
|
|
@@ -16491,6 +16589,30 @@ function createRecordedReadService(params) {
|
|
|
16491
16589
|
toEntity: (row) => rowToEdge(mapRecordedEdgeRow(row))
|
|
16492
16590
|
});
|
|
16493
16591
|
}
|
|
16592
|
+
function nodeScan(kind, coordinate, options) {
|
|
16593
|
+
const schema = schemaForRecordedRead("recorded-scan");
|
|
16594
|
+
return recordedScan({
|
|
16595
|
+
entity: "node",
|
|
16596
|
+
table: schema.nodesTable,
|
|
16597
|
+
alias: "n",
|
|
16598
|
+
kind,
|
|
16599
|
+
coordinate,
|
|
16600
|
+
options,
|
|
16601
|
+
toEntity: (row) => rowToNode(mapRecordedNodeRow(row))
|
|
16602
|
+
});
|
|
16603
|
+
}
|
|
16604
|
+
function edgeScan(kind, coordinate, options) {
|
|
16605
|
+
const schema = schemaForRecordedRead("recorded-scan");
|
|
16606
|
+
return recordedScan({
|
|
16607
|
+
entity: "edge",
|
|
16608
|
+
table: schema.edgesTable,
|
|
16609
|
+
alias: "e",
|
|
16610
|
+
kind,
|
|
16611
|
+
coordinate,
|
|
16612
|
+
options,
|
|
16613
|
+
toEntity: (row) => rowToEdge(mapRecordedEdgeRow(row))
|
|
16614
|
+
});
|
|
16615
|
+
}
|
|
16494
16616
|
return {
|
|
16495
16617
|
backendForCoordinate(coordinate, surface) {
|
|
16496
16618
|
if (coordinate.recorded === void 0) return backend;
|
|
@@ -16502,11 +16624,13 @@ function createRecordedReadService(params) {
|
|
|
16502
16624
|
return results[0];
|
|
16503
16625
|
},
|
|
16504
16626
|
nodeGetByIds,
|
|
16627
|
+
nodeScan,
|
|
16505
16628
|
async edgeGetById(kind, id, coordinate) {
|
|
16506
16629
|
const results = await edgeGetByIds(kind, [id], coordinate);
|
|
16507
16630
|
return results[0];
|
|
16508
16631
|
},
|
|
16509
|
-
edgeGetByIds
|
|
16632
|
+
edgeGetByIds,
|
|
16633
|
+
edgeScan
|
|
16510
16634
|
};
|
|
16511
16635
|
}
|
|
16512
16636
|
|
|
@@ -16732,6 +16856,13 @@ function overlayPropertyDescriptors(base, overlay) {
|
|
|
16732
16856
|
...Object.getOwnPropertyDescriptors(overlay)
|
|
16733
16857
|
});
|
|
16734
16858
|
}
|
|
16859
|
+
function defineUnavailableSqlGuard(context, guard) {
|
|
16860
|
+
Object.defineProperty(context, "sql", {
|
|
16861
|
+
configurable: false,
|
|
16862
|
+
enumerable: true,
|
|
16863
|
+
get: guard
|
|
16864
|
+
});
|
|
16865
|
+
}
|
|
16735
16866
|
function syncStoreReplacementRef(ref, replacement) {
|
|
16736
16867
|
if (ref === void 0) return;
|
|
16737
16868
|
ref.current = replacement;
|
|
@@ -16810,8 +16941,10 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
16810
16941
|
sealedQuery: (coordinate) => this.sealedQuery(coordinate),
|
|
16811
16942
|
recordedNodeGetById: (kind, id, coordinate) => this.recordedNodeGetById(kind, id, coordinate),
|
|
16812
16943
|
recordedNodeGetByIds: (kind, ids, coordinate) => this.recordedNodeGetByIds(kind, ids, coordinate),
|
|
16944
|
+
recordedNodeScan: (kind, coordinate, options2) => this.recordedNodeScan(kind, coordinate, options2),
|
|
16813
16945
|
recordedEdgeGetById: (kind, id, coordinate) => this.recordedEdgeGetById(kind, id, coordinate),
|
|
16814
16946
|
recordedEdgeGetByIds: (kind, ids, coordinate) => this.recordedEdgeGetByIds(kind, ids, coordinate),
|
|
16947
|
+
recordedEdgeScan: (kind, coordinate, options2) => this.recordedEdgeScan(kind, coordinate, options2),
|
|
16815
16948
|
subgraphAtCoordinate: (rootId, subgraphOptions) => this.subgraphAtCoordinate(rootId, subgraphOptions),
|
|
16816
16949
|
algorithmsAtCoordinate: (coordinate) => this.algorithmsAtCoordinate(coordinate)
|
|
16817
16950
|
};
|
|
@@ -17287,6 +17420,10 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
17287
17420
|
async recordedNodeGetByIds(kind, ids, coordinate) {
|
|
17288
17421
|
return this.#recordedReads.nodeGetByIds(kind, ids, coordinate);
|
|
17289
17422
|
}
|
|
17423
|
+
/** @internal Bounded recorded-time node enumeration for RecordedStoreView. */
|
|
17424
|
+
async recordedNodeScan(kind, coordinate, options) {
|
|
17425
|
+
return this.#recordedReads.nodeScan(kind, coordinate, options);
|
|
17426
|
+
}
|
|
17290
17427
|
/**
|
|
17291
17428
|
* Internal seam for {@link RecordedStoreView}: reconstruct an edge point read
|
|
17292
17429
|
* from the recorded-time relation while preserving live getById behavior.
|
|
@@ -17305,6 +17442,10 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
17305
17442
|
async recordedEdgeGetByIds(kind, ids, coordinate) {
|
|
17306
17443
|
return this.#recordedReads.edgeGetByIds(kind, ids, coordinate);
|
|
17307
17444
|
}
|
|
17445
|
+
/** @internal Bounded recorded-time edge enumeration for RecordedStoreView. */
|
|
17446
|
+
async recordedEdgeScan(kind, coordinate, options) {
|
|
17447
|
+
return this.#recordedReads.edgeScan(kind, coordinate, options);
|
|
17448
|
+
}
|
|
17308
17449
|
// === Temporal Views ===
|
|
17309
17450
|
/**
|
|
17310
17451
|
* Returns a read-only {@link StoreView} pinned to a valid-time instant.
|
|
@@ -17335,22 +17476,24 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
17335
17476
|
* Returns a narrow read-only view pinned to a recorded/system-time instant.
|
|
17336
17477
|
*
|
|
17337
17478
|
* Direct `store.asOfRecorded(T)` is diagonal bitemporal sugar: it reads the
|
|
17338
|
-
* recorded-time relation
|
|
17339
|
-
*
|
|
17340
|
-
*
|
|
17479
|
+
* recorded-time relation at the anchor's logical revision and uses the
|
|
17480
|
+
* anchor's wall-time component for the valid-time axis. Use
|
|
17481
|
+
* `store.asOf(validT).asOfRecorded(recordedT)` when the valid and recorded
|
|
17482
|
+
* axes should differ.
|
|
17341
17483
|
*
|
|
17342
17484
|
* The returned view exposes only reconstructing-safe reads: query,
|
|
17343
17485
|
* subgraph, graph algorithms, and collection point reads.
|
|
17344
17486
|
*
|
|
17345
|
-
* Prefer `await store.recordedNow()`
|
|
17346
|
-
*
|
|
17347
|
-
* wall
|
|
17348
|
-
*
|
|
17487
|
+
* Prefer `await store.recordedNow()` over a wall-clock timestamp. The anchor
|
|
17488
|
+
* carries both the graph's strict logical revision and a non-decreasing
|
|
17489
|
+
* physical wall-time high-water mark, so several commits in one millisecond
|
|
17490
|
+
* remain independently addressable without manufacturing timestamp
|
|
17491
|
+
* increments.
|
|
17349
17492
|
*/
|
|
17350
17493
|
asOfRecorded(recordedAsOf) {
|
|
17351
17494
|
const validCoordinate = resolveReadCoordinate(
|
|
17352
17495
|
"asOf",
|
|
17353
|
-
recordedAsOf,
|
|
17496
|
+
recordedInstantWallTime(recordedAsOf),
|
|
17354
17497
|
"Use await store.recordedNow() as the anchor, or asRecordedInstant(value) only for an instant previously read from recordedNow()."
|
|
17355
17498
|
);
|
|
17356
17499
|
return new RecordedStoreView(
|
|
@@ -17362,9 +17505,10 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
17362
17505
|
* Returns the latest recorded-time instant captured for this graph — the
|
|
17363
17506
|
* recorded high-water mark. After guarding the `undefined` case,
|
|
17364
17507
|
* `store.asOfRecorded(checkpoint)` reconstructs everything committed so far, a
|
|
17365
|
-
* deterministic anchor that avoids guessing with the wall clock
|
|
17366
|
-
*
|
|
17367
|
-
*
|
|
17508
|
+
* deterministic anchor that avoids guessing with the wall clock. Its logical
|
|
17509
|
+
* revision is strictly monotonic per graph while its timestamp is a
|
|
17510
|
+
* non-decreasing physical wall-time high-water mark. Capture each anchor right
|
|
17511
|
+
* after the writes it should cover.
|
|
17368
17512
|
*
|
|
17369
17513
|
* Returns `undefined` until the first write has been captured, so on a
|
|
17370
17514
|
* brand-new graph guard the composition — `asOfRecorded(undefined)` rejects
|
|
@@ -17950,19 +18094,18 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
17950
18094
|
if (this.#captureEnabled) {
|
|
17951
18095
|
withSql = {
|
|
17952
18096
|
...base,
|
|
17953
|
-
sqlAvailability: "history"
|
|
17954
|
-
get sql() {
|
|
17955
|
-
return throwHistoryUnsafeSqlAccess();
|
|
17956
|
-
}
|
|
18097
|
+
sqlAvailability: "history"
|
|
17957
18098
|
};
|
|
18099
|
+
defineUnavailableSqlGuard(withSql, () => throwHistoryUnsafeSqlAccess());
|
|
17958
18100
|
} else if (this.#revisionTrackingEnabled) {
|
|
17959
18101
|
withSql = {
|
|
17960
18102
|
...base,
|
|
17961
|
-
sqlAvailability: "revisionTracking"
|
|
17962
|
-
get sql() {
|
|
17963
|
-
return throwRevisionTrackingUnsafeSqlAccess();
|
|
17964
|
-
}
|
|
18103
|
+
sqlAvailability: "revisionTracking"
|
|
17965
18104
|
};
|
|
18105
|
+
defineUnavailableSqlGuard(
|
|
18106
|
+
withSql,
|
|
18107
|
+
() => throwRevisionTrackingUnsafeSqlAccess()
|
|
18108
|
+
);
|
|
17966
18109
|
} else if (sql2 === void 0) {
|
|
17967
18110
|
withSql = { ...base, sqlAvailability: "unavailable" };
|
|
17968
18111
|
} else {
|
|
@@ -18956,6 +19099,11 @@ async function createStoreWithSchema(graph, backend, options) {
|
|
|
18956
19099
|
prepared.result
|
|
18957
19100
|
];
|
|
18958
19101
|
}
|
|
19102
|
+
async function assertHistorySchemaOnOpen(backend, options) {
|
|
19103
|
+
if (options?.history !== true) return;
|
|
19104
|
+
const schema = options.schema === void 0 ? createSqlSchema(backend.tableNames) : requireSqlSchema(options.schema, "store schema");
|
|
19105
|
+
await assertCurrentRecordedSchema(backend, schema);
|
|
19106
|
+
}
|
|
18959
19107
|
async function prepareStoreWithSchema(graph, backend, options) {
|
|
18960
19108
|
const {
|
|
18961
19109
|
graph: merged,
|
|
@@ -18966,6 +19114,7 @@ async function prepareStoreWithSchema(graph, backend, options) {
|
|
|
18966
19114
|
...options,
|
|
18967
19115
|
preloaded: { activeRow, storedSchema }
|
|
18968
19116
|
});
|
|
19117
|
+
await assertHistorySchemaOnOpen(backend, options);
|
|
18969
19118
|
await materializeRuntimeContributions(backend, merged.id);
|
|
18970
19119
|
await materializeVectorContributions(backend, merged);
|
|
18971
19120
|
if (options?.systemIndexes !== "skip") {
|
|
@@ -19016,7 +19165,7 @@ async function materializeSystemIndexesOnBoot(backend, graphId, result) {
|
|
|
19016
19165
|
}
|
|
19017
19166
|
}
|
|
19018
19167
|
async function createVerifiedStore(graph, backend, options) {
|
|
19019
|
-
const prepared = await prepareVerifiedStore(graph, backend);
|
|
19168
|
+
const prepared = await prepareVerifiedStore(graph, backend, options);
|
|
19020
19169
|
return [
|
|
19021
19170
|
new StoreImplementation(
|
|
19022
19171
|
prepared.graph,
|
|
@@ -19027,12 +19176,13 @@ async function createVerifiedStore(graph, backend, options) {
|
|
|
19027
19176
|
prepared.result
|
|
19028
19177
|
];
|
|
19029
19178
|
}
|
|
19030
|
-
async function prepareVerifiedStore(graph, backend) {
|
|
19179
|
+
async function prepareVerifiedStore(graph, backend, options) {
|
|
19031
19180
|
const {
|
|
19032
19181
|
graph: merged,
|
|
19033
19182
|
activeRow,
|
|
19034
19183
|
result
|
|
19035
19184
|
} = await loadAndVerifyGraph(backend, graph);
|
|
19185
|
+
await assertHistorySchemaOnOpen(backend, options);
|
|
19036
19186
|
return {
|
|
19037
19187
|
graph: merged,
|
|
19038
19188
|
result,
|
|
@@ -19040,7 +19190,7 @@ async function prepareVerifiedStore(graph, backend) {
|
|
|
19040
19190
|
};
|
|
19041
19191
|
}
|
|
19042
19192
|
async function createVerifiedAdapterStore(graph, backend, options) {
|
|
19043
|
-
const prepared = await prepareVerifiedStore(graph, backend);
|
|
19193
|
+
const prepared = await prepareVerifiedStore(graph, backend, options);
|
|
19044
19194
|
return [
|
|
19045
19195
|
asAdapterStoreSurface(
|
|
19046
19196
|
new AdapterStoreImplementation(
|
|
@@ -19055,5 +19205,5 @@ async function createVerifiedAdapterStore(graph, backend, options) {
|
|
|
19055
19205
|
}
|
|
19056
19206
|
|
|
19057
19207
|
export { ExecutableAggregateQuery, ExecutableQuery, MAX_EXPLICIT_RECURSIVE_DEPTH, MAX_RECURSIVE_DEPTH, PreparedQuery, QueryBuilder, RecordedStoreView, StoreSearch, StoreView, UnionableQuery, avg, composeFragments, count, countDistinct, countDistinctEdges, countEdges, createAdapterStore, createAdapterStoreWithSchema, createFragment, createQueryBuilder, createStore, createStoreWithSchema, createVerifiedAdapterStore, createVerifiedStore, defineSubgraphProject, field, having, havingEq, havingGt, havingGte, havingLt, havingLte, limitFragment, max, min, offsetFragment, orderByFragment, sum };
|
|
19058
|
-
//# sourceMappingURL=chunk-
|
|
19059
|
-
//# sourceMappingURL=chunk-
|
|
19208
|
+
//# sourceMappingURL=chunk-3BL3JFHL.js.map
|
|
19209
|
+
//# sourceMappingURL=chunk-3BL3JFHL.js.map
|