@comunica/actor-query-operation-minus 4.4.0 → 4.4.2-alpha.49.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/ActorQueryOperationMinus.jsonld +11 -1
- package/components/components.jsonld +0 -0
- package/components/context.jsonld +0 -0
- package/lib/ActorQueryOperationMinus.d.ts +1 -1
- package/lib/ActorQueryOperationMinus.js +5 -2
- package/lib/ActorQueryOperationMinus.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 +8 -8
|
@@ -15,7 +15,17 @@
|
|
|
15
15
|
"@type": "GenericComponentExtension",
|
|
16
16
|
"component": "cbqo:components/ActorQueryOperationTypedMediated.jsonld#ActorQueryOperationTypedMediated",
|
|
17
17
|
"genericTypeInstances": [
|
|
18
|
-
|
|
18
|
+
{
|
|
19
|
+
"@type": "ParameterRangeIntersection",
|
|
20
|
+
"parameterRangeElements": [
|
|
21
|
+
{
|
|
22
|
+
"@type": "ParameterRangeWildcard"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"@type": "ParameterRangeWildcard"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
19
29
|
]
|
|
20
30
|
}
|
|
21
31
|
],
|
|
File without changes
|
|
File without changes
|
|
@@ -3,7 +3,7 @@ import { ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation'
|
|
|
3
3
|
import type { MediatorRdfJoin } from '@comunica/bus-rdf-join';
|
|
4
4
|
import type { IActorTest, TestResult } from '@comunica/core';
|
|
5
5
|
import type { IActionContext, IQueryOperationResult } from '@comunica/types';
|
|
6
|
-
import
|
|
6
|
+
import { Algebra } from '@comunica/utils-algebra';
|
|
7
7
|
/**
|
|
8
8
|
* A comunica Minus Query Operation Actor.
|
|
9
9
|
*/
|
|
@@ -3,18 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ActorQueryOperationMinus = void 0;
|
|
4
4
|
const bus_query_operation_1 = require("@comunica/bus-query-operation");
|
|
5
5
|
const core_1 = require("@comunica/core");
|
|
6
|
+
const utils_algebra_1 = require("@comunica/utils-algebra");
|
|
6
7
|
const utils_query_operation_1 = require("@comunica/utils-query-operation");
|
|
7
8
|
/**
|
|
8
9
|
* A comunica Minus Query Operation Actor.
|
|
9
10
|
*/
|
|
10
11
|
class ActorQueryOperationMinus extends bus_query_operation_1.ActorQueryOperationTypedMediated {
|
|
11
12
|
constructor(args) {
|
|
12
|
-
super(args,
|
|
13
|
+
super(args, utils_algebra_1.Algebra.Types.MINUS);
|
|
13
14
|
}
|
|
14
15
|
async testOperation(_operation, _context) {
|
|
15
16
|
return (0, core_1.passTestVoid)();
|
|
16
17
|
}
|
|
17
18
|
async runOperation(operationOriginal, context) {
|
|
19
|
+
// Propagate information about GRAPH ?g existing outside the MINUS scope to the join actor.
|
|
20
|
+
const graphVariableFromParentScope = operationOriginal.graphScopeVar;
|
|
18
21
|
const entries = (await Promise.all(operationOriginal.input
|
|
19
22
|
.map(async (subOperation) => ({
|
|
20
23
|
output: await this.mediatorQueryOperation.mediate({ operation: subOperation, context }),
|
|
@@ -24,7 +27,7 @@ class ActorQueryOperationMinus extends bus_query_operation_1.ActorQueryOperation
|
|
|
24
27
|
output: (0, utils_query_operation_1.getSafeBindings)(output),
|
|
25
28
|
operation,
|
|
26
29
|
}));
|
|
27
|
-
return this.mediatorJoin.mediate({ type: 'minus', entries, context });
|
|
30
|
+
return this.mediatorJoin.mediate({ type: 'minus', entries, context, graphVariableFromParentScope });
|
|
28
31
|
}
|
|
29
32
|
}
|
|
30
33
|
exports.ActorQueryOperationMinus = ActorQueryOperationMinus;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActorQueryOperationMinus.js","sourceRoot":"","sources":["ActorQueryOperationMinus.ts"],"names":[],"mappings":";;;AACA,uEAEuC;AAGvC,yCAA8C;AAE9C,2EAAkE;
|
|
1
|
+
{"version":3,"file":"ActorQueryOperationMinus.js","sourceRoot":"","sources":["ActorQueryOperationMinus.ts"],"names":[],"mappings":";;;AACA,uEAEuC;AAGvC,yCAA8C;AAE9C,2DAAkD;AAClD,2EAAkE;AAElE;;GAEG;AACH,MAAa,wBAAyB,SAAQ,sDAA+C;IAG3F,YAAmB,IAAmC;QACpD,KAAK,CAAC,IAAI,EAAE,uBAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,UAAyB,EAAE,QAAwB;QAC5E,OAAO,IAAA,mBAAY,GAAE,CAAC;IACxB,CAAC;IAEM,KAAK,CAAC,YAAY,CACvB,iBAAgC,EAChC,OAAuB;QAEvB,2FAA2F;QAC3F,MAAM,4BAA4B,GAAG,iBAAiB,CAAC,aAAa,CAAC;QAErE,MAAM,OAAO,GAAiB,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK;aACrE,GAAG,CAAC,KAAK,EAAC,YAAY,EAAC,EAAE,CAAC,CAAC;YAC1B,MAAM,EAAE,MAAM,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC;YACvF,SAAS,EAAE,YAAY;SACxB,CAAC,CAAC,CAAC,CAAC;aACJ,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;YAC/B,MAAM,EAAE,IAAA,uCAAe,EAAC,MAAM,CAAC;YAC/B,SAAS;SACV,CAAC,CAAC,CAAC;QAEN,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC,CAAC;IACtG,CAAC;CACF;AA9BD,4DA8BC","sourcesContent":["import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { MediatorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IActorTest, TestResult } from '@comunica/core';\nimport { passTestVoid } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResult, IJoinEntry } from '@comunica/types';\nimport { Algebra } from '@comunica/utils-algebra';\nimport { getSafeBindings } from '@comunica/utils-query-operation';\n\n/**\n * A comunica Minus Query Operation Actor.\n */\nexport class ActorQueryOperationMinus extends ActorQueryOperationTypedMediated<Algebra.Minus> {\n public readonly mediatorJoin: MediatorRdfJoin;\n\n public constructor(args: IActorQueryOperationMinusArgs) {\n super(args, Algebra.Types.MINUS);\n }\n\n public async testOperation(_operation: Algebra.Minus, _context: IActionContext): Promise<TestResult<IActorTest>> {\n return passTestVoid();\n }\n\n public async runOperation(\n operationOriginal: Algebra.Minus,\n context: IActionContext,\n ): Promise<IQueryOperationResult> {\n // Propagate information about GRAPH ?g existing outside the MINUS scope to the join actor.\n const graphVariableFromParentScope = operationOriginal.graphScopeVar;\n\n const entries: IJoinEntry[] = (await Promise.all(operationOriginal.input\n .map(async subOperation => ({\n output: await this.mediatorQueryOperation.mediate({ operation: subOperation, context }),\n operation: subOperation,\n }))))\n .map(({ output, operation }) => ({\n output: getSafeBindings(output),\n operation,\n }));\n\n return this.mediatorJoin.mediate({ type: 'minus', entries, context, graphVariableFromParentScope });\n }\n}\n\nexport interface IActorQueryOperationMinusArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for joining Bindings streams\n */\n mediatorJoin: MediatorRdfJoin;\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-minus",
|
|
3
|
-
"version": "4.4.0",
|
|
3
|
+
"version": "4.4.2-alpha.49.0",
|
|
4
4
|
"description": "A minus query-operation actor",
|
|
5
5
|
"lsd:module": true,
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"build:components": "componentsjs-generator"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@comunica/bus-query-operation": "
|
|
45
|
-
"@comunica/bus-rdf-join": "
|
|
46
|
-
"@comunica/core": "
|
|
47
|
-
"@comunica/types": "
|
|
48
|
-
"@comunica/utils-
|
|
49
|
-
"
|
|
44
|
+
"@comunica/bus-query-operation": "4.4.2-alpha.49.0",
|
|
45
|
+
"@comunica/bus-rdf-join": "4.4.2-alpha.49.0",
|
|
46
|
+
"@comunica/core": "4.4.2-alpha.49.0",
|
|
47
|
+
"@comunica/types": "4.4.2-alpha.49.0",
|
|
48
|
+
"@comunica/utils-algebra": "4.4.2-alpha.49.0",
|
|
49
|
+
"@comunica/utils-query-operation": "4.4.2-alpha.49.0"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "ef6f96cfd8faf7c37955bb7e0fe9f6fc6a994bdf"
|
|
52
52
|
}
|