@comunica/actor-init-query 2.0.1-alpha.5.0 → 2.0.1-alpha.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ActorInitQuery.jsonld +3 -9
- package/components/ActorInitQueryBase.jsonld +31 -133
- package/components/HttpServiceSparqlEndpoint.jsonld +11 -38
- package/components/MemoryPhysicalQueryPlanLogger.jsonld +9 -33
- package/components/QueryEngineBase.jsonld +17 -61
- package/components/QueryEngineFactoryBase.jsonld +4 -13
- package/components/cli/CliArgsHandlerBase.jsonld +8 -29
- package/components/cli/CliArgsHandlerHttp.jsonld +3 -9
- package/components/cli/CliArgsHandlerQuery.jsonld +7 -25
- package/components/context.jsonld +9 -0
- package/lib/QueryEngineBase.d.ts +10 -1
- package/lib/QueryEngineBase.js +25 -17
- package/lib/cli/CliArgsHandlerBase.js +1 -1
- package/package.json +17 -16
|
@@ -217,15 +217,9 @@
|
|
|
217
217
|
"comment": "Actor that must be registered in the bus before this actor."
|
|
218
218
|
}
|
|
219
219
|
],
|
|
220
|
-
"
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
"memberFieldName": "constructor"
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
"@id": "caiq:components/ActorInitQuery.jsonld#ActorInitQuery__member_run",
|
|
227
|
-
"memberFieldName": "run"
|
|
228
|
-
}
|
|
220
|
+
"memberKeys": [
|
|
221
|
+
"constructor",
|
|
222
|
+
"run"
|
|
229
223
|
],
|
|
230
224
|
"constructorArguments": [
|
|
231
225
|
{
|
|
@@ -218,86 +218,23 @@
|
|
|
218
218
|
"comment": "Actor that must be registered in the bus before this actor."
|
|
219
219
|
}
|
|
220
220
|
],
|
|
221
|
-
"
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#ActorInitQueryBase__member_mediatorQueryResultSerialize",
|
|
239
|
-
"memberFieldName": "mediatorQueryResultSerialize",
|
|
240
|
-
"range": "cc:components/Mediator.jsonld#Mediator"
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#ActorInitQueryBase__member_mediatorQueryResultSerializeMediaTypeCombiner",
|
|
244
|
-
"memberFieldName": "mediatorQueryResultSerializeMediaTypeCombiner",
|
|
245
|
-
"range": "cc:components/Mediator.jsonld#Mediator"
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#ActorInitQueryBase__member_mediatorQueryResultSerializeMediaTypeFormatCombiner",
|
|
249
|
-
"memberFieldName": "mediatorQueryResultSerializeMediaTypeFormatCombiner",
|
|
250
|
-
"range": "cc:components/Mediator.jsonld#Mediator"
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#ActorInitQueryBase__member_mediatorContextPreprocess",
|
|
254
|
-
"memberFieldName": "mediatorContextPreprocess",
|
|
255
|
-
"range": "cc:components/Mediator.jsonld#Mediator"
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#ActorInitQueryBase__member_mediatorHttpInvalidate",
|
|
259
|
-
"memberFieldName": "mediatorHttpInvalidate",
|
|
260
|
-
"range": "cc:components/Mediator.jsonld#Mediator"
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#ActorInitQueryBase__member_logger",
|
|
264
|
-
"memberFieldName": "logger",
|
|
265
|
-
"range": "cc:components/Logger.jsonld#Logger"
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#ActorInitQueryBase__member_queryString",
|
|
269
|
-
"memberFieldName": "queryString",
|
|
270
|
-
"range": "xsd:string"
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#ActorInitQueryBase__member_defaultQueryInputFormat",
|
|
274
|
-
"memberFieldName": "defaultQueryInputFormat",
|
|
275
|
-
"range": "xsd:string"
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#ActorInitQueryBase__member_context",
|
|
279
|
-
"memberFieldName": "context",
|
|
280
|
-
"range": "xsd:string"
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#ActorInitQueryBase__member_contextKeyShortcuts",
|
|
284
|
-
"memberFieldName": "contextKeyShortcuts",
|
|
285
|
-
"range": {
|
|
286
|
-
"@type": "ParameterRangeWildcard"
|
|
287
|
-
}
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#ActorInitQueryBase__member_constructor",
|
|
291
|
-
"memberFieldName": "constructor"
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#ActorInitQueryBase__member_test",
|
|
295
|
-
"memberFieldName": "test"
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#ActorInitQueryBase__member_run",
|
|
299
|
-
"memberFieldName": "run"
|
|
300
|
-
}
|
|
221
|
+
"memberKeys": [
|
|
222
|
+
"mediatorOptimizeQueryOperation",
|
|
223
|
+
"mediatorQueryOperation",
|
|
224
|
+
"mediatorQueryParse",
|
|
225
|
+
"mediatorQueryResultSerialize",
|
|
226
|
+
"mediatorQueryResultSerializeMediaTypeCombiner",
|
|
227
|
+
"mediatorQueryResultSerializeMediaTypeFormatCombiner",
|
|
228
|
+
"mediatorContextPreprocess",
|
|
229
|
+
"mediatorHttpInvalidate",
|
|
230
|
+
"logger",
|
|
231
|
+
"queryString",
|
|
232
|
+
"defaultQueryInputFormat",
|
|
233
|
+
"context",
|
|
234
|
+
"contextKeyShortcuts",
|
|
235
|
+
"constructor",
|
|
236
|
+
"test",
|
|
237
|
+
"run"
|
|
301
238
|
],
|
|
302
239
|
"constructorArguments": [
|
|
303
240
|
{
|
|
@@ -408,59 +345,20 @@
|
|
|
408
345
|
"@type": "AbstractClass",
|
|
409
346
|
"requireElement": "IActorInitQueryBaseArgs",
|
|
410
347
|
"parameters": [],
|
|
411
|
-
"
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#IActorInitQueryBaseArgs__member_mediatorQueryResultSerialize",
|
|
426
|
-
"memberFieldName": "mediatorQueryResultSerialize"
|
|
427
|
-
},
|
|
428
|
-
{
|
|
429
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#IActorInitQueryBaseArgs__member_mediatorQueryResultSerializeMediaTypeCombiner",
|
|
430
|
-
"memberFieldName": "mediatorQueryResultSerializeMediaTypeCombiner"
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#IActorInitQueryBaseArgs__member_mediatorQueryResultSerializeMediaTypeFormatCombiner",
|
|
434
|
-
"memberFieldName": "mediatorQueryResultSerializeMediaTypeFormatCombiner"
|
|
435
|
-
},
|
|
436
|
-
{
|
|
437
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#IActorInitQueryBaseArgs__member_mediatorContextPreprocess",
|
|
438
|
-
"memberFieldName": "mediatorContextPreprocess"
|
|
439
|
-
},
|
|
440
|
-
{
|
|
441
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#IActorInitQueryBaseArgs__member_mediatorHttpInvalidate",
|
|
442
|
-
"memberFieldName": "mediatorHttpInvalidate"
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#IActorInitQueryBaseArgs__member_logger",
|
|
446
|
-
"memberFieldName": "logger"
|
|
447
|
-
},
|
|
448
|
-
{
|
|
449
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#IActorInitQueryBaseArgs__member_queryString",
|
|
450
|
-
"memberFieldName": "queryString"
|
|
451
|
-
},
|
|
452
|
-
{
|
|
453
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#IActorInitQueryBaseArgs__member_defaultQueryInputFormat",
|
|
454
|
-
"memberFieldName": "defaultQueryInputFormat"
|
|
455
|
-
},
|
|
456
|
-
{
|
|
457
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#IActorInitQueryBaseArgs__member_context",
|
|
458
|
-
"memberFieldName": "context"
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
"@id": "caiq:components/ActorInitQueryBase.jsonld#IActorInitQueryBaseArgs__member_contextKeyShortcuts",
|
|
462
|
-
"memberFieldName": "contextKeyShortcuts"
|
|
463
|
-
}
|
|
348
|
+
"memberKeys": [
|
|
349
|
+
"mediatorOptimizeQueryOperation",
|
|
350
|
+
"mediatorQueryOperation",
|
|
351
|
+
"mediatorQueryParse",
|
|
352
|
+
"mediatorQueryResultSerialize",
|
|
353
|
+
"mediatorQueryResultSerializeMediaTypeCombiner",
|
|
354
|
+
"mediatorQueryResultSerializeMediaTypeFormatCombiner",
|
|
355
|
+
"mediatorContextPreprocess",
|
|
356
|
+
"mediatorHttpInvalidate",
|
|
357
|
+
"logger",
|
|
358
|
+
"queryString",
|
|
359
|
+
"defaultQueryInputFormat",
|
|
360
|
+
"context",
|
|
361
|
+
"contextKeyShortcuts"
|
|
464
362
|
],
|
|
465
363
|
"constructorArguments": []
|
|
466
364
|
}
|
|
@@ -9,15 +9,9 @@
|
|
|
9
9
|
"@type": "AbstractClass",
|
|
10
10
|
"requireElement": "IQueryBody",
|
|
11
11
|
"parameters": [],
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"memberFieldName": "type"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"@id": "caiq:components/HttpServiceSparqlEndpoint.jsonld#IQueryBody__member_value",
|
|
19
|
-
"memberFieldName": "value"
|
|
20
|
-
}
|
|
12
|
+
"memberKeys": [
|
|
13
|
+
"type",
|
|
14
|
+
"value"
|
|
21
15
|
],
|
|
22
16
|
"constructorArguments": []
|
|
23
17
|
},
|
|
@@ -26,35 +20,14 @@
|
|
|
26
20
|
"@type": "AbstractClass",
|
|
27
21
|
"requireElement": "IHttpServiceSparqlEndpointArgs",
|
|
28
22
|
"parameters": [],
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"@id": "caiq:components/HttpServiceSparqlEndpoint.jsonld#IHttpServiceSparqlEndpointArgs__member_port",
|
|
40
|
-
"memberFieldName": "port"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"@id": "caiq:components/HttpServiceSparqlEndpoint.jsonld#IHttpServiceSparqlEndpointArgs__member_workers",
|
|
44
|
-
"memberFieldName": "workers"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"@id": "caiq:components/HttpServiceSparqlEndpoint.jsonld#IHttpServiceSparqlEndpointArgs__member_invalidateCacheBeforeQuery",
|
|
48
|
-
"memberFieldName": "invalidateCacheBeforeQuery"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"@id": "caiq:components/HttpServiceSparqlEndpoint.jsonld#IHttpServiceSparqlEndpointArgs__member_moduleRootPath",
|
|
52
|
-
"memberFieldName": "moduleRootPath"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"@id": "caiq:components/HttpServiceSparqlEndpoint.jsonld#IHttpServiceSparqlEndpointArgs__member_defaultConfigPath",
|
|
56
|
-
"memberFieldName": "defaultConfigPath"
|
|
57
|
-
}
|
|
23
|
+
"memberKeys": [
|
|
24
|
+
"context",
|
|
25
|
+
"timeout",
|
|
26
|
+
"port",
|
|
27
|
+
"workers",
|
|
28
|
+
"invalidateCacheBeforeQuery",
|
|
29
|
+
"moduleRootPath",
|
|
30
|
+
"defaultConfigPath"
|
|
58
31
|
],
|
|
59
32
|
"constructorArguments": []
|
|
60
33
|
}
|
|
@@ -14,39 +14,15 @@
|
|
|
14
14
|
],
|
|
15
15
|
"comment": "A physical query plan logger that stores everything in memory.",
|
|
16
16
|
"parameters": [],
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
{
|
|
27
|
-
"@id": "caiq:components/MemoryPhysicalQueryPlanLogger.jsonld#MemoryPhysicalQueryPlanLogger__member_constructor",
|
|
28
|
-
"memberFieldName": "constructor"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"@id": "caiq:components/MemoryPhysicalQueryPlanLogger.jsonld#MemoryPhysicalQueryPlanLogger__member_logOperation",
|
|
32
|
-
"memberFieldName": "logOperation"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"@id": "caiq:components/MemoryPhysicalQueryPlanLogger.jsonld#MemoryPhysicalQueryPlanLogger__member_toJson",
|
|
36
|
-
"memberFieldName": "toJson"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"@id": "caiq:components/MemoryPhysicalQueryPlanLogger.jsonld#MemoryPhysicalQueryPlanLogger__member_planNodeToJson",
|
|
40
|
-
"memberFieldName": "planNodeToJson"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"@id": "caiq:components/MemoryPhysicalQueryPlanLogger.jsonld#MemoryPhysicalQueryPlanLogger__member_getLogicalMetadata",
|
|
44
|
-
"memberFieldName": "getLogicalMetadata"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"@id": "caiq:components/MemoryPhysicalQueryPlanLogger.jsonld#MemoryPhysicalQueryPlanLogger__member_quadToString",
|
|
48
|
-
"memberFieldName": "quadToString"
|
|
49
|
-
}
|
|
17
|
+
"memberKeys": [
|
|
18
|
+
"children",
|
|
19
|
+
"rootNode",
|
|
20
|
+
"constructor",
|
|
21
|
+
"logOperation",
|
|
22
|
+
"toJson",
|
|
23
|
+
"planNodeToJson",
|
|
24
|
+
"getLogicalMetadata",
|
|
25
|
+
"quadToString"
|
|
50
26
|
],
|
|
51
27
|
"constructorArguments": []
|
|
52
28
|
}
|
|
@@ -15,67 +15,23 @@
|
|
|
15
15
|
"range": "caiq:components/ActorInitQueryBase.jsonld#ActorInitQueryBase"
|
|
16
16
|
}
|
|
17
17
|
],
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
{
|
|
36
|
-
"@id": "caiq:components/QueryEngineBase.jsonld#QueryEngineBase__member_queryBoolean",
|
|
37
|
-
"memberFieldName": "queryBoolean"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"@id": "caiq:components/QueryEngineBase.jsonld#QueryEngineBase__member_queryVoid",
|
|
41
|
-
"memberFieldName": "queryVoid"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"@id": "caiq:components/QueryEngineBase.jsonld#QueryEngineBase__member_queryOfType",
|
|
45
|
-
"memberFieldName": "queryOfType"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"@id": "caiq:components/QueryEngineBase.jsonld#QueryEngineBase__member_query",
|
|
49
|
-
"memberFieldName": "query"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"@id": "caiq:components/QueryEngineBase.jsonld#QueryEngineBase__member_queryOrExplain",
|
|
53
|
-
"memberFieldName": "queryOrExplain"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"@id": "caiq:components/QueryEngineBase.jsonld#QueryEngineBase__member_getResultMediaTypes",
|
|
57
|
-
"memberFieldName": "getResultMediaTypes"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"@id": "caiq:components/QueryEngineBase.jsonld#QueryEngineBase__member_getResultMediaTypeFormats",
|
|
61
|
-
"memberFieldName": "getResultMediaTypeFormats"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"@id": "caiq:components/QueryEngineBase.jsonld#QueryEngineBase__member_resultToString",
|
|
65
|
-
"memberFieldName": "resultToString"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"@id": "caiq:components/QueryEngineBase.jsonld#QueryEngineBase__member_invalidateHttpCache",
|
|
69
|
-
"memberFieldName": "invalidateHttpCache"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"@id": "caiq:components/QueryEngineBase.jsonld#QueryEngineBase__member_internalToFinalResult",
|
|
73
|
-
"memberFieldName": "internalToFinalResult"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"@id": "caiq:components/QueryEngineBase.jsonld#QueryEngineBase__member_finalToInternalResult",
|
|
77
|
-
"memberFieldName": "finalToInternalResult"
|
|
78
|
-
}
|
|
18
|
+
"memberKeys": [
|
|
19
|
+
"actorInitQuery",
|
|
20
|
+
"constructor",
|
|
21
|
+
"queryBindings",
|
|
22
|
+
"queryQuads",
|
|
23
|
+
"queryBoolean",
|
|
24
|
+
"queryVoid",
|
|
25
|
+
"queryOfType",
|
|
26
|
+
"query",
|
|
27
|
+
"explain",
|
|
28
|
+
"queryOrExplain",
|
|
29
|
+
"getResultMediaTypes",
|
|
30
|
+
"getResultMediaTypeFormats",
|
|
31
|
+
"resultToString",
|
|
32
|
+
"invalidateHttpCache",
|
|
33
|
+
"internalToFinalResult",
|
|
34
|
+
"finalToInternalResult"
|
|
79
35
|
],
|
|
80
36
|
"constructorArguments": [
|
|
81
37
|
{
|
|
@@ -13,19 +13,10 @@
|
|
|
13
13
|
"cr:components/Setup.jsonld#ISetupProperties"
|
|
14
14
|
],
|
|
15
15
|
"parameters": [],
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"@id": "caiq:components/QueryEngineFactoryBase.jsonld#IDynamicQueryEngineOptions__member_instanceUri",
|
|
23
|
-
"memberFieldName": "instanceUri"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"@id": "caiq:components/QueryEngineFactoryBase.jsonld#IDynamicQueryEngineOptions__member_runnerInstanceUri",
|
|
27
|
-
"memberFieldName": "runnerInstanceUri"
|
|
28
|
-
}
|
|
16
|
+
"memberKeys": [
|
|
17
|
+
"configPath",
|
|
18
|
+
"instanceUri",
|
|
19
|
+
"runnerInstanceUri"
|
|
29
20
|
],
|
|
30
21
|
"constructorArguments": []
|
|
31
22
|
}
|
|
@@ -27,35 +27,14 @@
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
],
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"@id": "caiq:components/cli/CliArgsHandlerBase.jsonld#CliArgsHandlerBase__member_getScriptOutput",
|
|
41
|
-
"memberFieldName": "getScriptOutput"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"@id": "caiq:components/cli/CliArgsHandlerBase.jsonld#CliArgsHandlerBase__member_isDevelopmentEnvironment",
|
|
45
|
-
"memberFieldName": "isDevelopmentEnvironment"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"@id": "caiq:components/cli/CliArgsHandlerBase.jsonld#CliArgsHandlerBase__member_getSourceObjectFromString",
|
|
49
|
-
"memberFieldName": "getSourceObjectFromString"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"@id": "caiq:components/cli/CliArgsHandlerBase.jsonld#CliArgsHandlerBase__member_populateYargs",
|
|
53
|
-
"memberFieldName": "populateYargs"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"@id": "caiq:components/cli/CliArgsHandlerBase.jsonld#CliArgsHandlerBase__member_handleArgs",
|
|
57
|
-
"memberFieldName": "handleArgs"
|
|
58
|
-
}
|
|
30
|
+
"memberKeys": [
|
|
31
|
+
"initialContext",
|
|
32
|
+
"constructor",
|
|
33
|
+
"getScriptOutput",
|
|
34
|
+
"isDevelopmentEnvironment",
|
|
35
|
+
"getSourceObjectFromString",
|
|
36
|
+
"populateYargs",
|
|
37
|
+
"handleArgs"
|
|
59
38
|
],
|
|
60
39
|
"constructorArguments": [
|
|
61
40
|
{
|
|
@@ -14,15 +14,9 @@
|
|
|
14
14
|
],
|
|
15
15
|
"comment": "CLI arguments handler that handles options for HTTP servers.",
|
|
16
16
|
"parameters": [],
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"memberFieldName": "populateYargs"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"@id": "caiq:components/cli/CliArgsHandlerHttp.jsonld#CliArgsHandlerHttp__member_handleArgs",
|
|
24
|
-
"memberFieldName": "handleArgs"
|
|
25
|
-
}
|
|
17
|
+
"memberKeys": [
|
|
18
|
+
"populateYargs",
|
|
19
|
+
"handleArgs"
|
|
26
20
|
],
|
|
27
21
|
"constructorArguments": []
|
|
28
22
|
}
|
|
@@ -51,31 +51,13 @@
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
],
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"memberFieldName": "queryString"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"@id": "caiq:components/cli/CliArgsHandlerQuery.jsonld#CliArgsHandlerQuery__member_context",
|
|
65
|
-
"memberFieldName": "context"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"@id": "caiq:components/cli/CliArgsHandlerQuery.jsonld#CliArgsHandlerQuery__member_constructor",
|
|
69
|
-
"memberFieldName": "constructor"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"@id": "caiq:components/cli/CliArgsHandlerQuery.jsonld#CliArgsHandlerQuery__member_populateYargs",
|
|
73
|
-
"memberFieldName": "populateYargs"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"@id": "caiq:components/cli/CliArgsHandlerQuery.jsonld#CliArgsHandlerQuery__member_handleArgs",
|
|
77
|
-
"memberFieldName": "handleArgs"
|
|
78
|
-
}
|
|
54
|
+
"memberKeys": [
|
|
55
|
+
"defaultQueryInputFormat",
|
|
56
|
+
"queryString",
|
|
57
|
+
"context",
|
|
58
|
+
"constructor",
|
|
59
|
+
"populateYargs",
|
|
60
|
+
"handleArgs"
|
|
79
61
|
],
|
|
80
62
|
"constructorArguments": [
|
|
81
63
|
{
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
"@context": {
|
|
11
11
|
"actorInitQuery": {
|
|
12
12
|
"@id": "caiq:components/QueryEngineBase.jsonld#QueryEngineBase_actorInitQuery"
|
|
13
|
+
},
|
|
14
|
+
"": {
|
|
15
|
+
"@id": "caiq:components/QueryEngineBase.jsonld#QueryEngineBase_actorInitQuery"
|
|
13
16
|
}
|
|
14
17
|
}
|
|
15
18
|
},
|
|
@@ -246,6 +249,9 @@
|
|
|
246
249
|
"@context": {
|
|
247
250
|
"initialContext": {
|
|
248
251
|
"@id": "caiq:components/cli/CliArgsHandlerBase.jsonld#CliArgsHandlerBase_initialContext"
|
|
252
|
+
},
|
|
253
|
+
"": {
|
|
254
|
+
"@id": "caiq:components/cli/CliArgsHandlerBase.jsonld#CliArgsHandlerBase_initialContext"
|
|
249
255
|
}
|
|
250
256
|
}
|
|
251
257
|
},
|
|
@@ -272,6 +278,9 @@
|
|
|
272
278
|
},
|
|
273
279
|
"ing": {
|
|
274
280
|
"@id": "caiq:components/cli/CliArgsHandlerQuery.jsonld#CliArgsHandlerQuery_queryString"
|
|
281
|
+
},
|
|
282
|
+
"": {
|
|
283
|
+
"@id": "caiq:components/cli/CliArgsHandlerQuery.jsonld#CliArgsHandlerQuery_context"
|
|
275
284
|
}
|
|
276
285
|
}
|
|
277
286
|
},
|
package/lib/QueryEngineBase.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IActorQueryResultSerializeOutput } from '@comunica/bus-query-result-serialize';
|
|
2
|
-
import type { IQueryOperationResult, IQueryEngine, IQueryExplained, QueryFormatType, QueryType, BindingsStream, QueryAlgebraContext, QueryStringContext, QueryEnhanced } from '@comunica/types';
|
|
2
|
+
import type { IQueryOperationResult, IQueryEngine, IQueryExplained, QueryFormatType, QueryType, QueryExplainMode, BindingsStream, QueryAlgebraContext, QueryStringContext, QueryEnhanced } from '@comunica/types';
|
|
3
3
|
import type * as RDF from '@rdfjs/types';
|
|
4
4
|
import type { AsyncIterator } from 'asynciterator';
|
|
5
5
|
import type { ActorInitQueryBase } from './ActorInitQueryBase';
|
|
@@ -21,6 +21,15 @@ export declare class QueryEngineBase implements IQueryEngine {
|
|
|
21
21
|
* @return {Promise<QueryType>} A promise that resolves to the query output.
|
|
22
22
|
*/
|
|
23
23
|
query<QueryFormatTypeInner extends QueryFormatType>(query: QueryFormatTypeInner, context?: QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext): Promise<QueryType>;
|
|
24
|
+
/**
|
|
25
|
+
* Explain the given query
|
|
26
|
+
* @param {string | Algebra.Operation} query A query string or algebra.
|
|
27
|
+
* @param context An optional query context.
|
|
28
|
+
* @param explainMode The explain mode.
|
|
29
|
+
* @return {Promise<QueryType | IQueryExplained>} A promise that resolves to
|
|
30
|
+
* the query output or explanation.
|
|
31
|
+
*/
|
|
32
|
+
explain<QueryFormatTypeInner extends QueryFormatType>(query: QueryFormatTypeInner, context: QueryFormatTypeInner extends string ? QueryStringContext : QueryAlgebraContext, explainMode: QueryExplainMode): Promise<IQueryExplained>;
|
|
24
33
|
/**
|
|
25
34
|
* Evaluate or explain the given query
|
|
26
35
|
* @param {string | Algebra.Operation} query A query string or algebra.
|
package/lib/QueryEngineBase.js
CHANGED
|
@@ -44,6 +44,19 @@ class QueryEngineBase {
|
|
|
44
44
|
}
|
|
45
45
|
return output;
|
|
46
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Explain the given query
|
|
49
|
+
* @param {string | Algebra.Operation} query A query string or algebra.
|
|
50
|
+
* @param context An optional query context.
|
|
51
|
+
* @param explainMode The explain mode.
|
|
52
|
+
* @return {Promise<QueryType | IQueryExplained>} A promise that resolves to
|
|
53
|
+
* the query output or explanation.
|
|
54
|
+
*/
|
|
55
|
+
async explain(query, context, explainMode) {
|
|
56
|
+
context.explain = explainMode;
|
|
57
|
+
const output = await this.queryOrExplain(query, context);
|
|
58
|
+
return output;
|
|
59
|
+
}
|
|
47
60
|
/**
|
|
48
61
|
* Evaluate or explain the given query
|
|
49
62
|
* @param {string | Algebra.Operation} query A query string or algebra.
|
|
@@ -66,21 +79,16 @@ class QueryEngineBase {
|
|
|
66
79
|
if (actionContext.has(context_entries_1.KeysInitQuery.queryFormat)) {
|
|
67
80
|
queryFormat = actionContext.get(context_entries_1.KeysInitQuery.queryFormat);
|
|
68
81
|
actionContext = actionContext.delete(context_entries_1.KeysInitQuery.queryFormat);
|
|
69
|
-
if (queryFormat.language === 'graphql'
|
|
70
|
-
actionContext = actionContext.
|
|
82
|
+
if (queryFormat.language === 'graphql') {
|
|
83
|
+
actionContext = actionContext.setDefault(context_entries_1.KeysInitQuery.graphqlSingularizeVariables, {});
|
|
71
84
|
}
|
|
72
85
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
// Set the default logger if none is provided
|
|
81
|
-
if (!actionContext.has(context_entries_1.KeysCore.log)) {
|
|
82
|
-
actionContext = actionContext.set(context_entries_1.KeysCore.log, this.actorInitQuery.logger);
|
|
83
|
-
}
|
|
86
|
+
const baseIRI = actionContext.get(context_entries_1.KeysInitQuery.baseIRI);
|
|
87
|
+
actionContext = actionContext
|
|
88
|
+
.setDefault(context_entries_1.KeysInitQuery.queryTimestamp, new Date())
|
|
89
|
+
.setDefault(context_entries_1.KeysRdfResolveQuadPattern.sourceIds, new Map())
|
|
90
|
+
// Set the default logger if none is provided
|
|
91
|
+
.setDefault(context_entries_1.KeysCore.log, this.actorInitQuery.logger);
|
|
84
92
|
// Pre-processing the context
|
|
85
93
|
actionContext = (await this.actorInitQuery.mediatorContextPreprocess.mediate({ context: actionContext })).context;
|
|
86
94
|
// Determine explain mode
|
|
@@ -256,13 +264,13 @@ class QueryEngineBase {
|
|
|
256
264
|
case 'boolean':
|
|
257
265
|
return {
|
|
258
266
|
resultType: 'boolean',
|
|
259
|
-
execute: async () => internalResult.
|
|
267
|
+
execute: async () => internalResult.execute(),
|
|
260
268
|
context: internalResult.context,
|
|
261
269
|
};
|
|
262
270
|
case 'void':
|
|
263
271
|
return {
|
|
264
272
|
resultType: 'void',
|
|
265
|
-
execute: async () => internalResult.
|
|
273
|
+
execute: async () => internalResult.execute(),
|
|
266
274
|
context: internalResult.context,
|
|
267
275
|
};
|
|
268
276
|
}
|
|
@@ -288,12 +296,12 @@ class QueryEngineBase {
|
|
|
288
296
|
case 'boolean':
|
|
289
297
|
return {
|
|
290
298
|
type: 'boolean',
|
|
291
|
-
|
|
299
|
+
execute: () => finalResult.execute(),
|
|
292
300
|
};
|
|
293
301
|
case 'void':
|
|
294
302
|
return {
|
|
295
303
|
type: 'void',
|
|
296
|
-
|
|
304
|
+
execute: () => finalResult.execute(),
|
|
297
305
|
};
|
|
298
306
|
}
|
|
299
307
|
}
|
|
@@ -135,7 +135,7 @@ class CliArgsHandlerBase {
|
|
|
135
135
|
if (args.context) {
|
|
136
136
|
Object.assign(context, JSON.parse((0, fs_1.existsSync)(args.context) ? (0, fs_1.readFileSync)(args.c, 'utf8') : args.context));
|
|
137
137
|
}
|
|
138
|
-
else if (args.sources[0]
|
|
138
|
+
else if (args.sources[0]?.startsWith('{')) {
|
|
139
139
|
// For backwards compatibility inline JSON
|
|
140
140
|
Object.assign(context, JSON.parse(args.sources[0]));
|
|
141
141
|
args.sources.shift();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comunica/actor-init-query",
|
|
3
|
-
"version": "2.0.1-alpha.
|
|
3
|
+
"version": "2.0.1-alpha.6.0",
|
|
4
4
|
"description": "A query init actor",
|
|
5
5
|
"lsd:module": true,
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"publishConfig": {
|
|
14
14
|
"access": "public"
|
|
15
15
|
},
|
|
16
|
+
"sideEffects": false,
|
|
16
17
|
"keywords": [
|
|
17
18
|
"comunica",
|
|
18
19
|
"actor",
|
|
@@ -30,20 +31,20 @@
|
|
|
30
31
|
"lib/**/*.js"
|
|
31
32
|
],
|
|
32
33
|
"dependencies": {
|
|
33
|
-
"@comunica/actor-http-proxy": "2.0.1-alpha.
|
|
34
|
-
"@comunica/bindings-factory": "2.0.1-alpha.
|
|
35
|
-
"@comunica/bus-context-preprocess": "2.0.1-alpha.
|
|
36
|
-
"@comunica/bus-http-invalidate": "2.0.1-alpha.
|
|
37
|
-
"@comunica/bus-init": "2.0.1-alpha.
|
|
38
|
-
"@comunica/bus-optimize-query-operation": "2.0.1-alpha.
|
|
39
|
-
"@comunica/bus-query-operation": "2.0.1-alpha.
|
|
40
|
-
"@comunica/bus-query-parse": "2.0.1-alpha.
|
|
41
|
-
"@comunica/bus-query-result-serialize": "2.0.1-alpha.
|
|
42
|
-
"@comunica/context-entries": "2.0.1-alpha.
|
|
43
|
-
"@comunica/core": "2.0.1-alpha.
|
|
44
|
-
"@comunica/logger-pretty": "2.0.1-alpha.
|
|
45
|
-
"@comunica/runner": "2.0.1-alpha.
|
|
46
|
-
"@comunica/types": "2.0.1-alpha.
|
|
34
|
+
"@comunica/actor-http-proxy": "2.0.1-alpha.6.0",
|
|
35
|
+
"@comunica/bindings-factory": "2.0.1-alpha.6.0",
|
|
36
|
+
"@comunica/bus-context-preprocess": "2.0.1-alpha.6.0",
|
|
37
|
+
"@comunica/bus-http-invalidate": "2.0.1-alpha.6.0",
|
|
38
|
+
"@comunica/bus-init": "2.0.1-alpha.6.0",
|
|
39
|
+
"@comunica/bus-optimize-query-operation": "2.0.1-alpha.6.0",
|
|
40
|
+
"@comunica/bus-query-operation": "2.0.1-alpha.6.0",
|
|
41
|
+
"@comunica/bus-query-parse": "2.0.1-alpha.6.0",
|
|
42
|
+
"@comunica/bus-query-result-serialize": "2.0.1-alpha.6.0",
|
|
43
|
+
"@comunica/context-entries": "2.0.1-alpha.6.0",
|
|
44
|
+
"@comunica/core": "2.0.1-alpha.6.0",
|
|
45
|
+
"@comunica/logger-pretty": "2.0.1-alpha.6.0",
|
|
46
|
+
"@comunica/runner": "2.0.1-alpha.6.0",
|
|
47
|
+
"@comunica/types": "2.0.1-alpha.6.0",
|
|
47
48
|
"@rdfjs/types": "*",
|
|
48
49
|
"@types/yargs": "^17.0.2",
|
|
49
50
|
"asynciterator": "^3.2.1",
|
|
@@ -63,5 +64,5 @@
|
|
|
63
64
|
"browser": {
|
|
64
65
|
"./lib/index.js": "./lib/index-browser.js"
|
|
65
66
|
},
|
|
66
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "bbf46a068e635256495a40e784a4691b22e88bd3"
|
|
67
68
|
}
|