@undefineds.co/xpod 0.3.6 → 0.3.15
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/config/cli.json +1 -1
- package/config/cloud.json +54 -22
- package/config/local.json +56 -12
- package/config/resolver.json +10 -2
- package/config/xpod.base.json +50 -0
- package/config/xpod.json +8 -8
- package/dist/agents/config/resolve.js +10 -10
- package/dist/agents/config/resolve.js.map +1 -1
- package/dist/api/chatkit/index.d.ts +1 -1
- package/dist/api/chatkit/index.js.map +1 -1
- package/dist/api/chatkit/pod-store.d.ts +14 -11
- package/dist/api/chatkit/pod-store.js +114 -78
- package/dist/api/chatkit/pod-store.js.map +1 -1
- package/dist/api/chatkit/runtime/AcpAgentRuntime.js +1 -1
- package/dist/api/chatkit/runtime/AcpAgentRuntime.js.map +1 -1
- package/dist/api/chatkit/service.js +1 -1
- package/dist/api/chatkit/service.js.map +1 -1
- package/dist/api/chatkit/types.d.ts +11 -11
- package/dist/api/chatkit/types.js +3 -3
- package/dist/api/chatkit/types.js.map +1 -1
- package/dist/api/container/cloud.js +0 -8
- package/dist/api/container/cloud.js.map +1 -1
- package/dist/api/container/index.js +2 -1
- package/dist/api/container/index.js.map +1 -1
- package/dist/api/container/local.js +0 -7
- package/dist/api/container/local.js.map +1 -1
- package/dist/api/container/routes.js +3 -17
- package/dist/api/container/routes.js.map +1 -1
- package/dist/api/container/types.d.ts +0 -2
- package/dist/api/container/types.js.map +1 -1
- package/dist/api/handlers/PodManagementHandler.d.ts +3 -0
- package/dist/api/handlers/PodManagementHandler.js +71 -1
- package/dist/api/handlers/PodManagementHandler.js.map +1 -1
- package/dist/api/handlers/RunHandler.js +5 -5
- package/dist/api/handlers/RunHandler.js.map +1 -1
- package/dist/api/runs/AgentRuntimeTypes.d.ts +7 -8
- package/dist/api/runs/AgentRuntimeTypes.js.map +1 -1
- package/dist/api/runs/InngestRunExecutionBackend.d.ts +2 -2
- package/dist/api/runs/ManagedRunWorker.d.ts +1 -1
- package/dist/api/runs/ManagedRunWorker.js +6 -6
- package/dist/api/runs/ManagedRunWorker.js.map +1 -1
- package/dist/api/runs/PiAgentRuntimeDriver.d.ts +16 -1
- package/dist/api/runs/PiAgentRuntimeDriver.js +182 -23
- package/dist/api/runs/PiAgentRuntimeDriver.js.map +1 -1
- package/dist/api/runs/RunStateCenter.d.ts +3 -3
- package/dist/api/runs/RunStateCenter.js +13 -13
- package/dist/api/runs/RunStateCenter.js.map +1 -1
- package/dist/api/runs/store.d.ts +4 -4
- package/dist/api/runs/store.js +2 -2
- package/dist/api/runs/store.js.map +1 -1
- package/dist/api/service/VectorStoreService.d.ts +1 -1
- package/dist/api/service/VectorStoreService.js +16 -16
- package/dist/api/service/VectorStoreService.js.map +1 -1
- package/dist/api/tasks/InngestTaskScheduler.d.ts +4 -4
- package/dist/api/tasks/TaskMaterializer.d.ts +3 -3
- package/dist/api/tasks/TaskMaterializer.js +11 -11
- package/dist/api/tasks/TaskMaterializer.js.map +1 -1
- package/dist/api/tasks/TaskService.d.ts +3 -3
- package/dist/api/tasks/TaskService.js +11 -7
- package/dist/api/tasks/TaskService.js.map +1 -1
- package/dist/api/tasks/store.d.ts +10 -4
- package/dist/api/tasks/store.js +14 -4
- package/dist/api/tasks/store.js.map +1 -1
- package/dist/api/workspace/types.d.ts +3 -3
- package/dist/api/workspace/types.js +6 -6
- package/dist/api/workspace/types.js.map +1 -1
- package/dist/cli/commands/config.js +2 -2
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/start.js +9 -3
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/components/components.jsonld +8 -2
- package/dist/components/context.jsonld +308 -51
- package/dist/http/search/SearchHttpHandler.js +8 -8
- package/dist/http/search/SearchHttpHandler.js.map +1 -1
- package/dist/identity/drizzle/PodLookupRepository.d.ts +11 -1
- package/dist/identity/drizzle/PodLookupRepository.js +95 -4
- package/dist/identity/drizzle/PodLookupRepository.js.map +1 -1
- package/dist/identity/drizzle/db.js +4 -43
- package/dist/identity/drizzle/db.js.map +1 -1
- package/dist/identity/drizzle/schema.pg.d.ts +0 -5
- package/dist/identity/drizzle/schema.pg.js +2 -16
- package/dist/identity/drizzle/schema.pg.js.map +1 -1
- package/dist/identity/drizzle/schema.sqlite.d.ts +19 -176
- package/dist/identity/drizzle/schema.sqlite.js +2 -16
- package/dist/identity/drizzle/schema.sqlite.js.map +1 -1
- package/dist/identity/oidc/AutoDetectIdentityProviderHandler.d.ts +4 -4
- package/dist/identity/oidc/AutoDetectIdentityProviderHandler.js +7 -7
- package/dist/identity/oidc/AutoDetectIdentityProviderHandler.js.map +1 -1
- package/dist/identity/oidc/AutoDetectIdentityProviderHandler.jsonld +6 -6
- package/dist/identity/oidc/AutoDetectOidcHandler.d.ts +4 -4
- package/dist/identity/oidc/AutoDetectOidcHandler.js +6 -6
- package/dist/identity/oidc/AutoDetectOidcHandler.js.map +1 -1
- package/dist/identity/oidc/AutoDetectOidcHandler.jsonld +6 -6
- package/dist/identity/oidc/ScopedPickWebIdHandler.d.ts +37 -0
- package/dist/identity/oidc/ScopedPickWebIdHandler.js +211 -0
- package/dist/identity/oidc/ScopedPickWebIdHandler.js.map +1 -0
- package/dist/identity/oidc/ScopedPickWebIdHandler.jsonld +158 -0
- package/dist/index.d.ts +12 -2
- package/dist/index.js +16 -4
- package/dist/index.js.map +1 -1
- package/dist/main.js +8 -2
- package/dist/main.js.map +1 -1
- package/dist/provision/ProvisionPodCreator.d.ts +3 -4
- package/dist/provision/ProvisionPodCreator.js +8 -13
- package/dist/provision/ProvisionPodCreator.js.map +1 -1
- package/dist/provision/ProvisionPodCreator.jsonld +7 -7
- package/dist/runtime/Proxy.d.ts +0 -1
- package/dist/runtime/Proxy.js +0 -9
- package/dist/runtime/Proxy.js.map +1 -1
- package/dist/runtime/bootstrap.d.ts +1 -0
- package/dist/runtime/bootstrap.js +5 -2
- package/dist/runtime/bootstrap.js.map +1 -1
- package/dist/runtime/css-process.d.ts +12 -4
- package/dist/runtime/css-process.js +61 -14
- package/dist/runtime/css-process.js.map +1 -1
- package/dist/runtime/oidc-issuer.d.ts +3 -2
- package/dist/runtime/oidc-issuer.js +3 -2
- package/dist/runtime/oidc-issuer.js.map +1 -1
- package/dist/runtime/runtime-types.d.ts +1 -0
- package/dist/runtime/runtime-types.js.map +1 -1
- package/dist/solidfs/LocalFirstRdfRepresentationResolver.d.ts +21 -0
- package/dist/solidfs/LocalFirstRdfRepresentationResolver.js +38 -0
- package/dist/solidfs/LocalFirstRdfRepresentationResolver.js.map +1 -0
- package/dist/solidfs/LocalSolidFS.d.ts +18 -0
- package/dist/solidfs/LocalSolidFS.js +539 -0
- package/dist/solidfs/LocalSolidFS.js.map +1 -0
- package/dist/solidfs/PodSolidFsHttpClient.d.ts +16 -0
- package/dist/solidfs/PodSolidFsHttpClient.js +93 -0
- package/dist/solidfs/PodSolidFsHttpClient.js.map +1 -0
- package/dist/solidfs/PodSolidFsHydrator.d.ts +27 -0
- package/dist/solidfs/PodSolidFsHydrator.js +127 -0
- package/dist/solidfs/PodSolidFsHydrator.js.map +1 -0
- package/dist/solidfs/PodSolidFsSyncer.d.ts +21 -0
- package/dist/solidfs/PodSolidFsSyncer.js +78 -0
- package/dist/solidfs/PodSolidFsSyncer.js.map +1 -0
- package/dist/solidfs/RdfIndexSolidFsSyncer.d.ts +22 -0
- package/dist/solidfs/RdfIndexSolidFsSyncer.js +131 -0
- package/dist/solidfs/RdfIndexSolidFsSyncer.js.map +1 -0
- package/dist/solidfs/index.d.ts +7 -0
- package/dist/solidfs/index.js +24 -0
- package/dist/solidfs/index.js.map +1 -0
- package/dist/solidfs/types.d.ts +131 -0
- package/dist/solidfs/types.js +19 -0
- package/dist/solidfs/types.js.map +1 -0
- package/dist/storage/RepresentationPartialConvertingStore.js +6 -13
- package/dist/storage/RepresentationPartialConvertingStore.js.map +1 -1
- package/dist/storage/SparqlUpdateResourceStore.d.ts +4 -0
- package/dist/storage/SparqlUpdateResourceStore.js +13 -0
- package/dist/storage/SparqlUpdateResourceStore.js.map +1 -1
- package/dist/storage/SparqlUpdateResourceStore.jsonld +26 -0
- package/dist/storage/accessors/MixDataAccessor.d.ts +85 -4
- package/dist/storage/accessors/MixDataAccessor.js +511 -16
- package/dist/storage/accessors/MixDataAccessor.js.map +1 -1
- package/dist/storage/accessors/MixDataAccessor.jsonld +176 -1
- package/dist/storage/accessors/QuintStoreSparqlDataAccessor.d.ts +7 -0
- package/dist/storage/accessors/QuintStoreSparqlDataAccessor.js +72 -4
- package/dist/storage/accessors/QuintStoreSparqlDataAccessor.js.map +1 -1
- package/dist/storage/accessors/QuintStoreSparqlDataAccessor.jsonld +24 -0
- package/dist/storage/quint/BaseQuintStore.d.ts +3 -0
- package/dist/storage/quint/BaseQuintStore.js +51 -27
- package/dist/storage/quint/BaseQuintStore.js.map +1 -1
- package/dist/storage/quint/PgQuintStore.d.ts +1 -0
- package/dist/storage/quint/PgQuintStore.js +50 -32
- package/dist/storage/quint/PgQuintStore.js.map +1 -1
- package/dist/storage/quint/PgQuintStore.jsonld +4 -3
- package/dist/storage/quint/SqliteQuintStore.d.ts +5 -0
- package/dist/storage/quint/SqliteQuintStore.js +100 -0
- package/dist/storage/quint/SqliteQuintStore.js.map +1 -1
- package/dist/storage/quint/SqliteQuintStore.jsonld +20 -0
- package/dist/storage/quint/types.d.ts +16 -0
- package/dist/storage/quint/types.js.map +1 -1
- package/dist/storage/rdf/Rdf3xTripleIndex.d.ts +55 -0
- package/dist/storage/rdf/Rdf3xTripleIndex.js +1235 -0
- package/dist/storage/rdf/Rdf3xTripleIndex.js.map +1 -0
- package/dist/storage/rdf/RdfContentTypes.d.ts +9 -0
- package/dist/storage/rdf/RdfContentTypes.js +79 -0
- package/dist/storage/rdf/RdfContentTypes.js.map +1 -0
- package/dist/storage/rdf/RdfLocalQueryEngine.d.ts +79 -0
- package/dist/storage/rdf/RdfLocalQueryEngine.js +2705 -0
- package/dist/storage/rdf/RdfLocalQueryEngine.js.map +1 -0
- package/dist/storage/rdf/RdfQuadIndex.d.ts +98 -0
- package/dist/storage/rdf/RdfQuadIndex.js +1840 -0
- package/dist/storage/rdf/RdfQuadIndex.js.map +1 -0
- package/dist/storage/rdf/RdfQuadIndex.jsonld +416 -0
- package/dist/storage/rdf/RdfShadowComparator.d.ts +12 -0
- package/dist/storage/rdf/RdfShadowComparator.js +47 -0
- package/dist/storage/rdf/RdfShadowComparator.js.map +1 -0
- package/dist/storage/rdf/RdfSparqlAdapter.d.ts +147 -0
- package/dist/storage/rdf/RdfSparqlAdapter.js +2420 -0
- package/dist/storage/rdf/RdfSparqlAdapter.js.map +1 -0
- package/dist/storage/rdf/RdfSparqlAdapter.jsonld +414 -0
- package/dist/storage/rdf/RdfTermDictionary.d.ts +27 -0
- package/dist/storage/rdf/RdfTermDictionary.js +352 -0
- package/dist/storage/rdf/RdfTermDictionary.js.map +1 -0
- package/dist/storage/rdf/RdfTermDictionary.jsonld +114 -0
- package/dist/storage/rdf/RdfTermSemantics.d.ts +6 -0
- package/dist/storage/rdf/RdfTermSemantics.js +40 -0
- package/dist/storage/rdf/RdfTermSemantics.js.map +1 -0
- package/dist/storage/rdf/RdfTextIndex.d.ts +23 -0
- package/dist/storage/rdf/RdfTextIndex.js +569 -0
- package/dist/storage/rdf/RdfTextIndex.js.map +1 -0
- package/dist/storage/rdf/RdfVectorIndex.d.ts +22 -0
- package/dist/storage/rdf/RdfVectorIndex.js +631 -0
- package/dist/storage/rdf/RdfVectorIndex.js.map +1 -0
- package/dist/storage/rdf/RdfXmlSerializer.d.ts +2 -0
- package/dist/storage/rdf/RdfXmlSerializer.js +123 -0
- package/dist/storage/rdf/RdfXmlSerializer.js.map +1 -0
- package/dist/storage/rdf/ShadowRdfQuintStore.d.ts +58 -0
- package/dist/storage/rdf/ShadowRdfQuintStore.js +202 -0
- package/dist/storage/rdf/ShadowRdfQuintStore.js.map +1 -0
- package/dist/storage/rdf/ShadowRdfQuintStore.jsonld +308 -0
- package/dist/storage/rdf/SolidRdfEngine.d.ts +56 -0
- package/dist/storage/rdf/SolidRdfEngine.js +292 -0
- package/dist/storage/rdf/SolidRdfEngine.js.map +1 -0
- package/dist/storage/rdf/SolidRdfEngine.jsonld +372 -0
- package/dist/storage/rdf/SolidRdfSparqlEngine.d.ts +92 -0
- package/dist/storage/rdf/SolidRdfSparqlEngine.js +477 -0
- package/dist/storage/rdf/SolidRdfSparqlEngine.js.map +1 -0
- package/dist/storage/rdf/SolidRdfSparqlEngine.jsonld +257 -0
- package/dist/storage/rdf/index.d.ts +15 -0
- package/dist/storage/rdf/index.js +61 -0
- package/dist/storage/rdf/index.js.map +1 -0
- package/dist/storage/rdf/models-benchmark.d.ts +260 -0
- package/dist/storage/rdf/models-benchmark.js +1405 -0
- package/dist/storage/rdf/models-benchmark.js.map +1 -0
- package/dist/storage/rdf/types.d.ts +726 -0
- package/dist/storage/rdf/types.js +3 -0
- package/dist/storage/rdf/types.js.map +1 -0
- package/dist/storage/rdf/types.jsonld +316 -0
- package/dist/storage/vector/VectorIndexingListener.d.ts +5 -5
- package/dist/storage/vector/VectorIndexingListener.js +19 -19
- package/dist/storage/vector/VectorIndexingListener.js.map +1 -1
- package/package.json +3 -2
- package/templates/pod/acp/.acr.hbs +39 -0
- package/templates/pod/acp/README.acr +18 -0
- package/templates/pod/acp/profile/card.acr +22 -0
- package/templates/pod/base/README$.md.hbs +27 -0
- package/templates/pod/base/profile/card$.ttl.hbs +13 -0
- package/templates/pod/wac/.acl.hbs +26 -0
- package/templates/pod/wac/README.acl.hbs +14 -0
- package/templates/pod/wac/profile/card.acl.hbs +19 -0
- package/dist/api/handlers/WebIdProfileHandler.d.ts +0 -16
- package/dist/api/handlers/WebIdProfileHandler.js +0 -423
- package/dist/api/handlers/WebIdProfileHandler.js.map +0 -1
- package/dist/identity/drizzle/WebIdProfileRepository.d.ts +0 -63
- package/dist/identity/drizzle/WebIdProfileRepository.js +0 -168
- package/dist/identity/drizzle/WebIdProfileRepository.js.map +0 -1
- package/dist/identity/drizzle/WebIdProfileRepository.jsonld +0 -112
- package/dist/storage/quint/BaseQuintStore.jsonld +0 -257
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": [
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@undefineds.co/xpod/^0.0.0/components/context.jsonld"
|
|
4
|
+
],
|
|
5
|
+
"@id": "npmd:@undefineds.co/xpod",
|
|
6
|
+
"components": [
|
|
7
|
+
{
|
|
8
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex",
|
|
9
|
+
"@type": "Class",
|
|
10
|
+
"requireElement": "RdfQuadIndex",
|
|
11
|
+
"parameters": [
|
|
12
|
+
{
|
|
13
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex_options_path",
|
|
14
|
+
"range": "xsd:string"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex_options_debug",
|
|
18
|
+
"range": {
|
|
19
|
+
"@type": "ParameterRangeUnion",
|
|
20
|
+
"parameterRangeElements": [
|
|
21
|
+
"xsd:boolean",
|
|
22
|
+
{
|
|
23
|
+
"@type": "ParameterRangeUndefined"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"memberFields": [
|
|
30
|
+
{
|
|
31
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_options",
|
|
32
|
+
"memberFieldName": "options"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_sqliteRuntime",
|
|
36
|
+
"memberFieldName": "sqliteRuntime"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_db",
|
|
40
|
+
"memberFieldName": "db"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_dictionary",
|
|
44
|
+
"memberFieldName": "dictionary"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_cardinalityCache",
|
|
48
|
+
"memberFieldName": "cardinalityCache"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_constructor",
|
|
52
|
+
"memberFieldName": "constructor"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_open",
|
|
56
|
+
"memberFieldName": "open"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_close",
|
|
60
|
+
"memberFieldName": "close"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_clear",
|
|
64
|
+
"memberFieldName": "clear"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_put",
|
|
68
|
+
"memberFieldName": "put"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_replaceSource",
|
|
72
|
+
"memberFieldName": "replaceSource"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_deleteSource",
|
|
76
|
+
"memberFieldName": "deleteSource"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_multiPut",
|
|
80
|
+
"memberFieldName": "multiPut"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_insertQuads",
|
|
84
|
+
"memberFieldName": "insertQuads"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_delete",
|
|
88
|
+
"memberFieldName": "delete"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_scan",
|
|
92
|
+
"memberFieldName": "scan"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_scanWithTupleConstraints",
|
|
96
|
+
"memberFieldName": "scanWithTupleConstraints"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_joinPatterns",
|
|
100
|
+
"memberFieldName": "joinPatterns"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_countJoinPatterns",
|
|
104
|
+
"memberFieldName": "countJoinPatterns"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_aggregateJoinPatterns",
|
|
108
|
+
"memberFieldName": "aggregateJoinPatterns"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_aggregateJoinPatternsInternal",
|
|
112
|
+
"memberFieldName": "aggregateJoinPatternsInternal"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_groupCountJoinPatterns",
|
|
116
|
+
"memberFieldName": "groupCountJoinPatterns"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_groupAggregateJoinPatterns",
|
|
120
|
+
"memberFieldName": "groupAggregateJoinPatterns"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_groupAggregateJoinPatternsInternal",
|
|
124
|
+
"memberFieldName": "groupAggregateJoinPatternsInternal"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_scanInternal",
|
|
128
|
+
"memberFieldName": "scanInternal"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_compileJoinPatterns",
|
|
132
|
+
"memberFieldName": "compileJoinPatterns"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_buildJoinOrderClause",
|
|
136
|
+
"memberFieldName": "buildJoinOrderClause"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_joinRowKeyExpression",
|
|
140
|
+
"memberFieldName": "joinRowKeyExpression"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_buildJoinAggregateColumn",
|
|
144
|
+
"memberFieldName": "buildJoinAggregateColumn"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_buildGroupCountHavingClause",
|
|
148
|
+
"memberFieldName": "buildGroupCountHavingClause"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_buildGroupAggregateHavingClause",
|
|
152
|
+
"memberFieldName": "buildGroupAggregateHavingClause"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_havingSqlOperator",
|
|
156
|
+
"memberFieldName": "havingSqlOperator"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_buildGroupCountOrderScope",
|
|
160
|
+
"memberFieldName": "buildGroupCountOrderScope"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_buildGroupAggregateOrderScope",
|
|
164
|
+
"memberFieldName": "buildGroupAggregateOrderScope"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_matchToJoinCondition",
|
|
168
|
+
"memberFieldName": "matchToJoinCondition"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_joinRowsToBindings",
|
|
172
|
+
"memberFieldName": "joinRowsToBindings"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_count",
|
|
176
|
+
"memberFieldName": "count"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_estimateCardinality",
|
|
180
|
+
"memberFieldName": "estimateCardinality"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_countDistinct",
|
|
184
|
+
"memberFieldName": "countDistinct"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_countDistinctTuple",
|
|
188
|
+
"memberFieldName": "countDistinctTuple"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_stats",
|
|
192
|
+
"memberFieldName": "stats"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_cardinalityDistributions",
|
|
196
|
+
"memberFieldName": "cardinalityDistributions"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_literalDatatypeDistribution",
|
|
200
|
+
"memberFieldName": "literalDatatypeDistribution"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_graphCardinalityDistribution",
|
|
204
|
+
"memberFieldName": "graphCardinalityDistribution"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_predicateCardinalityDistribution",
|
|
208
|
+
"memberFieldName": "predicateCardinalityDistribution"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_predicateObjectCardinalityDistribution",
|
|
212
|
+
"memberFieldName": "predicateObjectCardinalityDistribution"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_subjectPredicateCardinalityDistribution",
|
|
216
|
+
"memberFieldName": "subjectPredicateCardinalityDistribution"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_cardinalityTerm",
|
|
220
|
+
"memberFieldName": "cardinalityTerm"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_estimateSerializedTextBytes",
|
|
224
|
+
"memberFieldName": "estimateSerializedTextBytes"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_estimateDatabaseBytes",
|
|
228
|
+
"memberFieldName": "estimateDatabaseBytes"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_collectSpaceObjects",
|
|
232
|
+
"memberFieldName": "collectSpaceObjects"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_estimateSpaceObjectsFromSchema",
|
|
236
|
+
"memberFieldName": "estimateSpaceObjectsFromSchema"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_estimatePageSize",
|
|
240
|
+
"memberFieldName": "estimatePageSize"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_initializeSchema",
|
|
244
|
+
"memberFieldName": "initializeSchema"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_upsertSource",
|
|
248
|
+
"memberFieldName": "upsertSource"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_buildWhereClause",
|
|
252
|
+
"memberFieldName": "buildWhereClause"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_matchToCondition",
|
|
256
|
+
"memberFieldName": "matchToCondition"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_termTypeConditionJoin",
|
|
260
|
+
"memberFieldName": "termTypeConditionJoin"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_languageConditionJoin",
|
|
264
|
+
"memberFieldName": "languageConditionJoin"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_datatypeConditionJoin",
|
|
268
|
+
"memberFieldName": "datatypeConditionJoin"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_termRangeCondition",
|
|
272
|
+
"memberFieldName": "termRangeCondition"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_termOperatorLexicalValue",
|
|
276
|
+
"memberFieldName": "termOperatorLexicalValue"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_termOperatorNumericValue",
|
|
280
|
+
"memberFieldName": "termOperatorNumericValue"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_termKindsForPatternKey",
|
|
284
|
+
"memberFieldName": "termKindsForPatternKey"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_termOperatorValueId",
|
|
288
|
+
"memberFieldName": "termOperatorValueId"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_addTextSearchCondition",
|
|
292
|
+
"memberFieldName": "addTextSearchCondition"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_prefixSearchConditionJoin",
|
|
296
|
+
"memberFieldName": "prefixSearchConditionJoin"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_textSearchConditionJoin",
|
|
300
|
+
"memberFieldName": "textSearchConditionJoin"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_regexTextSearchConditionJoin",
|
|
304
|
+
"memberFieldName": "regexTextSearchConditionJoin"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_populateRegexCandidateTable",
|
|
308
|
+
"memberFieldName": "populateRegexCandidateTable"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_populateTermInCandidateTable",
|
|
312
|
+
"memberFieldName": "populateTermInCandidateTable"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_scopedQuadColumn",
|
|
316
|
+
"memberFieldName": "scopedQuadColumn"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_scopedSqlName",
|
|
320
|
+
"memberFieldName": "scopedSqlName"
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_buildTupleConstraintJoin",
|
|
324
|
+
"memberFieldName": "buildTupleConstraintJoin"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_populateTupleConstraintTable",
|
|
328
|
+
"memberFieldName": "populateTupleConstraintTable"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_termIdForTupleConstraint",
|
|
332
|
+
"memberFieldName": "termIdForTupleConstraint"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_populateCandidateTable",
|
|
336
|
+
"memberFieldName": "populateCandidateTable"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_chooseIndex",
|
|
340
|
+
"memberFieldName": "chooseIndex"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_exactTermPattern",
|
|
344
|
+
"memberFieldName": "exactTermPattern"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_countExactTermPattern",
|
|
348
|
+
"memberFieldName": "countExactTermPattern"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_countExactDistinctTermPattern",
|
|
352
|
+
"memberFieldName": "countExactDistinctTermPattern"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_countExactDistinctTupleTermPattern",
|
|
356
|
+
"memberFieldName": "countExactDistinctTupleTermPattern"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_countDistinctPattern",
|
|
360
|
+
"memberFieldName": "countDistinctPattern"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_countDistinctTuplePattern",
|
|
364
|
+
"memberFieldName": "countDistinctTuplePattern"
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_buildOrderClause",
|
|
368
|
+
"memberFieldName": "buildOrderClause"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_paginationParamCount",
|
|
372
|
+
"memberFieldName": "paginationParamCount"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_rowsToQuads",
|
|
376
|
+
"memberFieldName": "rowsToQuads"
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_requiredTerm",
|
|
380
|
+
"memberFieldName": "requiredTerm"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_metrics",
|
|
384
|
+
"memberFieldName": "metrics"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_requireDb",
|
|
388
|
+
"memberFieldName": "requireDb"
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex__member_requireDictionary",
|
|
392
|
+
"memberFieldName": "requireDictionary"
|
|
393
|
+
}
|
|
394
|
+
],
|
|
395
|
+
"constructorArguments": [
|
|
396
|
+
{
|
|
397
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex_options__constructorArgument",
|
|
398
|
+
"fields": [
|
|
399
|
+
{
|
|
400
|
+
"keyRaw": "path",
|
|
401
|
+
"value": {
|
|
402
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex_options_path"
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"keyRaw": "debug",
|
|
407
|
+
"value": {
|
|
408
|
+
"@id": "undefineds:dist/storage/rdf/RdfQuadIndex.jsonld#RdfQuadIndex_options_debug"
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
]
|
|
412
|
+
}
|
|
413
|
+
]
|
|
414
|
+
}
|
|
415
|
+
]
|
|
416
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Quad } from '@rdfjs/types';
|
|
2
|
+
import type { QuintStore } from '../quint/types';
|
|
3
|
+
import type { RdfPatternQuery, RdfShadowDiff, RdfShadowScanResult } from './types';
|
|
4
|
+
import { RdfQuadIndex } from './RdfQuadIndex';
|
|
5
|
+
export declare class RdfShadowComparator {
|
|
6
|
+
private readonly primary;
|
|
7
|
+
private readonly compatibility;
|
|
8
|
+
constructor(primary: RdfQuadIndex, compatibility: QuintStore);
|
|
9
|
+
compareScan(query: RdfPatternQuery): Promise<RdfShadowScanResult>;
|
|
10
|
+
}
|
|
11
|
+
export declare function diffQuads(primary: Quad[], compatibility: Quad[]): RdfShadowDiff;
|
|
12
|
+
export declare function canonicalQuadKey(quad: Quad): string;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RdfShadowComparator = void 0;
|
|
4
|
+
exports.diffQuads = diffQuads;
|
|
5
|
+
exports.canonicalQuadKey = canonicalQuadKey;
|
|
6
|
+
const n3_1 = require("n3");
|
|
7
|
+
class RdfShadowComparator {
|
|
8
|
+
constructor(primary, compatibility) {
|
|
9
|
+
this.primary = primary;
|
|
10
|
+
this.compatibility = compatibility;
|
|
11
|
+
}
|
|
12
|
+
async compareScan(query) {
|
|
13
|
+
const primaryResult = this.primary.scan(query.pattern, query.options);
|
|
14
|
+
const compatibilityResult = await this.compatibility.get(query.pattern, query.options);
|
|
15
|
+
const diff = diffQuads(primaryResult.quads, compatibilityResult);
|
|
16
|
+
const orderedMatch = orderedQuadKeys(primaryResult.quads).join('\n') === orderedQuadKeys(compatibilityResult).join('\n');
|
|
17
|
+
return {
|
|
18
|
+
matched: diff.missingFromPrimary.length === 0 && diff.extraInPrimary.length === 0,
|
|
19
|
+
orderedMatch,
|
|
20
|
+
primary: primaryResult.quads,
|
|
21
|
+
compatibility: compatibilityResult,
|
|
22
|
+
diff,
|
|
23
|
+
metrics: primaryResult.metrics,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.RdfShadowComparator = RdfShadowComparator;
|
|
28
|
+
function orderedQuadKeys(quads) {
|
|
29
|
+
return quads.map(canonicalQuadKey);
|
|
30
|
+
}
|
|
31
|
+
function diffQuads(primary, compatibility) {
|
|
32
|
+
const primarySet = new Set(primary.map(canonicalQuadKey));
|
|
33
|
+
const compatibilitySet = new Set(compatibility.map(canonicalQuadKey));
|
|
34
|
+
return {
|
|
35
|
+
missingFromPrimary: Array.from(compatibilitySet).filter((key) => !primarySet.has(key)).sort(),
|
|
36
|
+
extraInPrimary: Array.from(primarySet).filter((key) => !compatibilitySet.has(key)).sort(),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function canonicalQuadKey(quad) {
|
|
40
|
+
return [
|
|
41
|
+
(0, n3_1.termToId)(quad.graph),
|
|
42
|
+
(0, n3_1.termToId)(quad.subject),
|
|
43
|
+
(0, n3_1.termToId)(quad.predicate),
|
|
44
|
+
(0, n3_1.termToId)(quad.object),
|
|
45
|
+
].join('\u001f');
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=RdfShadowComparator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RdfShadowComparator.js","sourceRoot":"","sources":["../../../src/storage/rdf/RdfShadowComparator.ts"],"names":[],"mappings":";;;AAgCA,8BAOC;AAED,4CAOC;AAhDD,2BAA8B;AAM9B,MAAa,mBAAmB;IAC9B,YACmB,OAAqB,EACrB,aAAyB;QADzB,YAAO,GAAP,OAAO,CAAc;QACrB,kBAAa,GAAb,aAAa,CAAY;IACzC,CAAC;IAEG,KAAK,CAAC,WAAW,CAAC,KAAsB;QAC7C,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QACtE,MAAM,mBAAmB,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QACvF,MAAM,IAAI,GAAG,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC;QACjE,MAAM,YAAY,GAAG,eAAe,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,eAAe,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzH,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,kBAAkB,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,KAAK,CAAC;YACjF,YAAY;YACZ,OAAO,EAAE,aAAa,CAAC,KAAK;YAC5B,aAAa,EAAE,mBAAmB;YAClC,IAAI;YACJ,OAAO,EAAE,aAAa,CAAC,OAAO;SAC/B,CAAC;IACJ,CAAC;CACF;AApBD,kDAoBC;AAED,SAAS,eAAe,CAAC,KAAa;IACpC,OAAO,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AACrC,CAAC;AAED,SAAgB,SAAS,CAAC,OAAe,EAAE,aAAqB;IAC9D,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC1D,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC;IACtE,OAAO;QACL,kBAAkB,EAAE,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE;QAC7F,cAAc,EAAE,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE;KAC1F,CAAC;AACJ,CAAC;AAED,SAAgB,gBAAgB,CAAC,IAAU;IACzC,OAAO;QACL,IAAA,aAAQ,EAAC,IAAI,CAAC,KAAY,CAAC;QAC3B,IAAA,aAAQ,EAAC,IAAI,CAAC,OAAc,CAAC;QAC7B,IAAA,aAAQ,EAAC,IAAI,CAAC,SAAgB,CAAC;QAC/B,IAAA,aAAQ,EAAC,IAAI,CAAC,MAAa,CAAC;KAC7B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACnB,CAAC","sourcesContent":["import { termToId } from 'n3';\nimport type { Quad } from '@rdfjs/types';\nimport type { QuintStore } from '../quint/types';\nimport type { RdfPatternQuery, RdfShadowDiff, RdfShadowScanResult } from './types';\nimport { RdfQuadIndex } from './RdfQuadIndex';\n\nexport class RdfShadowComparator {\n public constructor(\n private readonly primary: RdfQuadIndex,\n private readonly compatibility: QuintStore,\n ) {}\n\n public async compareScan(query: RdfPatternQuery): Promise<RdfShadowScanResult> {\n const primaryResult = this.primary.scan(query.pattern, query.options);\n const compatibilityResult = await this.compatibility.get(query.pattern, query.options);\n const diff = diffQuads(primaryResult.quads, compatibilityResult);\n const orderedMatch = orderedQuadKeys(primaryResult.quads).join('\\n') === orderedQuadKeys(compatibilityResult).join('\\n');\n return {\n matched: diff.missingFromPrimary.length === 0 && diff.extraInPrimary.length === 0,\n orderedMatch,\n primary: primaryResult.quads,\n compatibility: compatibilityResult,\n diff,\n metrics: primaryResult.metrics,\n };\n }\n}\n\nfunction orderedQuadKeys(quads: Quad[]): string[] {\n return quads.map(canonicalQuadKey);\n}\n\nexport function diffQuads(primary: Quad[], compatibility: Quad[]): RdfShadowDiff {\n const primarySet = new Set(primary.map(canonicalQuadKey));\n const compatibilitySet = new Set(compatibility.map(canonicalQuadKey));\n return {\n missingFromPrimary: Array.from(compatibilitySet).filter((key) => !primarySet.has(key)).sort(),\n extraInPrimary: Array.from(primarySet).filter((key) => !compatibilitySet.has(key)).sort(),\n };\n}\n\nexport function canonicalQuadKey(quad: Quad): string {\n return [\n termToId(quad.graph as any),\n termToId(quad.subject as any),\n termToId(quad.predicate as any),\n termToId(quad.object as any),\n ].join('\\u001f');\n}\n"]}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import type { SparqlQuery } from 'sparqljs';
|
|
2
|
+
import type { Quad, Term } from '@rdfjs/types';
|
|
3
|
+
import type { RdfLocalQuery, RdfBindingRow, RdfConstructTemplate, RdfQueryTermPattern } from './types';
|
|
4
|
+
export interface RdfSparqlCompileResult {
|
|
5
|
+
query: RdfLocalQuery;
|
|
6
|
+
variables: string[];
|
|
7
|
+
queryType: 'SELECT' | 'ASK' | 'CONSTRUCT' | 'DESCRIBE';
|
|
8
|
+
constructTemplate?: RdfConstructTemplate[];
|
|
9
|
+
describeTargets?: RdfQueryTermPattern[];
|
|
10
|
+
}
|
|
11
|
+
export interface RdfSparqlInsertOperation {
|
|
12
|
+
type: 'insert';
|
|
13
|
+
quads: Quad[];
|
|
14
|
+
}
|
|
15
|
+
export interface RdfSparqlDeleteOperation {
|
|
16
|
+
type: 'delete';
|
|
17
|
+
quads: Quad[];
|
|
18
|
+
}
|
|
19
|
+
export interface RdfSparqlDeleteWhereTemplate {
|
|
20
|
+
graph: RdfQueryTermPattern;
|
|
21
|
+
subject: RdfQueryTermPattern;
|
|
22
|
+
predicate: RdfQueryTermPattern;
|
|
23
|
+
object: RdfQueryTermPattern;
|
|
24
|
+
}
|
|
25
|
+
export type RdfSparqlUpdateTemplate = RdfSparqlDeleteWhereTemplate;
|
|
26
|
+
export interface RdfSparqlDeleteWhereOperation {
|
|
27
|
+
type: 'deleteWhere';
|
|
28
|
+
query: RdfLocalQuery;
|
|
29
|
+
template: RdfSparqlUpdateTemplate[];
|
|
30
|
+
}
|
|
31
|
+
export interface RdfSparqlInsertDeleteWhereOperation {
|
|
32
|
+
type: 'insertDeleteWhere';
|
|
33
|
+
query: RdfLocalQuery;
|
|
34
|
+
deletes: RdfSparqlUpdateTemplate[];
|
|
35
|
+
inserts: RdfSparqlUpdateTemplate[];
|
|
36
|
+
}
|
|
37
|
+
export interface RdfSparqlInsertWhereOperation {
|
|
38
|
+
type: 'insertWhere';
|
|
39
|
+
query: RdfLocalQuery;
|
|
40
|
+
inserts: RdfSparqlUpdateTemplate[];
|
|
41
|
+
}
|
|
42
|
+
export type RdfSparqlUpdateDeltaOperation = RdfSparqlInsertOperation | RdfSparqlDeleteOperation | RdfSparqlDeleteWhereOperation | RdfSparqlInsertDeleteWhereOperation | RdfSparqlInsertWhereOperation;
|
|
43
|
+
export interface RdfSparqlUpdateDelta {
|
|
44
|
+
operations: RdfSparqlUpdateDeltaOperation[];
|
|
45
|
+
inserts: Quad[];
|
|
46
|
+
deletes: Quad[];
|
|
47
|
+
}
|
|
48
|
+
export declare class UnsupportedSparqlQueryError extends Error {
|
|
49
|
+
constructor(message: string);
|
|
50
|
+
}
|
|
51
|
+
export declare class DisabledSparqlFeatureError extends Error {
|
|
52
|
+
constructor(message: string);
|
|
53
|
+
}
|
|
54
|
+
export declare class RdfSparqlAdapter {
|
|
55
|
+
compile(query: string | SparqlQuery, basePath: string): RdfSparqlCompileResult;
|
|
56
|
+
compileUpdateDelta(query: string | SparqlQuery, basePath: string): RdfSparqlUpdateDelta;
|
|
57
|
+
private compileDeleteWhere;
|
|
58
|
+
private compileInsertDeleteWhere;
|
|
59
|
+
private compileUsingDatasetScope;
|
|
60
|
+
private compileUsingGraphs;
|
|
61
|
+
private compileQueryDatasetScope;
|
|
62
|
+
private compileQueryDatasetGraphs;
|
|
63
|
+
private queryFromClause;
|
|
64
|
+
private compileWithGraph;
|
|
65
|
+
private impossibleGraph;
|
|
66
|
+
private queryFromUpdateWhere;
|
|
67
|
+
private queryFromUpdateTemplate;
|
|
68
|
+
private compileGraphQuadsTemplate;
|
|
69
|
+
private assertSafeUpdateTemplatePattern;
|
|
70
|
+
private assertScopedUpdateWherePatterns;
|
|
71
|
+
private compileUpdateGraphQuads;
|
|
72
|
+
private compileUpdateTriple;
|
|
73
|
+
private compileUpdateNamedNode;
|
|
74
|
+
private compileUpdateObject;
|
|
75
|
+
private compilePatterns;
|
|
76
|
+
private compileUnionBranches;
|
|
77
|
+
private compileUnionBranch;
|
|
78
|
+
private compileMinusGroup;
|
|
79
|
+
private compileAntiJoinGroup;
|
|
80
|
+
private compileExistsGroup;
|
|
81
|
+
private notExistsPatterns;
|
|
82
|
+
private existsPatterns;
|
|
83
|
+
private unionBranchPatterns;
|
|
84
|
+
private compileBgp;
|
|
85
|
+
private compileGraphPattern;
|
|
86
|
+
private compileScopedGraphTerm;
|
|
87
|
+
private graphScopeContains;
|
|
88
|
+
private graphScopeFilterValues;
|
|
89
|
+
private compileBind;
|
|
90
|
+
private compileBindExpression;
|
|
91
|
+
private compileBindLikeExpression;
|
|
92
|
+
private compileTriple;
|
|
93
|
+
private compilePropertyPath;
|
|
94
|
+
private compilePathSegmentPredicate;
|
|
95
|
+
private flattenFixedLengthPath;
|
|
96
|
+
private flattenFixedAlternativePath;
|
|
97
|
+
private flattenFixedAlternativePathItem;
|
|
98
|
+
private flattenFixedLengthPathItem;
|
|
99
|
+
private compileGraphTerm;
|
|
100
|
+
private compileTerm;
|
|
101
|
+
materializeConstruct(template: RdfConstructTemplate[], rows: RdfBindingRow[], graph?: Term): Quad[];
|
|
102
|
+
materializeDeleteWhere(template: RdfSparqlUpdateTemplate[], rows: RdfBindingRow[]): Quad[];
|
|
103
|
+
private materializeTemplate;
|
|
104
|
+
private compileConstructTemplate;
|
|
105
|
+
private compileDescribeTargets;
|
|
106
|
+
private resolveTemplateTerm;
|
|
107
|
+
private compileSelectVariables;
|
|
108
|
+
private compileAggregateProjection;
|
|
109
|
+
private aggregateType;
|
|
110
|
+
private assertNumericAggregateSafe;
|
|
111
|
+
private compileSelectProjectionExpression;
|
|
112
|
+
private compileGroupBy;
|
|
113
|
+
private compileGroupByExpression;
|
|
114
|
+
private compileHaving;
|
|
115
|
+
private compileHavingFilter;
|
|
116
|
+
private compileHavingBinaryFilter;
|
|
117
|
+
private havingAggregateVariableOrUndefined;
|
|
118
|
+
private assertGroupProjection;
|
|
119
|
+
private compileOrder;
|
|
120
|
+
private compileOrderExpression;
|
|
121
|
+
private compileFilter;
|
|
122
|
+
private compileOrFilter;
|
|
123
|
+
private flattenOrExpressions;
|
|
124
|
+
private filterValueKey;
|
|
125
|
+
private compileBinaryFilter;
|
|
126
|
+
private compileTermTestFilter;
|
|
127
|
+
private compileFunctionComparisonFilter;
|
|
128
|
+
private stringLengthVariableOrUndefined;
|
|
129
|
+
private stringValueVariableOrUndefined;
|
|
130
|
+
private stringOperandVariable;
|
|
131
|
+
private stringOperandVariableOrUndefined;
|
|
132
|
+
private compileLangMatchesFilter;
|
|
133
|
+
private compileValuesRows;
|
|
134
|
+
private valuesTerm;
|
|
135
|
+
private compileNegatedFilter;
|
|
136
|
+
private expressionArg;
|
|
137
|
+
private expressionVariable;
|
|
138
|
+
private expressionVariableOrUndefined;
|
|
139
|
+
private filterValue;
|
|
140
|
+
private literalString;
|
|
141
|
+
private binaryFilter;
|
|
142
|
+
private reverseBinaryFilter;
|
|
143
|
+
private negatedBinaryFilter;
|
|
144
|
+
private stringFilter;
|
|
145
|
+
private normalizeFunctionCallExpression;
|
|
146
|
+
private xpathFunctionOperator;
|
|
147
|
+
}
|