@undefineds.co/xpod 0.3.75 → 0.4.0-rc.140
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/bin/xpod.js +43 -8
- package/config/bun.json +45 -48
- package/config/cloud.json +13 -90
- package/config/components-ignore.json +0 -1
- package/config/local.json +111 -63
- package/config/resolver.json +4 -2
- package/config/terminal.json +4 -1
- package/config/xpod.base.json +16 -8
- package/config/xpod.json +51 -54
- package/dist/acceptance/PublicCloudSemanticConformance.d.ts +4 -0
- package/dist/acceptance/PublicCloudSemanticConformance.js +214 -0
- package/dist/acceptance/QleverSearchConformance.d.ts +39 -0
- package/dist/acceptance/QleverSearchConformance.js +686 -0
- package/dist/acceptance/QleverSemanticConformance.d.ts +3 -0
- package/dist/acceptance/QleverSemanticConformance.js +178 -0
- package/dist/acceptance/RdfSemanticConformance.d.ts +114 -0
- package/dist/acceptance/RdfSemanticConformance.js +307 -0
- package/dist/acceptance/run-installed-qlever-conformance.d.ts +12 -0
- package/dist/acceptance/run-installed-qlever-conformance.js +87 -0
- package/dist/acceptance/run-installed-rdf-conformance.d.ts +12 -0
- package/dist/acceptance/run-installed-rdf-conformance.js +88 -0
- package/dist/ai/service/EmbeddingProviderError.d.ts +7 -0
- package/dist/ai/service/EmbeddingProviderError.js +42 -0
- package/dist/api/ai-gateway/connect/index.js +5 -2
- package/dist/api/auth/AuthContext.d.ts +5 -0
- package/dist/api/auth/AuthContext.js +10 -0
- package/dist/api/container/common.js +20 -1
- package/dist/api/container/rdf.d.ts +1 -0
- package/dist/api/container/rdf.js +43 -4
- package/dist/api/container/types.d.ts +4 -0
- package/dist/api/runs/InngestRunExecutionBackend.d.ts +2 -2
- package/dist/api/runs/PiAgentRuntimeDriver.d.ts +2 -0
- package/dist/api/runs/PiAgentRuntimeDriver.js +1 -0
- package/dist/api/runs/RdfRunContextRetriever.d.ts +8 -0
- package/dist/api/runs/RdfRunContextRetriever.js +23 -1
- package/dist/api/runtime.js +20 -6
- package/dist/api/service/RdfSearchIndexingService.d.ts +37 -3
- package/dist/api/service/RdfSearchIndexingService.js +130 -18
- package/dist/api/service/RdfSearchIndexingSolidFsSyncer.d.ts +8 -0
- package/dist/api/service/RdfSearchIndexingSolidFsSyncer.js +102 -15
- package/dist/api/service/RdfSearchReconciliationWorker.d.ts +76 -0
- package/dist/api/service/RdfSearchReconciliationWorker.js +294 -0
- package/dist/api/tasks/InngestTaskScheduler.d.ts +4 -4
- package/dist/components/components.jsonld +9 -12
- package/dist/components/context.jsonld +227 -348
- package/dist/document/MarkdownRetrievalPointProjector.d.ts +33 -0
- package/dist/document/MarkdownRetrievalPointProjector.js +196 -0
- package/dist/document/MarkdownRetrievalPointProjector.jsonld +135 -0
- package/dist/document/ReaderMaterialization.d.ts +34 -0
- package/dist/document/ReaderMaterialization.js +3 -0
- package/dist/document/ReaderMaterialization.jsonld +151 -0
- package/dist/document/ReaderMaterializationRepository.d.ts +27 -0
- package/dist/document/ReaderMaterializationRepository.js +400 -0
- package/dist/document/ReaderMaterializationRepository.jsonld +84 -0
- package/dist/document/index.d.ts +3 -1
- package/dist/document/index.js +3 -1
- package/dist/http/SubgraphSparqlHttpHandler.js +34 -54
- package/dist/http/search/SearchHttpHandler.js +14 -12
- package/dist/http/terminal/TerminalHttpHandler.d.ts +3 -0
- package/dist/http/terminal/TerminalHttpHandler.js +1 -0
- package/dist/http/terminal/TerminalHttpHandler.jsonld +11 -0
- package/dist/identity/drizzle/DrizzleIndexedStorage.js +19 -39
- package/dist/identity/drizzle/db.d.ts +1 -0
- package/dist/identity/drizzle/db.js +35 -0
- package/dist/index.d.ts +9 -17
- package/dist/index.js +14 -22
- package/dist/provision/ProvisionPodCreator.d.ts +1 -1
- package/dist/provision/ProvisionPodCreator.js +4 -3
- package/dist/search/RdfSearchIntentSink.d.ts +17 -0
- package/dist/search/RdfSearchIntentSink.js +46 -0
- package/dist/search/RdfSearchIntentSink.jsonld +47 -0
- package/dist/search/RdfSearchReconciliationRepository.d.ts +81 -0
- package/dist/search/RdfSearchReconciliationRepository.js +771 -0
- package/dist/solidfs/LocalRdfAuthorityRecoveryInitializer.d.ts +15 -0
- package/dist/solidfs/LocalRdfAuthorityRecoveryInitializer.js +48 -0
- package/dist/solidfs/LocalRdfAuthorityRecoveryInitializer.jsonld +99 -0
- package/dist/solidfs/RdfIndexSolidFsSyncer.js +22 -4
- package/dist/solidfs/SolidFsSyncJournal.d.ts +7 -1
- package/dist/solidfs/SolidFsSyncJournal.js +20 -5
- package/dist/solidfs/SolidFsSyncJournal.jsonld +43 -0
- package/dist/solidfs/index.d.ts +1 -0
- package/dist/solidfs/index.js +1 -0
- package/dist/storage/SparqlUpdateResourceStore.js +3 -3
- package/dist/storage/accessors/MixDataAccessor.d.ts +21 -29
- package/dist/storage/accessors/MixDataAccessor.js +182 -399
- package/dist/storage/accessors/MixDataAccessor.jsonld +109 -87
- package/dist/storage/accessors/SolidRdfDataAccessor.d.ts +12 -8
- package/dist/storage/accessors/SolidRdfDataAccessor.js +189 -59
- package/dist/storage/accessors/SolidRdfDataAccessor.jsonld +14 -29
- package/dist/storage/rdf/LocalQleverNativeSparqlClient.d.ts +55 -0
- package/dist/storage/rdf/LocalQleverNativeSparqlClient.js +519 -0
- package/dist/storage/rdf/LocalQleverNativeSparqlClient.jsonld +314 -0
- package/dist/storage/rdf/PostgresRdfEngine.d.ts +3 -1
- package/dist/storage/rdf/PostgresRdfEngine.js +111 -74
- package/dist/storage/rdf/PostgresRdfEngine.jsonld +12 -22
- package/dist/storage/rdf/PostgresRdfSchemaValidation.d.ts +8 -0
- package/dist/storage/rdf/PostgresRdfSchemaValidation.js +82 -0
- package/dist/storage/rdf/PostgresRdfTextIndex.d.ts +6 -3
- package/dist/storage/rdf/PostgresRdfTextIndex.js +158 -80
- package/dist/storage/rdf/PostgresRdfTextIndex.jsonld +16 -4
- package/dist/storage/rdf/PostgresRdfVectorIndex.d.ts +4 -5
- package/dist/storage/rdf/PostgresRdfVectorIndex.js +124 -120
- package/dist/storage/rdf/PostgresRdfVectorIndex.jsonld +14 -18
- package/dist/storage/rdf/QleverSparqlEngine.d.ts +35 -0
- package/dist/storage/rdf/QleverSparqlEngine.js +185 -0
- package/dist/storage/rdf/QleverSparqlEngine.jsonld +70 -0
- package/dist/storage/rdf/Rdf3xIndex.js +20 -16
- package/dist/storage/rdf/RdfAccessScope.d.ts +4 -0
- package/dist/storage/rdf/RdfAccessScope.js +74 -9
- package/dist/storage/rdf/RdfAccessScope.jsonld +16 -0
- package/dist/storage/rdf/RdfEngineRdfJsSource.d.ts +14 -0
- package/dist/storage/rdf/RdfEngineRdfJsSource.js +179 -0
- package/dist/storage/rdf/RdfQuadIndex.d.ts +13 -14
- package/dist/storage/rdf/RdfQuadIndex.js +286 -99
- package/dist/storage/rdf/RdfQuadIndex.jsonld +10 -22
- package/dist/storage/rdf/RdfQueryExecutor.js +10 -4
- package/dist/storage/rdf/RdfQuerySparqlEngine.d.ts +33 -0
- package/dist/storage/rdf/RdfQuerySparqlEngine.js +215 -0
- package/dist/storage/rdf/RdfQuerySparqlEngine.jsonld +78 -0
- package/dist/storage/rdf/RdfSparqlAdapter.d.ts +0 -4
- package/dist/storage/rdf/RdfSparqlAdapter.js +75 -173
- package/dist/storage/rdf/RdfSparqlBoundary.d.ts +37 -0
- package/dist/storage/rdf/RdfSparqlBoundary.js +247 -0
- package/dist/storage/rdf/RdfSparqlSerialization.d.ts +3 -0
- package/dist/storage/rdf/RdfSparqlSerialization.js +19 -0
- package/dist/storage/rdf/RdfSqliteConnection.d.ts +7 -0
- package/dist/storage/rdf/RdfSqliteConnection.js +23 -0
- package/dist/storage/rdf/RdfTermDictionary.d.ts +0 -8
- package/dist/storage/rdf/RdfTermDictionary.js +0 -136
- package/dist/storage/rdf/RdfTermDictionary.jsonld +0 -32
- package/dist/storage/rdf/RdfTermSemantics.d.ts +6 -0
- package/dist/storage/rdf/RdfTermSemantics.js +29 -0
- package/dist/storage/rdf/RdfTextIndex.d.ts +5 -6
- package/dist/storage/rdf/RdfTextIndex.js +187 -115
- package/dist/storage/rdf/RdfTextIndex.jsonld +10 -14
- package/dist/storage/rdf/RdfVectorIndex.d.ts +4 -4
- package/dist/storage/rdf/RdfVectorIndex.js +156 -233
- package/dist/storage/rdf/RdfVectorIndex.jsonld +10 -14
- package/dist/storage/rdf/SolidRdfEngine.d.ts +16 -21
- package/dist/storage/rdf/SolidRdfEngine.js +28 -308
- package/dist/storage/rdf/SolidRdfEngine.jsonld +26 -148
- package/dist/storage/rdf/XpodComunicaQueryEngine.d.ts +10 -0
- package/dist/storage/rdf/XpodComunicaQueryEngine.js +72 -0
- package/dist/storage/rdf/index.d.ts +7 -6
- package/dist/storage/rdf/index.js +17 -12
- package/dist/storage/rdf/models-benchmark.d.ts +5 -1
- package/dist/storage/rdf/models-benchmark.js +17 -19
- package/dist/storage/rdf/types.d.ts +68 -6
- package/dist/storage/rdf/types.jsonld +69 -0
- package/dist/storage/sparql/SubgraphQueryEngine.d.ts +13 -7
- package/dist/storage/sparql/SubgraphQueryEngine.js +6 -6
- package/dist/storage/vector/index.d.ts +0 -1
- package/dist/storage/vector/index.js +0 -1
- package/dist/terminal/AclPermissionService.d.ts +4 -5
- package/dist/terminal/AclPermissionService.js +55 -75
- package/dist/terminal/TerminalSessionManager.d.ts +3 -2
- package/dist/terminal/TerminalSessionManager.js +3 -3
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/execution/ldp-executor.d.ts +1 -0
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/execution/ldp-executor.d.ts.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/execution/ldp-executor.js +29 -26
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/execution/ldp-executor.js.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/execution/sparql-strategy.d.ts.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/execution/sparql-strategy.js +9 -4
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/execution/sparql-strategy.js.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/notifications/notifications-client.d.ts +1 -0
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/notifications/notifications-client.d.ts.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/notifications/notifications-client.js +6 -3
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/notifications/notifications-client.js.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/pod-database.js +3 -3
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/pod-database.js.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/query-builders/select-query-builder.d.ts +6 -0
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/query-builders/select-query-builder.d.ts.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/query-builders/select-query-builder.js +13 -3
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/query-builders/select-query-builder.js.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/query-where-policy.d.ts +1 -0
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/query-where-policy.d.ts.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/query-where-policy.js +31 -0
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/query-where-policy.js.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/sparql/builder/expression-builder.d.ts.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/sparql/builder/expression-builder.js +5 -0
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/sparql/builder/expression-builder.js.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/sparql-executor.d.ts +1 -0
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/sparql-executor.d.ts.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/sparql-executor.js +45 -0
- package/node_modules/@undefineds.co/drizzle-solid/dist/core/sparql-executor.js.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/execution/ldp-executor.d.ts +1 -0
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/execution/ldp-executor.d.ts.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/execution/ldp-executor.js +29 -26
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/execution/ldp-executor.js.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/execution/sparql-strategy.d.ts.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/execution/sparql-strategy.js +9 -4
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/execution/sparql-strategy.js.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/notifications/notifications-client.d.ts +1 -0
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/notifications/notifications-client.d.ts.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/notifications/notifications-client.js +6 -3
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/notifications/notifications-client.js.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/pod-database.js +3 -3
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/pod-database.js.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/query-builders/select-query-builder.d.ts +6 -0
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/query-builders/select-query-builder.d.ts.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/query-builders/select-query-builder.js +14 -4
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/query-builders/select-query-builder.js.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/query-where-policy.d.ts +1 -0
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/query-where-policy.d.ts.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/query-where-policy.js +30 -0
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/query-where-policy.js.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/sparql/builder/expression-builder.d.ts.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/sparql/builder/expression-builder.js +5 -0
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/sparql/builder/expression-builder.js.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/sparql-executor.d.ts +1 -0
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/sparql-executor.d.ts.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/sparql-executor.js +45 -0
- package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/sparql-executor.js.map +1 -1
- package/node_modules/@undefineds.co/drizzle-solid/package.json +5 -4
- package/package.json +22 -8
- package/static/app/assets/{index-36TJKN-3.js → index-BikOyGPu.js} +34 -34
- package/static/app/assets/inrupt-smoke.js +2 -2
- package/static/app/assets/main.css +1 -1
- package/static/app/assets/main.js +11 -11
- package/static/auth-callback/assets/{AiConfigContext-BvBdu_A3.js → AiConfigContext-iQ74JmRZ.js} +1 -1
- package/static/auth-callback/assets/{AiConfigPage-BpDw4jco.js → AiConfigPage-BBDKE1gJ.js} +1 -1
- package/static/auth-callback/assets/{DocumentProcessingPanel-BmZ_jzRr.js → DocumentProcessingPanel-D9NntIEK.js} +1 -1
- package/static/auth-callback/assets/{IndexLifecyclePanel-BfQBjN4z.js → IndexLifecyclePanel-BG07yBdA.js} +1 -1
- package/static/auth-callback/assets/{IndexSubjectPanel-BlsnatPt.js → IndexSubjectPanel-B-bUnU3G.js} +1 -1
- package/static/auth-callback/assets/{ModelAssignmentsPanel-KA6Mdndz.js → ModelAssignmentsPanel-C7I-Nqy-.js} +1 -1
- package/static/auth-callback/assets/{ModelsPage-C7jymyIY.js → ModelsPage-C2hxyrmI.js} +1 -1
- package/static/auth-callback/assets/{NetworkPage-k2ShktNm.js → NetworkPage-IGIc2q1Y.js} +1 -1
- package/static/auth-callback/assets/{PaneListHeader-mLMe_dvU.js → PaneListHeader-CebuPl_g.js} +1 -1
- package/static/auth-callback/assets/{SearchIndexingPanel-CqV9um_t.js → SearchIndexingPanel-6HnZSg00.js} +1 -1
- package/static/auth-callback/assets/{StatusSubjectPanel-BgMBTbr2.js → StatusSubjectPanel-votxBkr5.js} +1 -1
- package/static/auth-callback/assets/{StatusWorkspace-zbSyhdG2.js → StatusWorkspace-Cksl61zX.js} +1 -1
- package/static/auth-callback/assets/{SystemSettingsPage-CtW79nW6.js → SystemSettingsPage-CKZFUaZT.js} +1 -1
- package/static/auth-callback/assets/{SystemSettingsSubjectPanel-ZOPKYUtZ.js → SystemSettingsSubjectPanel-pzfUcCf4.js} +1 -1
- package/static/auth-callback/assets/{activity-BQ-CQE3O.js → activity-DQL6kZHZ.js} +1 -1
- package/static/auth-callback/assets/auth-callback-B_s8Ye5Z.css +1 -0
- package/static/auth-callback/assets/{auth-callback-Htr_CB_g.js → auth-callback-BxQMd_Mc.js} +39 -39
- package/static/auth-callback/assets/{badge-D5SGTJeO.js → badge-DvW4LUHH.js} +1 -1
- package/static/auth-callback/assets/{download-DK183Ldo.js → download-Cx_uaCR1.js} +1 -1
- package/static/auth-callback/assets/{external-link-LDHy_4bn.js → external-link-D6L6ExH1.js} +1 -1
- package/static/auth-callback/assets/{index-BWrvgHqK.js → index-BAS_hxGu.js} +1 -1
- package/static/auth-callback/assets/{index-2WmlePQ9.js → index-BmBjpCoD.js} +1 -1
- package/static/auth-callback/assets/{index-browser-DUd4E4-x.js → index-browser-pdn4D3M4.js} +1 -1
- package/static/auth-callback/assets/{key-round-ibX79Kr-.js → key-round-BTBzOggq.js} +1 -1
- package/static/auth-callback/assets/{rotate-ccw-B2_VMaiX.js → rotate-ccw-eV7Cx8sB.js} +1 -1
- package/static/auth-callback/assets/{skeleton-F4nrpycc.js → skeleton-Bg4GYgBM.js} +1 -1
- package/static/auth-callback/assets/{waypoints-DImIq93f.js → waypoints-CJbydf0B.js} +1 -1
- package/static/auth-callback/assets/{workspace-layout-IVCSYU21.js → workspace-layout-C6Hh8Xf-.js} +1 -1
- package/static/auth-callback/auth-callback.html +2 -2
- package/static/dashboard/assets/{AiConfigContext-cjjfYTo9.js → AiConfigContext-BkJj28vK.js} +1 -1
- package/static/dashboard/assets/{AiConfigPage-CO0DSD_j.js → AiConfigPage-Cs9B4uyp.js} +1 -1
- package/static/dashboard/assets/{DocumentProcessingPanel-DMGnH8Oj.js → DocumentProcessingPanel-BBWmM7mS.js} +1 -1
- package/static/dashboard/assets/{IndexLifecyclePanel-DSkIOCL5.js → IndexLifecyclePanel-D5xGTT_i.js} +1 -1
- package/static/dashboard/assets/{IndexSubjectPanel-qWN_DbAp.js → IndexSubjectPanel-d-mjDthn.js} +1 -1
- package/static/dashboard/assets/{ModelAssignmentsPanel-DCf83uM3.js → ModelAssignmentsPanel-C-OLNbqf.js} +1 -1
- package/static/dashboard/assets/{ModelsPage-CMnvSrl5.js → ModelsPage-CBrLjuUn.js} +1 -1
- package/static/dashboard/assets/{NetworkPage-C8Gkwclb.js → NetworkPage-BlYk8L1z.js} +1 -1
- package/static/dashboard/assets/{PaneListHeader-BtU_8cDK.js → PaneListHeader-A5oZJQC0.js} +1 -1
- package/static/dashboard/assets/{SearchIndexingPanel-DEn12pNU.js → SearchIndexingPanel-Bs1j8ZP2.js} +1 -1
- package/static/dashboard/assets/{StatusSubjectPanel-B1_ILg2d.js → StatusSubjectPanel-Qao3orvi.js} +1 -1
- package/static/dashboard/assets/{StatusWorkspace-BG6nMNCo.js → StatusWorkspace-rDM0yDtk.js} +1 -1
- package/static/dashboard/assets/{SystemSettingsPage-BnWYIXaM.js → SystemSettingsPage-FPRPkKaR.js} +1 -1
- package/static/dashboard/assets/{SystemSettingsSubjectPanel-C_mYVPWb.js → SystemSettingsSubjectPanel-CjlJAxnX.js} +1 -1
- package/static/dashboard/assets/{activity-DYJ7PdRl.js → activity-CJ5K6hYC.js} +1 -1
- package/static/dashboard/assets/{badge-BIaZco1P.js → badge-L-NMOi1P.js} +1 -1
- package/static/dashboard/assets/dashboard-B_s8Ye5Z.css +1 -0
- package/static/dashboard/assets/{dashboard-Dl40_MEa.js → dashboard-DyjAyYxx.js} +34 -34
- package/static/dashboard/assets/{download-By16k9VK.js → download-Bi4u5K5B.js} +1 -1
- package/static/dashboard/assets/{external-link-B92xOG_d.js → external-link-jmhLDfvT.js} +1 -1
- package/static/dashboard/assets/{index-BajZpJ48.js → index-BoaGJBxf.js} +1 -1
- package/static/dashboard/assets/{index-wsVPom_x.js → index-C22TAEi4.js} +1 -1
- package/static/dashboard/assets/{key-round-Clo5FOwA.js → key-round-Dk1VmMrn.js} +1 -1
- package/static/dashboard/assets/{rotate-ccw-smWSfi1L.js → rotate-ccw-DIfLsSwi.js} +1 -1
- package/static/dashboard/assets/{skeleton-BrTaGeJw.js → skeleton-BGPJMHb-.js} +1 -1
- package/static/dashboard/assets/{waypoints-DGPQInE7.js → waypoints-CY53egpu.js} +1 -1
- package/static/dashboard/assets/{workspace-layout-CPU4XRmb.js → workspace-layout-CoHkcx70.js} +1 -1
- package/static/dashboard/dashboard.html +2 -2
- package/static/settings/assets/{AiConfigContext-CT29_OyW.js → AiConfigContext-BcEPlEJe.js} +1 -1
- package/static/settings/assets/{AiConfigPage-WIE95S28.js → AiConfigPage-D-t3ZUhg.js} +1 -1
- package/static/settings/assets/{DocumentProcessingPanel-KG8Sq999.js → DocumentProcessingPanel-m2SasiMO.js} +1 -1
- package/static/settings/assets/{IndexLifecyclePanel-iKvtHDXY.js → IndexLifecyclePanel-BNmAvx8V.js} +1 -1
- package/static/settings/assets/{IndexSubjectPanel-BQdSCkk4.js → IndexSubjectPanel-C5-L2AcW.js} +1 -1
- package/static/settings/assets/{ModelAssignmentsPanel-P8QcVB0F.js → ModelAssignmentsPanel-Cfpkf02Y.js} +1 -1
- package/static/settings/assets/{ModelsPage-UZkZGqor.js → ModelsPage-DZrACwVN.js} +1 -1
- package/static/settings/assets/{NetworkPage-Dcpcvg15.js → NetworkPage-BlrGGfqL.js} +1 -1
- package/static/settings/assets/{PaneListHeader--gHtZws5.js → PaneListHeader-C3TCs1RI.js} +1 -1
- package/static/settings/assets/{SearchIndexingPanel-DdgJSJYQ.js → SearchIndexingPanel-Cyp3CUzX.js} +1 -1
- package/static/settings/assets/{StatusSubjectPanel-UOxp_XVL.js → StatusSubjectPanel-gRkb8WEX.js} +1 -1
- package/static/settings/assets/{StatusWorkspace-CPNXuD12.js → StatusWorkspace-Dptx4Ec2.js} +1 -1
- package/static/settings/assets/{SystemSettingsPage-B6ySeVPw.js → SystemSettingsPage-BWgGUQbs.js} +1 -1
- package/static/settings/assets/{SystemSettingsSubjectPanel-I7zWmpiI.js → SystemSettingsSubjectPanel-VflUvpgC.js} +1 -1
- package/static/settings/assets/{activity-CFhmzahP.js → activity-D7iNhTkQ.js} +1 -1
- package/static/settings/assets/{badge-BBdUc5B-.js → badge-DO0r_RT4.js} +1 -1
- package/static/settings/assets/{download-WJE9-yxQ.js → download-CsJlNSbd.js} +1 -1
- package/static/settings/assets/{external-link-RKoYyCp_.js → external-link-BCR7SHme.js} +1 -1
- package/static/settings/assets/{index-Bq2o0Bif.js → index-Cgq16ekN.js} +1 -1
- package/static/settings/assets/{index-DvxneI5O.js → index-SrhQvcrU.js} +1 -1
- package/static/settings/assets/{index-browser-Qmo6EsFT.js → index-browser-THpcMCnz.js} +1 -1
- package/static/settings/assets/{key-round-r-D9sQUK.js → key-round-Dd3jk1BT.js} +1 -1
- package/static/settings/assets/{rotate-ccw-D3IIhbPH.js → rotate-ccw-tiL14i1d.js} +1 -1
- package/static/settings/assets/settings-B_s8Ye5Z.css +1 -0
- package/static/settings/assets/{settings-D8oDBXWg.js → settings-CVLDPejo.js} +34 -34
- package/static/settings/assets/{skeleton-DrL4RQuw.js → skeleton-DBxLuNgU.js} +1 -1
- package/static/settings/assets/{waypoints-C5sRhpJw.js → waypoints-DS3e3hv7.js} +1 -1
- package/static/settings/assets/{workspace-layout-B4ALmWsM.js → workspace-layout-mucrxyTK.js} +1 -1
- package/static/settings/settings.html +2 -2
- package/config/search.json +0 -66
- package/dist/document/HeadingChunker.jsonld +0 -41
- package/dist/security/secret-cell/DeploymentRootKeyProvider.jsonld +0 -124
- package/dist/security/secret-cell/SecretCellVault.jsonld +0 -207
- package/dist/storage/PostgresDerivedIndexJournal.d.ts +0 -47
- package/dist/storage/PostgresDerivedIndexJournal.js +0 -408
- package/dist/storage/PostgresDerivedIndexJournal.jsonld +0 -303
- package/dist/storage/RdfDerivedIndexingListener.d.ts +0 -32
- package/dist/storage/RdfDerivedIndexingListener.js +0 -135
- package/dist/storage/RdfDerivedIndexingListener.jsonld +0 -228
- package/dist/storage/accessors/QuadstoreSparqlDataAccessor.d.ts +0 -148
- package/dist/storage/accessors/QuadstoreSparqlDataAccessor.js +0 -436
- package/dist/storage/accessors/QuadstoreSparqlDataAccessor.jsonld +0 -172
- package/dist/storage/accessors/QuintStoreSparqlDataAccessor.d.ts +0 -102
- package/dist/storage/accessors/QuintStoreSparqlDataAccessor.js +0 -474
- package/dist/storage/accessors/QuintStoreSparqlDataAccessor.jsonld +0 -192
- package/dist/storage/rdf/RdfSparqlAdapter.jsonld +0 -486
- package/dist/storage/rdf/ShadowRdfQuintStore.d.ts +0 -59
- package/dist/storage/rdf/ShadowRdfQuintStore.js +0 -216
- package/dist/storage/rdf/ShadowRdfQuintStore.jsonld +0 -312
- package/dist/storage/rdf/SolidRdfSparqlEngine.d.ts +0 -107
- package/dist/storage/rdf/SolidRdfSparqlEngine.js +0 -1117
- package/dist/storage/rdf/SolidRdfSparqlEngine.jsonld +0 -312
- package/dist/storage/sparql/AlgebraUtils.d.ts +0 -48
- package/dist/storage/sparql/AlgebraUtils.js +0 -118
- package/dist/storage/sparql/CompatibilitySparqlEngine.d.ts +0 -37
- package/dist/storage/sparql/CompatibilitySparqlEngine.js +0 -96
- package/dist/storage/sparql/CompatibilitySparqlEngine.jsonld +0 -123
- package/dist/storage/sparql/CompatibilitySparqlEngineImpl.d.ts +0 -36
- package/dist/storage/sparql/CompatibilitySparqlEngineImpl.js +0 -124
- package/dist/storage/sparql/ComunicaOptimizedEngine.d.ts +0 -59
- package/dist/storage/sparql/ComunicaOptimizedEngine.js +0 -254
- package/dist/storage/sparql/ComunicaQuintEngine.d.ts +0 -143
- package/dist/storage/sparql/ComunicaQuintEngine.js +0 -781
- package/dist/storage/sparql/ExpressionEvaluator.d.ts +0 -54
- package/dist/storage/sparql/ExpressionEvaluator.js +0 -340
- package/dist/storage/sparql/FilterPushdownExtractor.d.ts +0 -74
- package/dist/storage/sparql/FilterPushdownExtractor.js +0 -421
- package/dist/storage/sparql/OptimizedQuadstoreEngine.d.ts +0 -65
- package/dist/storage/sparql/OptimizedQuadstoreEngine.js +0 -327
- package/dist/storage/sparql/OptimizedQuadstoreSource.d.ts +0 -46
- package/dist/storage/sparql/OptimizedQuadstoreSource.js +0 -118
- package/dist/storage/sparql/PatternBuilder.d.ts +0 -41
- package/dist/storage/sparql/PatternBuilder.js +0 -118
- package/dist/storage/sparql/QueryOptimizer.d.ts +0 -125
- package/dist/storage/sparql/QueryOptimizer.js +0 -375
- package/dist/storage/sparql/QuintEngine.d.ts +0 -92
- package/dist/storage/sparql/QuintEngine.js +0 -150
- package/dist/storage/sparql/QuintQuerySource.d.ts +0 -241
- package/dist/storage/sparql/QuintQuerySource.js +0 -1069
- package/dist/storage/sparql/SimpleSparqlExecutor.d.ts +0 -40
- package/dist/storage/sparql/SimpleSparqlExecutor.js +0 -131
- package/dist/storage/vector/VectorIndexingListener.d.ts +0 -114
- package/dist/storage/vector/VectorIndexingListener.js +0 -346
- package/static/auth-callback/assets/auth-callback-rWdEQY5f.css +0 -1
- package/static/dashboard/assets/dashboard-rWdEQY5f.css +0 -1
- package/static/settings/assets/settings-rWdEQY5f.css +0 -1
|
@@ -1,30 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RdfSparqlAdapter = exports.
|
|
3
|
+
exports.RdfSparqlAdapter = exports.DisabledSparqlFeatureError = exports.UnsupportedSparqlQueryError = void 0;
|
|
4
4
|
exports.sparqlCorrectionForCapability = sparqlCorrectionForCapability;
|
|
5
5
|
const n3_1 = require("n3");
|
|
6
6
|
const sparqljs_1 = require("sparqljs");
|
|
7
7
|
const RdfQueryExecutor_1 = require("./RdfQueryExecutor");
|
|
8
8
|
const PATH_JOIN_VARIABLE_PREFIX = '__rdf_path';
|
|
9
9
|
const XPATH_FUNCTION_NS = 'http://www.w3.org/2005/xpath-functions#';
|
|
10
|
-
const XSD_NUMERIC_DATATYPES = new Set([
|
|
11
|
-
'http://www.w3.org/2001/XMLSchema#decimal',
|
|
12
|
-
'http://www.w3.org/2001/XMLSchema#double',
|
|
13
|
-
'http://www.w3.org/2001/XMLSchema#float',
|
|
14
|
-
'http://www.w3.org/2001/XMLSchema#integer',
|
|
15
|
-
'http://www.w3.org/2001/XMLSchema#long',
|
|
16
|
-
'http://www.w3.org/2001/XMLSchema#int',
|
|
17
|
-
'http://www.w3.org/2001/XMLSchema#short',
|
|
18
|
-
'http://www.w3.org/2001/XMLSchema#byte',
|
|
19
|
-
'http://www.w3.org/2001/XMLSchema#nonNegativeInteger',
|
|
20
|
-
'http://www.w3.org/2001/XMLSchema#positiveInteger',
|
|
21
|
-
'http://www.w3.org/2001/XMLSchema#unsignedLong',
|
|
22
|
-
'http://www.w3.org/2001/XMLSchema#unsignedInt',
|
|
23
|
-
'http://www.w3.org/2001/XMLSchema#unsignedShort',
|
|
24
|
-
'http://www.w3.org/2001/XMLSchema#unsignedByte',
|
|
25
|
-
'http://www.w3.org/2001/XMLSchema#nonPositiveInteger',
|
|
26
|
-
'http://www.w3.org/2001/XMLSchema#negativeInteger',
|
|
27
|
-
]);
|
|
28
10
|
function assertNoExternalService(value) {
|
|
29
11
|
if (Array.isArray(value)) {
|
|
30
12
|
for (const item of value) {
|
|
@@ -43,67 +25,6 @@ function assertNoExternalService(value) {
|
|
|
43
25
|
assertNoExternalService(child);
|
|
44
26
|
}
|
|
45
27
|
}
|
|
46
|
-
function nativeQueryShapeRejection(value, root = true) {
|
|
47
|
-
if (Array.isArray(value)) {
|
|
48
|
-
for (const item of value) {
|
|
49
|
-
const rejection = nativeQueryShapeRejection(item, false);
|
|
50
|
-
if (rejection) {
|
|
51
|
-
return rejection;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return undefined;
|
|
55
|
-
}
|
|
56
|
-
if (value === null || typeof value !== 'object') {
|
|
57
|
-
return undefined;
|
|
58
|
-
}
|
|
59
|
-
const record = value;
|
|
60
|
-
if (!root && record.type === 'query') {
|
|
61
|
-
return 'Subqueries require the embedded compatibility path';
|
|
62
|
-
}
|
|
63
|
-
if (record.type === 'query' && Array.isArray(record.order) && record.order.length > 1) {
|
|
64
|
-
return 'Multi-column ORDER BY requires the embedded compatibility path';
|
|
65
|
-
}
|
|
66
|
-
if (record.type === 'optional' || record.type === 'union' || record.type === 'minus') {
|
|
67
|
-
return `${String(record.type).toUpperCase()} query shapes require the embedded compatibility path`;
|
|
68
|
-
}
|
|
69
|
-
if (record.type === 'path') {
|
|
70
|
-
return 'Property paths require the embedded compatibility path';
|
|
71
|
-
}
|
|
72
|
-
if (record.type === 'filter') {
|
|
73
|
-
const expression = record.expression;
|
|
74
|
-
if (expression?.termType === 'Variable') {
|
|
75
|
-
return 'Variable effective-boolean-value filters require the embedded compatibility path';
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
if (record.type === 'operation') {
|
|
79
|
-
const operator = String(record.operator ?? '').toLowerCase();
|
|
80
|
-
if (operator === 'exists' || operator === 'notexists') {
|
|
81
|
-
return 'EXISTS query shapes require the embedded compatibility path';
|
|
82
|
-
}
|
|
83
|
-
if (['>', '>=', '<', '<='].includes(operator)) {
|
|
84
|
-
const args = Array.isArray(record.args) ? record.args : [];
|
|
85
|
-
const hasNumericLiteral = args.some((arg) => {
|
|
86
|
-
if (!arg || typeof arg !== 'object') {
|
|
87
|
-
return typeof arg === 'number';
|
|
88
|
-
}
|
|
89
|
-
const term = arg;
|
|
90
|
-
const datatype = term.datatype;
|
|
91
|
-
return term.termType === 'Literal'
|
|
92
|
-
&& XSD_NUMERIC_DATATYPES.has(String(datatype?.value ?? ''));
|
|
93
|
-
});
|
|
94
|
-
if (hasNumericLiteral) {
|
|
95
|
-
return 'Numeric range filters require the embedded compatibility path';
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
for (const child of Object.values(record)) {
|
|
100
|
-
const rejection = nativeQueryShapeRejection(child, false);
|
|
101
|
-
if (rejection) {
|
|
102
|
-
return rejection;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return undefined;
|
|
106
|
-
}
|
|
107
28
|
class UnsupportedSparqlQueryError extends Error {
|
|
108
29
|
constructor(message, options = {}) {
|
|
109
30
|
const normalizedMessage = normalizeUnsupportedSparqlMessage(message);
|
|
@@ -123,26 +44,11 @@ class DisabledSparqlFeatureError extends Error {
|
|
|
123
44
|
}
|
|
124
45
|
}
|
|
125
46
|
exports.DisabledSparqlFeatureError = DisabledSparqlFeatureError;
|
|
126
|
-
class NativeSparqlExecutionError extends Error {
|
|
127
|
-
constructor(message) {
|
|
128
|
-
super(message.startsWith('Native SPARQL engine failed:') ? message : `Native SPARQL engine failed: ${message}`);
|
|
129
|
-
this.code = 'rdf.sparql.native_execution_error';
|
|
130
|
-
this.name = 'NativeSparqlExecutionError';
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
exports.NativeSparqlExecutionError = NativeSparqlExecutionError;
|
|
134
47
|
function normalizeUnsupportedSparqlMessage(message) {
|
|
135
|
-
const noFallbackMatch = /^No compatibility SPARQL fallback configured for ([^:]+):\s*(.+)$/i.exec(message);
|
|
136
|
-
if (noFallbackMatch) {
|
|
137
|
-
return `Embedded SPARQL engine cannot execute ${noFallbackMatch[1]}: ${normalizeEmbeddedUnsupportedReason(noFallbackMatch[2])}`;
|
|
138
|
-
}
|
|
139
48
|
return normalizeEmbeddedUnsupportedReason(message);
|
|
140
49
|
}
|
|
141
50
|
function normalizeEmbeddedUnsupportedReason(reason) {
|
|
142
|
-
let normalized = reason
|
|
143
|
-
.replace(/\s+fallback to compatibility engine\b/gi, ' is not supported by the embedded RDF engine')
|
|
144
|
-
.replace(/\bis handled by the compatibility engine\b/gi, 'is not supported by the embedded RDF engine')
|
|
145
|
-
.replace(/\bcompatibility fallback\b/gi, 'embedded RDF engine');
|
|
51
|
+
let normalized = reason;
|
|
146
52
|
if (/^unsupported shape$/i.test(normalized.trim())) {
|
|
147
53
|
normalized = 'Query shape is not supported by the embedded RDF engine';
|
|
148
54
|
}
|
|
@@ -328,10 +234,6 @@ class RdfSparqlAdapter {
|
|
|
328
234
|
assertNoExternalService(parsed);
|
|
329
235
|
if (parsed.type !== 'update') {
|
|
330
236
|
this.compileQueryDatasetScope(this.queryFromClause(parsed), basePath);
|
|
331
|
-
const rejection = nativeQueryShapeRejection(parsed);
|
|
332
|
-
if (rejection) {
|
|
333
|
-
throw new UnsupportedSparqlQueryError(rejection);
|
|
334
|
-
}
|
|
335
237
|
}
|
|
336
238
|
}
|
|
337
239
|
compile(query, basePath) {
|
|
@@ -339,7 +241,7 @@ class RdfSparqlAdapter {
|
|
|
339
241
|
? new sparqljs_1.Parser({ baseIRI: basePath }).parse(query)
|
|
340
242
|
: query;
|
|
341
243
|
if (parsed.type === 'update') {
|
|
342
|
-
throw new UnsupportedSparqlQueryError('SPARQL
|
|
244
|
+
throw new UnsupportedSparqlQueryError('SPARQL UPDATEis not supported by the embedded RDF engine');
|
|
343
245
|
}
|
|
344
246
|
const datasetScope = this.compileQueryDatasetScope(this.queryFromClause(parsed), basePath);
|
|
345
247
|
const state = new CompileState(basePath);
|
|
@@ -392,12 +294,12 @@ class RdfSparqlAdapter {
|
|
|
392
294
|
const operations = [];
|
|
393
295
|
for (const update of parsed.updates) {
|
|
394
296
|
if (!('updateType' in update)) {
|
|
395
|
-
throw new UnsupportedSparqlQueryError('SPARQL UPDATE management operations
|
|
297
|
+
throw new UnsupportedSparqlQueryError('SPARQL UPDATE management operations');
|
|
396
298
|
}
|
|
397
299
|
switch (update.updateType) {
|
|
398
300
|
case 'insert':
|
|
399
301
|
if (update.graph) {
|
|
400
|
-
throw new UnsupportedSparqlQueryError('SPARQL UPDATE WITH/default graph scope
|
|
302
|
+
throw new UnsupportedSparqlQueryError('SPARQL UPDATE WITH/default graph scope');
|
|
401
303
|
}
|
|
402
304
|
operations.push({
|
|
403
305
|
type: 'insert',
|
|
@@ -406,7 +308,7 @@ class RdfSparqlAdapter {
|
|
|
406
308
|
break;
|
|
407
309
|
case 'delete':
|
|
408
310
|
if (update.graph) {
|
|
409
|
-
throw new UnsupportedSparqlQueryError('SPARQL UPDATE WITH/default graph scope
|
|
311
|
+
throw new UnsupportedSparqlQueryError('SPARQL UPDATE WITH/default graph scope');
|
|
410
312
|
}
|
|
411
313
|
operations.push({
|
|
412
314
|
type: 'delete',
|
|
@@ -415,7 +317,7 @@ class RdfSparqlAdapter {
|
|
|
415
317
|
break;
|
|
416
318
|
case 'deletewhere':
|
|
417
319
|
if (update.graph) {
|
|
418
|
-
throw new UnsupportedSparqlQueryError('SPARQL UPDATE WITH/default graph scope
|
|
320
|
+
throw new UnsupportedSparqlQueryError('SPARQL UPDATE WITH/default graph scope');
|
|
419
321
|
}
|
|
420
322
|
operations.push(this.compileDeleteWhere(update.delete, basePath, defaultGraph));
|
|
421
323
|
break;
|
|
@@ -423,7 +325,7 @@ class RdfSparqlAdapter {
|
|
|
423
325
|
operations.push(this.compileInsertDeleteWhere(update, basePath, defaultGraph));
|
|
424
326
|
break;
|
|
425
327
|
default:
|
|
426
|
-
throw new UnsupportedSparqlQueryError('Unsupported SPARQL UPDATE operation
|
|
328
|
+
throw new UnsupportedSparqlQueryError('Unsupported SPARQL UPDATE operation');
|
|
427
329
|
}
|
|
428
330
|
}
|
|
429
331
|
const inserts = operations
|
|
@@ -446,7 +348,7 @@ class RdfSparqlAdapter {
|
|
|
446
348
|
return sum;
|
|
447
349
|
}, 0);
|
|
448
350
|
if (inserts.length + deletes.length + deleteWhereCount === 0) {
|
|
449
|
-
throw new UnsupportedSparqlQueryError('SPARQL UPDATE without data quads
|
|
351
|
+
throw new UnsupportedSparqlQueryError('SPARQL UPDATE without data quads');
|
|
450
352
|
}
|
|
451
353
|
return { operations, inserts, deletes };
|
|
452
354
|
}
|
|
@@ -462,7 +364,7 @@ class RdfSparqlAdapter {
|
|
|
462
364
|
const hasInsertTemplate = (update.insert?.length ?? 0) > 0;
|
|
463
365
|
const hasDeleteTemplate = (update.delete?.length ?? 0) > 0;
|
|
464
366
|
if (!hasInsertTemplate && !hasDeleteTemplate) {
|
|
465
|
-
throw new UnsupportedSparqlQueryError('DELETE/INSERT WHERE without DELETE or INSERT template
|
|
367
|
+
throw new UnsupportedSparqlQueryError('DELETE/INSERT WHERE without DELETE or INSERT template');
|
|
466
368
|
}
|
|
467
369
|
const label = hasInsertTemplate && hasDeleteTemplate
|
|
468
370
|
? 'DELETE/INSERT WHERE'
|
|
@@ -486,13 +388,13 @@ class RdfSparqlAdapter {
|
|
|
486
388
|
? this.compileGraphQuadsTemplate(update.insert ?? [], basePath, 'INSERT template', withGraph, { graphVariables })
|
|
487
389
|
: [];
|
|
488
390
|
if (hasInsertTemplate && inserts.length === 0) {
|
|
489
|
-
throw new UnsupportedSparqlQueryError(`${label} without INSERT template
|
|
391
|
+
throw new UnsupportedSparqlQueryError(`${label} without INSERT template`);
|
|
490
392
|
}
|
|
491
393
|
const deletes = hasDeleteTemplate
|
|
492
394
|
? this.compileGraphQuadsTemplate(update.delete ?? [], basePath, 'DELETE template', withGraph, { graphVariables })
|
|
493
395
|
: [];
|
|
494
396
|
if (hasDeleteTemplate && deletes.length === 0) {
|
|
495
|
-
throw new UnsupportedSparqlQueryError(`${label} without DELETE template
|
|
397
|
+
throw new UnsupportedSparqlQueryError(`${label} without DELETE template`);
|
|
496
398
|
}
|
|
497
399
|
if (hasInsertTemplate && !hasDeleteTemplate) {
|
|
498
400
|
return {
|
|
@@ -534,7 +436,7 @@ class RdfSparqlAdapter {
|
|
|
534
436
|
const compiledGraphs = graphs.map((graph) => {
|
|
535
437
|
const compiled = this.compileGraphTerm(graph, basePath);
|
|
536
438
|
if (compiled === null || isCompiledVariable(compiled)) {
|
|
537
|
-
throw new UnsupportedSparqlQueryError(`${label} ${clause} graph outside basePath
|
|
439
|
+
throw new UnsupportedSparqlQueryError(`${label} ${clause} graph outside basePath`);
|
|
538
440
|
}
|
|
539
441
|
return compiled;
|
|
540
442
|
});
|
|
@@ -590,7 +492,7 @@ class RdfSparqlAdapter {
|
|
|
590
492
|
}
|
|
591
493
|
const compiled = this.compileGraphTerm(graph, basePath);
|
|
592
494
|
if (compiled === null || isCompiledVariable(compiled)) {
|
|
593
|
-
throw new UnsupportedSparqlQueryError(`${label} WITH graph outside basePath
|
|
495
|
+
throw new UnsupportedSparqlQueryError(`${label} WITH graph outside basePath`);
|
|
594
496
|
}
|
|
595
497
|
return compiled;
|
|
596
498
|
}
|
|
@@ -599,7 +501,7 @@ class RdfSparqlAdapter {
|
|
|
599
501
|
}
|
|
600
502
|
queryFromUpdateWhere(patterns, basePath, label, dataset = {}) {
|
|
601
503
|
if (patterns.length === 0) {
|
|
602
|
-
throw new UnsupportedSparqlQueryError(`${label} without WHERE patterns
|
|
504
|
+
throw new UnsupportedSparqlQueryError(`${label} without WHERE patterns`);
|
|
603
505
|
}
|
|
604
506
|
const state = new CompileState(basePath);
|
|
605
507
|
this.assertScopedUpdateWherePatterns(patterns, basePath, label, Boolean(dataset.defaultGraph), dataset.namedGraph);
|
|
@@ -609,13 +511,13 @@ class RdfSparqlAdapter {
|
|
|
609
511
|
state.assertDependentGroupsShareRequiredVariables();
|
|
610
512
|
this.assertFiniteUpdateGraphVariables(state.query, basePath, label);
|
|
611
513
|
if (state.query.patterns.length === 0 && (state.query.unions?.length ?? 0) === 0) {
|
|
612
|
-
throw new UnsupportedSparqlQueryError(`${label} without required graph BGP patterns
|
|
514
|
+
throw new UnsupportedSparqlQueryError(`${label} without required graph BGP patterns`);
|
|
613
515
|
}
|
|
614
516
|
return state.query;
|
|
615
517
|
}
|
|
616
518
|
queryFromUpdateTemplate(template, label) {
|
|
617
519
|
if (template.length === 0) {
|
|
618
|
-
throw new UnsupportedSparqlQueryError(`${label} without WHERE patterns
|
|
520
|
+
throw new UnsupportedSparqlQueryError(`${label} without WHERE patterns`);
|
|
619
521
|
}
|
|
620
522
|
return {
|
|
621
523
|
patterns: template.map((pattern) => ({
|
|
@@ -635,31 +537,31 @@ class RdfSparqlAdapter {
|
|
|
635
537
|
if (item.type === 'graph') {
|
|
636
538
|
if (item.name.termType === 'Variable') {
|
|
637
539
|
if (!options.graphVariables?.has(item.name.value)) {
|
|
638
|
-
throw new UnsupportedSparqlQueryError(`${label} GRAPH variables
|
|
540
|
+
throw new UnsupportedSparqlQueryError(`${label} GRAPH variables`);
|
|
639
541
|
}
|
|
640
542
|
graph = (0, RdfQueryExecutor_1.variable)(item.name.value);
|
|
641
543
|
}
|
|
642
544
|
else if (item.name.termType !== 'NamedNode') {
|
|
643
|
-
throw new UnsupportedSparqlQueryError(`${label} GRAPH variables
|
|
545
|
+
throw new UnsupportedSparqlQueryError(`${label} GRAPH variables`);
|
|
644
546
|
}
|
|
645
547
|
else {
|
|
646
548
|
graph = this.compileGraphTerm(item.name, basePath) ?? undefined;
|
|
647
549
|
}
|
|
648
550
|
}
|
|
649
551
|
else if (!graph) {
|
|
650
|
-
throw new UnsupportedSparqlQueryError(`${label} default graph
|
|
552
|
+
throw new UnsupportedSparqlQueryError(`${label} default graph`);
|
|
651
553
|
}
|
|
652
554
|
if (!graph || graph === null) {
|
|
653
|
-
throw new UnsupportedSparqlQueryError(`${label} graph outside basePath
|
|
555
|
+
throw new UnsupportedSparqlQueryError(`${label} graph outside basePath`);
|
|
654
556
|
}
|
|
655
557
|
const state = new CompileState(basePath);
|
|
656
558
|
for (const triple of this.updateTemplateTriples(item)) {
|
|
657
559
|
if (!isSimpleTerm(triple.predicate)) {
|
|
658
|
-
throw new UnsupportedSparqlQueryError(`${label} property path templates
|
|
560
|
+
throw new UnsupportedSparqlQueryError(`${label} property path templates`);
|
|
659
561
|
}
|
|
660
562
|
const patterns = this.compileTriple(triple, graph, state);
|
|
661
563
|
if (patterns.length !== 1) {
|
|
662
|
-
throw new UnsupportedSparqlQueryError(`${label} property path templates
|
|
564
|
+
throw new UnsupportedSparqlQueryError(`${label} property path templates`);
|
|
663
565
|
}
|
|
664
566
|
const pattern = patterns[0];
|
|
665
567
|
this.assertSafeUpdateTemplatePattern(pattern, label);
|
|
@@ -745,12 +647,12 @@ class RdfSparqlAdapter {
|
|
|
745
647
|
assertSafeUpdateTemplatePattern(pattern, label) {
|
|
746
648
|
const terms = [pattern.subject, pattern.predicate, pattern.object];
|
|
747
649
|
if (terms.some((term) => term && 'termType' in term && term.termType === 'BlankNode')) {
|
|
748
|
-
throw new UnsupportedSparqlQueryError(`${label} blank node templates
|
|
650
|
+
throw new UnsupportedSparqlQueryError(`${label} blank node templates`);
|
|
749
651
|
}
|
|
750
652
|
}
|
|
751
653
|
assertScopedUpdateWherePatterns(patterns, basePath, label, inGraph, namedGraph) {
|
|
752
654
|
if (patterns.length === 0) {
|
|
753
|
-
throw new UnsupportedSparqlQueryError(`${label} without WHERE patterns
|
|
655
|
+
throw new UnsupportedSparqlQueryError(`${label} without WHERE patterns`);
|
|
754
656
|
}
|
|
755
657
|
for (const pattern of patterns) {
|
|
756
658
|
switch (pattern.type) {
|
|
@@ -758,16 +660,16 @@ class RdfSparqlAdapter {
|
|
|
758
660
|
if (pattern.name.termType === 'Variable') {
|
|
759
661
|
}
|
|
760
662
|
else if (pattern.name.termType !== 'NamedNode') {
|
|
761
|
-
throw new UnsupportedSparqlQueryError(`${label} GRAPH variables
|
|
663
|
+
throw new UnsupportedSparqlQueryError(`${label} GRAPH variables`);
|
|
762
664
|
}
|
|
763
665
|
else if (!pattern.name.value.startsWith(basePath)) {
|
|
764
|
-
throw new UnsupportedSparqlQueryError(`${label} graph outside basePath
|
|
666
|
+
throw new UnsupportedSparqlQueryError(`${label} graph outside basePath`);
|
|
765
667
|
}
|
|
766
668
|
this.assertScopedUpdateWherePatterns(pattern.patterns, basePath, label, true, namedGraph);
|
|
767
669
|
break;
|
|
768
670
|
case 'bgp':
|
|
769
671
|
if (!inGraph) {
|
|
770
|
-
throw new UnsupportedSparqlQueryError(`${label} default graph
|
|
672
|
+
throw new UnsupportedSparqlQueryError(`${label} default graph`);
|
|
771
673
|
}
|
|
772
674
|
break;
|
|
773
675
|
case 'optional':
|
|
@@ -784,7 +686,7 @@ class RdfSparqlAdapter {
|
|
|
784
686
|
break;
|
|
785
687
|
default:
|
|
786
688
|
if ('queryType' in pattern) {
|
|
787
|
-
throw new UnsupportedSparqlQueryError(`${label} subqueries
|
|
689
|
+
throw new UnsupportedSparqlQueryError(`${label} subqueries`);
|
|
788
690
|
}
|
|
789
691
|
break;
|
|
790
692
|
}
|
|
@@ -794,7 +696,7 @@ class RdfSparqlAdapter {
|
|
|
794
696
|
const unboundedVariables = new Set();
|
|
795
697
|
this.collectUnboundedUpdateGraphVariables(query, basePath, new Set(), unboundedVariables);
|
|
796
698
|
if (unboundedVariables.size > 0) {
|
|
797
|
-
throw new UnsupportedSparqlQueryError(`${label} GRAPH variables require finite named graph filters
|
|
699
|
+
throw new UnsupportedSparqlQueryError(`${label} GRAPH variables require finite named graph filters`);
|
|
798
700
|
}
|
|
799
701
|
}
|
|
800
702
|
collectUnboundedUpdateGraphVariables(query, basePath, inheritedFiniteVariables, unboundedVariables) {
|
|
@@ -854,7 +756,7 @@ class RdfSparqlAdapter {
|
|
|
854
756
|
for (const item of items) {
|
|
855
757
|
if (item.type !== 'graph') {
|
|
856
758
|
if (!defaultGraph) {
|
|
857
|
-
throw new UnsupportedSparqlQueryError('SPARQL UPDATE default graph
|
|
759
|
+
throw new UnsupportedSparqlQueryError('SPARQL UPDATE default graph');
|
|
858
760
|
}
|
|
859
761
|
for (const triple of item.triples) {
|
|
860
762
|
quads.push(this.compileUpdateTriple(triple, defaultGraph));
|
|
@@ -862,10 +764,10 @@ class RdfSparqlAdapter {
|
|
|
862
764
|
continue;
|
|
863
765
|
}
|
|
864
766
|
if (item.name.termType !== 'NamedNode') {
|
|
865
|
-
throw new UnsupportedSparqlQueryError('SPARQL UPDATE GRAPH variables
|
|
767
|
+
throw new UnsupportedSparqlQueryError('SPARQL UPDATE GRAPH variables');
|
|
866
768
|
}
|
|
867
769
|
if (!item.name.value.startsWith(basePath)) {
|
|
868
|
-
throw new UnsupportedSparqlQueryError('SPARQL UPDATE graph outside basePath
|
|
770
|
+
throw new UnsupportedSparqlQueryError('SPARQL UPDATE graph outside basePath');
|
|
869
771
|
}
|
|
870
772
|
for (const triple of this.updateTemplateTriples(item)) {
|
|
871
773
|
quads.push(this.compileUpdateTriple(triple, item.name));
|
|
@@ -881,7 +783,7 @@ class RdfSparqlAdapter {
|
|
|
881
783
|
? n3_1.DataFactory.namedNode(defaultGraph)
|
|
882
784
|
: defaultGraph;
|
|
883
785
|
if (basePath && !graph.value.startsWith(basePath)) {
|
|
884
|
-
throw new UnsupportedSparqlQueryError('SPARQL UPDATE default graph outside basePath
|
|
786
|
+
throw new UnsupportedSparqlQueryError('SPARQL UPDATE default graph outside basePath');
|
|
885
787
|
}
|
|
886
788
|
return graph;
|
|
887
789
|
}
|
|
@@ -981,7 +883,7 @@ class RdfSparqlAdapter {
|
|
|
981
883
|
break;
|
|
982
884
|
default:
|
|
983
885
|
if ('queryType' in pattern) {
|
|
984
|
-
throw new UnsupportedSparqlQueryError('Subqueries
|
|
886
|
+
throw new UnsupportedSparqlQueryError('Subqueries');
|
|
985
887
|
}
|
|
986
888
|
throw new UnsupportedSparqlQueryError(`Unsupported SPARQL pattern: ${pattern.type ?? 'unknown'}`);
|
|
987
889
|
}
|
|
@@ -1006,7 +908,7 @@ class RdfSparqlAdapter {
|
|
|
1006
908
|
branchState.assertBindVariablesSafe();
|
|
1007
909
|
branchState.assertValuesVariablesBoundByRequiredPatterns();
|
|
1008
910
|
if (branchState.query.patterns.length === 0 && (branchState.query.unions?.length ?? 0) === 0) {
|
|
1009
|
-
throw new UnsupportedSparqlQueryError('UNION branch without required BGP
|
|
911
|
+
throw new UnsupportedSparqlQueryError('UNION branch without required BGP');
|
|
1010
912
|
}
|
|
1011
913
|
return [{
|
|
1012
914
|
patterns: branchState.query.patterns,
|
|
@@ -1026,10 +928,10 @@ class RdfSparqlAdapter {
|
|
|
1026
928
|
minusState.assertBindVariablesSafe();
|
|
1027
929
|
minusState.assertValuesVariablesBoundByRequiredPatterns();
|
|
1028
930
|
if (minusState.query.minus?.length || minusState.query.exists?.length) {
|
|
1029
|
-
throw new UnsupportedSparqlQueryError(`Nested ${label}
|
|
931
|
+
throw new UnsupportedSparqlQueryError(`Nested ${label}`);
|
|
1030
932
|
}
|
|
1031
933
|
if (minusState.query.patterns.length === 0 && (minusState.query.unions?.length ?? 0) === 0) {
|
|
1032
|
-
throw new UnsupportedSparqlQueryError(`${label} without required BGP
|
|
934
|
+
throw new UnsupportedSparqlQueryError(`${label} without required BGP`);
|
|
1033
935
|
}
|
|
1034
936
|
return {
|
|
1035
937
|
patterns: minusState.query.patterns,
|
|
@@ -1046,10 +948,10 @@ class RdfSparqlAdapter {
|
|
|
1046
948
|
existsState.assertBindVariablesSafe();
|
|
1047
949
|
existsState.assertValuesVariablesBoundByRequiredPatterns();
|
|
1048
950
|
if (existsState.query.minus?.length || existsState.query.exists?.length) {
|
|
1049
|
-
throw new UnsupportedSparqlQueryError(`Nested ${label}
|
|
951
|
+
throw new UnsupportedSparqlQueryError(`Nested ${label}`);
|
|
1050
952
|
}
|
|
1051
953
|
if (existsState.query.patterns.length === 0 && (existsState.query.unions?.length ?? 0) === 0) {
|
|
1052
|
-
throw new UnsupportedSparqlQueryError(`${label} without required BGP
|
|
954
|
+
throw new UnsupportedSparqlQueryError(`${label} without required BGP`);
|
|
1053
955
|
}
|
|
1054
956
|
return {
|
|
1055
957
|
patterns: existsState.query.patterns,
|
|
@@ -1066,7 +968,7 @@ class RdfSparqlAdapter {
|
|
|
1066
968
|
}
|
|
1067
969
|
const pattern = expression.args[0];
|
|
1068
970
|
if (!pattern || !isPattern(pattern)) {
|
|
1069
|
-
throw new UnsupportedSparqlQueryError('FILTER NOT EXISTS without graph pattern
|
|
971
|
+
throw new UnsupportedSparqlQueryError('FILTER NOT EXISTS without graph pattern');
|
|
1070
972
|
}
|
|
1071
973
|
return pattern.type === 'group'
|
|
1072
974
|
? pattern.patterns
|
|
@@ -1078,7 +980,7 @@ class RdfSparqlAdapter {
|
|
|
1078
980
|
}
|
|
1079
981
|
const pattern = expression.args[0];
|
|
1080
982
|
if (!pattern || !isPattern(pattern)) {
|
|
1081
|
-
throw new UnsupportedSparqlQueryError('FILTER EXISTS without graph pattern
|
|
983
|
+
throw new UnsupportedSparqlQueryError('FILTER EXISTS without graph pattern');
|
|
1082
984
|
}
|
|
1083
985
|
return pattern.type === 'group'
|
|
1084
986
|
? pattern.patterns
|
|
@@ -1148,7 +1050,7 @@ class RdfSparqlAdapter {
|
|
|
1148
1050
|
}
|
|
1149
1051
|
graphScopeFilterValues(scope) {
|
|
1150
1052
|
if (isCompiledVariable(scope)) {
|
|
1151
|
-
throw new UnsupportedSparqlQueryError('GRAPH variable dataset scope
|
|
1053
|
+
throw new UnsupportedSparqlQueryError('GRAPH variable dataset scope');
|
|
1152
1054
|
}
|
|
1153
1055
|
if (isRdfJsTerm(scope)) {
|
|
1154
1056
|
return [scope];
|
|
@@ -1157,7 +1059,7 @@ class RdfSparqlAdapter {
|
|
|
1157
1059
|
if (Array.isArray(values) && values.every((value) => value && typeof value === 'object' && 'termType' in value)) {
|
|
1158
1060
|
return values;
|
|
1159
1061
|
}
|
|
1160
|
-
throw new UnsupportedSparqlQueryError('GRAPH variable dataset scope
|
|
1062
|
+
throw new UnsupportedSparqlQueryError('GRAPH variable dataset scope');
|
|
1161
1063
|
}
|
|
1162
1064
|
compileBind(pattern, basePath) {
|
|
1163
1065
|
return {
|
|
@@ -1183,7 +1085,7 @@ class RdfSparqlAdapter {
|
|
|
1183
1085
|
};
|
|
1184
1086
|
}
|
|
1185
1087
|
if (!isOperationExpression(normalized)) {
|
|
1186
|
-
throw new UnsupportedSparqlQueryError(`${label} expression
|
|
1088
|
+
throw new UnsupportedSparqlQueryError(`${label} expression`);
|
|
1187
1089
|
}
|
|
1188
1090
|
const operator = normalized.operator.toLowerCase();
|
|
1189
1091
|
if (operator === 'str') {
|
|
@@ -1261,7 +1163,7 @@ class RdfSparqlAdapter {
|
|
|
1261
1163
|
language: this.compileBindExpression(this.expressionArg(normalized.args[1]), basePath),
|
|
1262
1164
|
};
|
|
1263
1165
|
}
|
|
1264
|
-
throw new UnsupportedSparqlQueryError(`${label} ${operator}
|
|
1166
|
+
throw new UnsupportedSparqlQueryError(`${label} ${operator}`);
|
|
1265
1167
|
}
|
|
1266
1168
|
compileTriple(triple, graph, state) {
|
|
1267
1169
|
const subject = this.compileTerm(triple.subject);
|
|
@@ -1271,7 +1173,7 @@ class RdfSparqlAdapter {
|
|
|
1271
1173
|
return pathPatterns;
|
|
1272
1174
|
}
|
|
1273
1175
|
if (!isSimpleTerm(triple.predicate)) {
|
|
1274
|
-
throw new UnsupportedSparqlQueryError('Property paths
|
|
1176
|
+
throw new UnsupportedSparqlQueryError('Property paths');
|
|
1275
1177
|
}
|
|
1276
1178
|
return [{
|
|
1277
1179
|
graph,
|
|
@@ -1305,10 +1207,10 @@ class RdfSparqlAdapter {
|
|
|
1305
1207
|
}
|
|
1306
1208
|
const segments = this.flattenFixedLengthPath(predicate);
|
|
1307
1209
|
if (!segments) {
|
|
1308
|
-
throw new UnsupportedSparqlQueryError('Property paths
|
|
1210
|
+
throw new UnsupportedSparqlQueryError('Property paths');
|
|
1309
1211
|
}
|
|
1310
1212
|
if (segments.length === 0) {
|
|
1311
|
-
throw new UnsupportedSparqlQueryError('Empty property paths
|
|
1213
|
+
throw new UnsupportedSparqlQueryError('Empty property paths');
|
|
1312
1214
|
}
|
|
1313
1215
|
const patterns = [];
|
|
1314
1216
|
let currentSubject = subject;
|
|
@@ -1412,7 +1314,7 @@ class RdfSparqlAdapter {
|
|
|
1412
1314
|
return (0, RdfQueryExecutor_1.variable)(term.value);
|
|
1413
1315
|
}
|
|
1414
1316
|
if (term.termType === 'Quad') {
|
|
1415
|
-
throw new UnsupportedSparqlQueryError('RDF-star terms
|
|
1317
|
+
throw new UnsupportedSparqlQueryError('RDF-star terms');
|
|
1416
1318
|
}
|
|
1417
1319
|
return term;
|
|
1418
1320
|
}
|
|
@@ -1461,11 +1363,11 @@ class RdfSparqlAdapter {
|
|
|
1461
1363
|
}
|
|
1462
1364
|
compileConstructTemplate(query) {
|
|
1463
1365
|
if (!query.template || query.template.length === 0) {
|
|
1464
|
-
throw new UnsupportedSparqlQueryError('CONSTRUCT without template
|
|
1366
|
+
throw new UnsupportedSparqlQueryError('CONSTRUCT without template');
|
|
1465
1367
|
}
|
|
1466
1368
|
return query.template.map((triple) => {
|
|
1467
1369
|
if (!isSimpleTerm(triple.predicate)) {
|
|
1468
|
-
throw new UnsupportedSparqlQueryError('CONSTRUCT property paths
|
|
1370
|
+
throw new UnsupportedSparqlQueryError('CONSTRUCT property paths');
|
|
1469
1371
|
}
|
|
1470
1372
|
if (triple.predicate.termType !== 'NamedNode' && triple.predicate.termType !== 'Variable') {
|
|
1471
1373
|
throw new UnsupportedSparqlQueryError('CONSTRUCT predicates must be IRIs or variables');
|
|
@@ -1481,7 +1383,7 @@ class RdfSparqlAdapter {
|
|
|
1481
1383
|
if (query.variables.length === 1 && query.variables[0] instanceof sparqljs_1.Wildcard) {
|
|
1482
1384
|
const variables = visibleSelectVariables(query);
|
|
1483
1385
|
if (variables.length === 0) {
|
|
1484
|
-
throw new UnsupportedSparqlQueryError('DESCRIBE wildcard without visible variables
|
|
1386
|
+
throw new UnsupportedSparqlQueryError('DESCRIBE wildcard without visible variables');
|
|
1485
1387
|
}
|
|
1486
1388
|
const unboundVariable = variables.find((variable) => !queryBindsVariableInRequiredShape(rdfQuery, variable));
|
|
1487
1389
|
if (unboundVariable) {
|
|
@@ -1502,7 +1404,7 @@ class RdfSparqlAdapter {
|
|
|
1502
1404
|
throw new UnsupportedSparqlQueryError('DESCRIBE targets must be IRIs or bound variables locally');
|
|
1503
1405
|
});
|
|
1504
1406
|
if (targets.length === 0) {
|
|
1505
|
-
throw new UnsupportedSparqlQueryError('DESCRIBE without targets
|
|
1407
|
+
throw new UnsupportedSparqlQueryError('DESCRIBE without targets');
|
|
1506
1408
|
}
|
|
1507
1409
|
return targets;
|
|
1508
1410
|
}
|
|
@@ -1516,7 +1418,7 @@ class RdfSparqlAdapter {
|
|
|
1516
1418
|
const rdfQuery = state.query;
|
|
1517
1419
|
if (query.variables.length === 1 && query.variables[0] instanceof sparqljs_1.Wildcard) {
|
|
1518
1420
|
if ((rdfQuery.groupBy?.length ?? 0) > 0) {
|
|
1519
|
-
throw new UnsupportedSparqlQueryError('Wildcard grouped SELECT
|
|
1421
|
+
throw new UnsupportedSparqlQueryError('Wildcard grouped SELECT');
|
|
1520
1422
|
}
|
|
1521
1423
|
return visibleSelectVariables(query);
|
|
1522
1424
|
}
|
|
@@ -1529,11 +1431,11 @@ class RdfSparqlAdapter {
|
|
|
1529
1431
|
continue;
|
|
1530
1432
|
}
|
|
1531
1433
|
if (!isVariableExpression(variable)) {
|
|
1532
|
-
throw new UnsupportedSparqlQueryError('Wildcard mixed with explicit SELECT projections
|
|
1434
|
+
throw new UnsupportedSparqlQueryError('Wildcard mixed with explicit SELECT projections');
|
|
1533
1435
|
}
|
|
1534
1436
|
if (!isAggregateExpression(variable.expression)) {
|
|
1535
1437
|
if ((rdfQuery.groupBy?.length ?? 0) > 0) {
|
|
1536
|
-
throw new UnsupportedSparqlQueryError('Grouped SELECT expression projection
|
|
1438
|
+
throw new UnsupportedSparqlQueryError('Grouped SELECT expression projection');
|
|
1537
1439
|
}
|
|
1538
1440
|
const alias = variable.variable.value;
|
|
1539
1441
|
if (variables.includes(alias)
|
|
@@ -1562,7 +1464,7 @@ class RdfSparqlAdapter {
|
|
|
1562
1464
|
const type = this.aggregateType(aggregate.aggregation);
|
|
1563
1465
|
const aggregateExpression = aggregate.expression;
|
|
1564
1466
|
if (type !== 'count' && isWildcardTerm(aggregateExpression)) {
|
|
1565
|
-
throw new UnsupportedSparqlQueryError(`${type.toUpperCase()}(*)
|
|
1467
|
+
throw new UnsupportedSparqlQueryError(`${type.toUpperCase()}(*)`);
|
|
1566
1468
|
}
|
|
1567
1469
|
const variable = isWildcardTerm(aggregateExpression)
|
|
1568
1470
|
? undefined
|
|
@@ -1589,7 +1491,7 @@ class RdfSparqlAdapter {
|
|
|
1589
1491
|
case 'max':
|
|
1590
1492
|
return aggregation.toLowerCase();
|
|
1591
1493
|
default:
|
|
1592
|
-
throw new UnsupportedSparqlQueryError(`Aggregate ${aggregation}
|
|
1494
|
+
throw new UnsupportedSparqlQueryError(`Aggregate ${aggregation}`);
|
|
1593
1495
|
}
|
|
1594
1496
|
}
|
|
1595
1497
|
assertNumericAggregateSafe(variable, state) {
|
|
@@ -1645,7 +1547,7 @@ class RdfSparqlAdapter {
|
|
|
1645
1547
|
}
|
|
1646
1548
|
const rdfQuery = state.query;
|
|
1647
1549
|
if ((rdfQuery.aggregates?.length ?? 0) === 0 && !rdfQuery.aggregate) {
|
|
1648
|
-
throw new UnsupportedSparqlQueryError('HAVING without aggregate
|
|
1550
|
+
throw new UnsupportedSparqlQueryError('HAVING without aggregate');
|
|
1649
1551
|
}
|
|
1650
1552
|
const filters = having.flatMap((expression) => this.compileHavingFilter(expression, state));
|
|
1651
1553
|
return filters.length > 0 ? filters : undefined;
|
|
@@ -1661,7 +1563,7 @@ class RdfSparqlAdapter {
|
|
|
1661
1563
|
}
|
|
1662
1564
|
const binary = this.binaryFilter(operator);
|
|
1663
1565
|
if (!binary) {
|
|
1664
|
-
throw new UnsupportedSparqlQueryError(`HAVING ${operator}
|
|
1566
|
+
throw new UnsupportedSparqlQueryError(`HAVING ${operator}`);
|
|
1665
1567
|
}
|
|
1666
1568
|
return [this.compileHavingBinaryFilter(binary, normalized.args[0], normalized.args[1], state)];
|
|
1667
1569
|
}
|
|
@@ -1731,7 +1633,7 @@ class RdfSparqlAdapter {
|
|
|
1731
1633
|
}
|
|
1732
1634
|
const aggregates = rdfQuery.aggregates ?? (rdfQuery.aggregate ? [rdfQuery.aggregate] : []);
|
|
1733
1635
|
if (aggregates.length === 0) {
|
|
1734
|
-
throw new UnsupportedSparqlQueryError('GROUP BY without aggregate
|
|
1636
|
+
throw new UnsupportedSparqlQueryError('GROUP BY without aggregate');
|
|
1735
1637
|
}
|
|
1736
1638
|
const groupableVariables = new Set([
|
|
1737
1639
|
...rdfQuery.patterns.flatMap((pattern) => variablesInPattern(pattern)),
|
|
@@ -1761,7 +1663,7 @@ class RdfSparqlAdapter {
|
|
|
1761
1663
|
throw new UnsupportedSparqlQueryError('Grouped local queries require aggregate projections to be aggregate aliases');
|
|
1762
1664
|
}
|
|
1763
1665
|
if (variables.some((variableName) => !groupVariables.has(variableName) && !aggregateAliases.has(variableName))) {
|
|
1764
|
-
throw new UnsupportedSparqlQueryError('Grouped SELECT projection
|
|
1666
|
+
throw new UnsupportedSparqlQueryError('Grouped SELECT projection');
|
|
1765
1667
|
}
|
|
1766
1668
|
}
|
|
1767
1669
|
compileOrder(order, state) {
|
|
@@ -1841,7 +1743,7 @@ class RdfSparqlAdapter {
|
|
|
1841
1743
|
if (operator === 'in' || operator === 'notin') {
|
|
1842
1744
|
const values = expression.args[1];
|
|
1843
1745
|
if (!Array.isArray(values)) {
|
|
1844
|
-
throw new UnsupportedSparqlQueryError('FILTER IN tuple
|
|
1746
|
+
throw new UnsupportedSparqlQueryError('FILTER IN tuple');
|
|
1845
1747
|
}
|
|
1846
1748
|
const functionFilter = this.compileFunctionInFilter(this.expressionArg(expression.args[0]), values, operator === 'notin');
|
|
1847
1749
|
if (functionFilter) {
|
|
@@ -1867,7 +1769,7 @@ class RdfSparqlAdapter {
|
|
|
1867
1769
|
flags: operator === 'regex' && flags ? this.literalString(this.expressionArg(flags)) : undefined,
|
|
1868
1770
|
}];
|
|
1869
1771
|
}
|
|
1870
|
-
throw new UnsupportedSparqlQueryError(`FILTER ${operator}
|
|
1772
|
+
throw new UnsupportedSparqlQueryError(`FILTER ${operator}`);
|
|
1871
1773
|
}
|
|
1872
1774
|
compileDisjunctiveFilterBranches(expression) {
|
|
1873
1775
|
const normalized = this.normalizeFunctionCallExpression(expression);
|
|
@@ -1917,7 +1819,7 @@ class RdfSparqlAdapter {
|
|
|
1917
1819
|
? filter.value === undefined ? [] : [filter.value]
|
|
1918
1820
|
: filter.values ?? [];
|
|
1919
1821
|
if (branchValues.length === 0) {
|
|
1920
|
-
throw new UnsupportedSparqlQueryError('FILTER OR branch without values
|
|
1822
|
+
throw new UnsupportedSparqlQueryError('FILTER OR branch without values');
|
|
1921
1823
|
}
|
|
1922
1824
|
for (const value of branchValues) {
|
|
1923
1825
|
const key = this.filterValueKey(value);
|
|
@@ -1928,7 +1830,7 @@ class RdfSparqlAdapter {
|
|
|
1928
1830
|
}
|
|
1929
1831
|
}
|
|
1930
1832
|
if (!variable || values.length === 0) {
|
|
1931
|
-
throw new UnsupportedSparqlQueryError('FILTER OR without equality branches
|
|
1833
|
+
throw new UnsupportedSparqlQueryError('FILTER OR without equality branches');
|
|
1932
1834
|
}
|
|
1933
1835
|
return {
|
|
1934
1836
|
variable,
|
|
@@ -2285,7 +2187,7 @@ class RdfSparqlAdapter {
|
|
|
2285
2187
|
if (operator === 'in' || operator === 'notin') {
|
|
2286
2188
|
const values = expression.args[1];
|
|
2287
2189
|
if (!Array.isArray(values)) {
|
|
2288
|
-
throw new UnsupportedSparqlQueryError('FILTER negated IN tuple
|
|
2190
|
+
throw new UnsupportedSparqlQueryError('FILTER negated IN tuple');
|
|
2289
2191
|
}
|
|
2290
2192
|
const functionFilter = this.compileFunctionInFilter(this.expressionArg(expression.args[0]), values, operator === 'in');
|
|
2291
2193
|
if (functionFilter) {
|
|
@@ -2311,7 +2213,7 @@ class RdfSparqlAdapter {
|
|
|
2311
2213
|
flags: operator === 'regex' && flags ? this.literalString(this.expressionArg(flags)) : undefined,
|
|
2312
2214
|
}];
|
|
2313
2215
|
}
|
|
2314
|
-
throw new UnsupportedSparqlQueryError(`FILTER !${operator}
|
|
2216
|
+
throw new UnsupportedSparqlQueryError(`FILTER !${operator}`);
|
|
2315
2217
|
}
|
|
2316
2218
|
expressionArg(value) {
|
|
2317
2219
|
if (!value || value.type === 'bgp') {
|
|
@@ -2418,7 +2320,7 @@ class RdfSparqlAdapter {
|
|
|
2418
2320
|
case '$regex':
|
|
2419
2321
|
return '$notRegex';
|
|
2420
2322
|
default:
|
|
2421
|
-
throw new UnsupportedSparqlQueryError(`FILTER !${operator}
|
|
2323
|
+
throw new UnsupportedSparqlQueryError(`FILTER !${operator}`);
|
|
2422
2324
|
}
|
|
2423
2325
|
}
|
|
2424
2326
|
negateTermTestFilter(filter) {
|
|
@@ -2434,7 +2336,7 @@ class RdfSparqlAdapter {
|
|
|
2434
2336
|
operator: '$notSameTerm',
|
|
2435
2337
|
};
|
|
2436
2338
|
default:
|
|
2437
|
-
throw new UnsupportedSparqlQueryError(`FILTER !${filter.operator}
|
|
2339
|
+
throw new UnsupportedSparqlQueryError(`FILTER !${filter.operator}`);
|
|
2438
2340
|
}
|
|
2439
2341
|
}
|
|
2440
2342
|
normalizeFunctionCallExpression(expression) {
|
|
@@ -2442,14 +2344,14 @@ class RdfSparqlAdapter {
|
|
|
2442
2344
|
return expression;
|
|
2443
2345
|
}
|
|
2444
2346
|
if (expression.distinct) {
|
|
2445
|
-
throw new UnsupportedSparqlQueryError('DISTINCT function calls
|
|
2347
|
+
throw new UnsupportedSparqlQueryError('DISTINCT function calls');
|
|
2446
2348
|
}
|
|
2447
2349
|
const functionIri = typeof expression.function === 'string'
|
|
2448
2350
|
? expression.function
|
|
2449
2351
|
: expression.function.value;
|
|
2450
2352
|
const operator = this.xpathFunctionOperator(functionIri);
|
|
2451
2353
|
if (!operator) {
|
|
2452
|
-
throw new UnsupportedSparqlQueryError(`Unsupported SPARQL function ${functionIri}
|
|
2354
|
+
throw new UnsupportedSparqlQueryError(`Unsupported SPARQL function ${functionIri}`);
|
|
2453
2355
|
}
|
|
2454
2356
|
return {
|
|
2455
2357
|
type: 'operation',
|
|
@@ -2535,7 +2437,7 @@ class CompileState {
|
|
|
2535
2437
|
finishOptional() {
|
|
2536
2438
|
const frame = this.optionalStack.pop();
|
|
2537
2439
|
if (!frame) {
|
|
2538
|
-
throw new UnsupportedSparqlQueryError('OPTIONAL scope
|
|
2440
|
+
throw new UnsupportedSparqlQueryError('OPTIONAL scope');
|
|
2539
2441
|
}
|
|
2540
2442
|
if (frame.patterns.length > 0
|
|
2541
2443
|
|| frame.filters.length > 0
|
|
@@ -2719,7 +2621,7 @@ class CompileState {
|
|
|
2719
2621
|
currentOptionalFrame() {
|
|
2720
2622
|
const frame = this.peekOptionalFrame();
|
|
2721
2623
|
if (!frame) {
|
|
2722
|
-
throw new UnsupportedSparqlQueryError('OPTIONAL scope
|
|
2624
|
+
throw new UnsupportedSparqlQueryError('OPTIONAL scope');
|
|
2723
2625
|
}
|
|
2724
2626
|
return frame;
|
|
2725
2627
|
}
|