@comunica/actor-query-operation-values 4.4.2-alpha.49.0 → 4.5.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/ActorQueryOperationValues.jsonld +1 -11
- package/components/components.jsonld +0 -0
- package/components/context.jsonld +0 -0
- package/lib/ActorQueryOperationValues.d.ts +1 -1
- package/lib/ActorQueryOperationValues.js +3 -4
- package/lib/ActorQueryOperationValues.js.map +1 -1
- package/lib/index.d.ts +0 -0
- package/lib/index.js +0 -0
- package/lib/index.js.map +0 -0
- package/package.json +11 -11
|
@@ -16,17 +16,7 @@
|
|
|
16
16
|
"@type": "GenericComponentExtension",
|
|
17
17
|
"component": "cbqo:components/ActorQueryOperationTyped.jsonld#ActorQueryOperationTyped",
|
|
18
18
|
"genericTypeInstances": [
|
|
19
|
-
|
|
20
|
-
"@type": "ParameterRangeIntersection",
|
|
21
|
-
"parameterRangeElements": [
|
|
22
|
-
{
|
|
23
|
-
"@type": "ParameterRangeWildcard"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"@type": "ParameterRangeWildcard"
|
|
27
|
-
}
|
|
28
|
-
]
|
|
29
|
-
}
|
|
19
|
+
"urn:npm:sparqlalgebrajs:Values"
|
|
30
20
|
]
|
|
31
21
|
}
|
|
32
22
|
],
|
|
File without changes
|
|
File without changes
|
|
@@ -3,7 +3,7 @@ import type { IActionQueryOperation } from '@comunica/bus-query-operation';
|
|
|
3
3
|
import { ActorQueryOperationTyped } from '@comunica/bus-query-operation';
|
|
4
4
|
import type { IActorArgs, IActorTest, TestResult } from '@comunica/core';
|
|
5
5
|
import type { IQueryOperationResult, IActionContext } from '@comunica/types';
|
|
6
|
-
import { Algebra } from '
|
|
6
|
+
import type { Algebra } from 'sparqlalgebrajs';
|
|
7
7
|
/**
|
|
8
8
|
* A comunica Values Query Operation Actor.
|
|
9
9
|
*/
|
|
@@ -4,7 +4,6 @@ exports.ActorQueryOperationValues = void 0;
|
|
|
4
4
|
const bus_query_operation_1 = require("@comunica/bus-query-operation");
|
|
5
5
|
const context_entries_1 = require("@comunica/context-entries");
|
|
6
6
|
const core_1 = require("@comunica/core");
|
|
7
|
-
const utils_algebra_1 = require("@comunica/utils-algebra");
|
|
8
7
|
const utils_bindings_factory_1 = require("@comunica/utils-bindings-factory");
|
|
9
8
|
const utils_metadata_1 = require("@comunica/utils-metadata");
|
|
10
9
|
const asynciterator_1 = require("asynciterator");
|
|
@@ -13,7 +12,7 @@ const asynciterator_1 = require("asynciterator");
|
|
|
13
12
|
*/
|
|
14
13
|
class ActorQueryOperationValues extends bus_query_operation_1.ActorQueryOperationTyped {
|
|
15
14
|
constructor(args) {
|
|
16
|
-
super(args,
|
|
15
|
+
super(args, 'values');
|
|
17
16
|
}
|
|
18
17
|
async testOperation(_operation, _context) {
|
|
19
18
|
return (0, core_1.passTestVoid)();
|
|
@@ -23,13 +22,13 @@ class ActorQueryOperationValues extends bus_query_operation_1.ActorQueryOperatio
|
|
|
23
22
|
const bindingsFactory = await utils_bindings_factory_1.BindingsFactory.create(this.mediatorMergeBindingsContext, context, dataFactory);
|
|
24
23
|
const bindingsStream = new asynciterator_1.ArrayIterator(operation.bindings
|
|
25
24
|
.map(x => bindingsFactory.bindings(Object.entries(x)
|
|
26
|
-
.map(([key, value]) => [dataFactory.variable(key), value]))));
|
|
25
|
+
.map(([key, value]) => [dataFactory.variable(key.slice(1)), value]))));
|
|
27
26
|
const metadata = () => Promise.resolve({
|
|
28
27
|
state: new utils_metadata_1.MetadataValidationState(),
|
|
29
28
|
cardinality: { type: 'exact', value: operation.bindings.length },
|
|
30
29
|
variables: operation.variables.map(variable => ({
|
|
31
30
|
variable,
|
|
32
|
-
canBeUndef: operation.bindings.some(bindings => !(variable.value in bindings)),
|
|
31
|
+
canBeUndef: operation.bindings.some(bindings => !(`?${variable.value}` in bindings)),
|
|
33
32
|
})),
|
|
34
33
|
});
|
|
35
34
|
return { type: 'bindings', bindingsStream, metadata };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActorQueryOperationValues.js","sourceRoot":"","sources":["ActorQueryOperationValues.ts"],"names":[],"mappings":";;;AAEA,uEAAyE;AACzE,+DAA0D;AAE1D,yCAA8C;AAS9C,
|
|
1
|
+
{"version":3,"file":"ActorQueryOperationValues.js","sourceRoot":"","sources":["ActorQueryOperationValues.ts"],"names":[],"mappings":";;;AAEA,uEAAyE;AACzE,+DAA0D;AAE1D,yCAA8C;AAS9C,6EAAmE;AACnE,6DAAmE;AACnE,iDAA8C;AAG9C;;GAEG;AACH,MAAa,yBAA0B,SAAQ,8CAAwC;IAGrF,YAAmB,IAAgD;QACjE,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACxB,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,UAA0B,EAAE,QAAwB;QAC7E,OAAO,IAAA,mBAAY,GAAE,CAAC;IACxB,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,SAAyB,EAAE,OAAuB;QAE1E,MAAM,WAAW,GAAwB,OAAO,CAAC,OAAO,CAAC,+BAAa,CAAC,WAAW,CAAC,CAAC;QACpF,MAAM,eAAe,GAAG,MAAM,wCAAe,CAAC,MAAM,CAAC,IAAI,CAAC,4BAA4B,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QAE9G,MAAM,cAAc,GAAmB,IAAI,6BAAa,CAAW,SAAS,CAAC,QAAQ;aAClF,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;aACjD,GAAG,CAAC,CAAC,CAAE,GAAG,EAAE,KAAK,CAAE,EAAE,EAAE,CAAC,CAAE,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/E,MAAM,QAAQ,GAAG,GAA8B,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;YAChE,KAAK,EAAE,IAAI,wCAAuB,EAAE;YACpC,WAAW,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;YAChE,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;gBAC9C,QAAQ;gBACR,UAAU,EAAE,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,KAAK,EAAE,IAAI,QAAQ,CAAC,CAAC;aACrF,CAAC,CAAC;SACJ,CAAC,CAAC;QACH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC;IACxD,CAAC;CACF;AA7BD,8DA6BC","sourcesContent":["import type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActionQueryOperation } from '@comunica/bus-query-operation';\nimport { ActorQueryOperationTyped } from '@comunica/bus-query-operation';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { IActorArgs, IActorTest, TestResult } from '@comunica/core';\nimport { passTestVoid } from '@comunica/core';\nimport type {\n IQueryOperationResult,\n BindingsStream,\n Bindings,\n IActionContext,\n MetadataBindings,\n ComunicaDataFactory,\n} from '@comunica/types';\nimport { BindingsFactory } from '@comunica/utils-bindings-factory';\nimport { MetadataValidationState } from '@comunica/utils-metadata';\nimport { ArrayIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Values Query Operation Actor.\n */\nexport class ActorQueryOperationValues extends ActorQueryOperationTyped<Algebra.Values> {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationUpdateDeleteInsertArgs) {\n super(args, 'values');\n }\n\n public async testOperation(_operation: Algebra.Values, _context: IActionContext): Promise<TestResult<IActorTest>> {\n return passTestVoid();\n }\n\n public async runOperation(operation: Algebra.Values, context: IActionContext):\n Promise<IQueryOperationResult> {\n const dataFactory: ComunicaDataFactory = context.getSafe(KeysInitQuery.dataFactory);\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context, dataFactory);\n\n const bindingsStream: BindingsStream = new ArrayIterator<Bindings>(operation.bindings\n .map(x => bindingsFactory.bindings(Object.entries(x)\n .map(([ key, value ]) => [ dataFactory.variable(key.slice(1)), value ]))));\n const metadata = (): Promise<MetadataBindings> => Promise.resolve({\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: operation.bindings.length },\n variables: operation.variables.map(variable => ({\n variable,\n canBeUndef: operation.bindings.some(bindings => !(`?${variable.value}` in bindings)),\n })),\n });\n return { type: 'bindings', bindingsStream, metadata };\n }\n}\n\nexport interface IActorQueryOperationUpdateDeleteInsertArgs extends\n IActorArgs<IActionQueryOperation, IActorTest, IQueryOperationResult> {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
File without changes
|
package/lib/index.js
CHANGED
|
File without changes
|
package/lib/index.js.map
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comunica/actor-query-operation-values",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "A values query-operation actor",
|
|
5
5
|
"lsd:module": true,
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"build:components": "componentsjs-generator"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@comunica/bus-merge-bindings-context": "4.
|
|
45
|
-
"@comunica/bus-query-operation": "4.
|
|
46
|
-
"@comunica/context-entries": "4.
|
|
47
|
-
"@comunica/core": "4.
|
|
48
|
-
"@comunica/types": "4.
|
|
49
|
-
"@comunica/utils-
|
|
50
|
-
"@comunica/utils-
|
|
51
|
-
"
|
|
52
|
-
"
|
|
44
|
+
"@comunica/bus-merge-bindings-context": "^4.5.0",
|
|
45
|
+
"@comunica/bus-query-operation": "^4.5.0",
|
|
46
|
+
"@comunica/context-entries": "^4.5.0",
|
|
47
|
+
"@comunica/core": "^4.5.0",
|
|
48
|
+
"@comunica/types": "^4.5.0",
|
|
49
|
+
"@comunica/utils-bindings-factory": "^4.5.0",
|
|
50
|
+
"@comunica/utils-metadata": "^4.5.0",
|
|
51
|
+
"asynciterator": "^3.9.0",
|
|
52
|
+
"sparqlalgebrajs": "^5.0.2"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "2bcd98c387a021fc5c08d375793c205ca3d1bf0d"
|
|
55
55
|
}
|