@comunica/actor-query-operation-leftjoin 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/ActorQueryOperationLeftJoin.jsonld +11 -1
- package/components/components.jsonld +0 -0
- package/components/context.jsonld +0 -0
- package/lib/ActorQueryOperationLeftJoin.d.ts +1 -1
- package/lib/ActorQueryOperationLeftJoin.js +3 -3
- package/lib/ActorQueryOperationLeftJoin.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 +9 -9
|
@@ -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 LeftJoin Query Operation Actor.
|
|
9
9
|
*/
|
|
@@ -4,21 +4,21 @@ exports.ActorQueryOperationLeftJoin = 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");
|
|
7
8
|
const utils_query_operation_1 = require("@comunica/utils-query-operation");
|
|
8
|
-
const sparqlalgebrajs_1 = require("sparqlalgebrajs");
|
|
9
9
|
/**
|
|
10
10
|
* A comunica LeftJoin Query Operation Actor.
|
|
11
11
|
*/
|
|
12
12
|
class ActorQueryOperationLeftJoin extends bus_query_operation_1.ActorQueryOperationTypedMediated {
|
|
13
13
|
constructor(args) {
|
|
14
|
-
super(args,
|
|
14
|
+
super(args, utils_algebra_1.Algebra.Types.LEFT_JOIN);
|
|
15
15
|
}
|
|
16
16
|
async testOperation(_operation, _context) {
|
|
17
17
|
return (0, core_1.passTestVoid)();
|
|
18
18
|
}
|
|
19
19
|
async runOperation(operationOriginal, context) {
|
|
20
20
|
const dataFactory = context.getSafe(context_entries_1.KeysInitQuery.dataFactory);
|
|
21
|
-
const algebraFactory = new
|
|
21
|
+
const algebraFactory = new utils_algebra_1.AlgebraFactory(dataFactory);
|
|
22
22
|
// Delegate to join bus
|
|
23
23
|
const entries = (await Promise.all(operationOriginal.input
|
|
24
24
|
.map(async (subOperation, index) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActorQueryOperationLeftJoin.js","sourceRoot":"","sources":["ActorQueryOperationLeftJoin.ts"],"names":[],"mappings":";;;AACA,uEAAiF;AAEjF,+DAA0D;AAE1D,yCAA8C;AAE9C,2EAAkE;AAElE
|
|
1
|
+
{"version":3,"file":"ActorQueryOperationLeftJoin.js","sourceRoot":"","sources":["ActorQueryOperationLeftJoin.ts"],"names":[],"mappings":";;;AACA,uEAAiF;AAEjF,+DAA0D;AAE1D,yCAA8C;AAE9C,2DAAkE;AAClE,2EAAkE;AAElE;;GAEG;AACH,MAAa,2BAA4B,SAAQ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kEAwCC","sourcesContent":["import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { MediatorRdfJoin } from '@comunica/bus-rdf-join';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { IActorTest, TestResult } from '@comunica/core';\nimport { passTestVoid } from '@comunica/core';\nimport type { ComunicaDataFactory, IActionContext, IJoinEntry, IQueryOperationResult } from '@comunica/types';\nimport { Algebra, AlgebraFactory } from '@comunica/utils-algebra';\nimport { getSafeBindings } from '@comunica/utils-query-operation';\n\n/**\n * A comunica LeftJoin Query Operation Actor.\n */\nexport class ActorQueryOperationLeftJoin extends ActorQueryOperationTypedMediated<Algebra.LeftJoin> {\n public readonly mediatorJoin: MediatorRdfJoin;\n\n public constructor(args: IActorQueryOperationLeftJoinArgs) {\n super(args, Algebra.Types.LEFT_JOIN);\n }\n\n public async testOperation(_operation: Algebra.LeftJoin, _context: IActionContext): Promise<TestResult<IActorTest>> {\n return passTestVoid();\n }\n\n public async runOperation(operationOriginal: Algebra.LeftJoin, context: IActionContext):\n Promise<IQueryOperationResult> {\n const dataFactory: ComunicaDataFactory = context.getSafe(KeysInitQuery.dataFactory);\n const algebraFactory = new AlgebraFactory(dataFactory);\n\n // Delegate to join bus\n const entries: IJoinEntry[] = (await Promise.all(operationOriginal.input\n .map(async(subOperation, index) => {\n const output = getSafeBindings(await this.mediatorQueryOperation.mediate({ operation: subOperation, context }));\n\n // If we have an expression in the left join,\n // we attach the expression to the right-hand operation,\n // and enforce a bind-join.\n if (operationOriginal.expression && index === 1) {\n return {\n output,\n operation: algebraFactory.createFilter(subOperation, operationOriginal.expression),\n operationRequired: true,\n };\n }\n\n return {\n output,\n operation: subOperation,\n };\n })));\n\n return await this.mediatorJoin.mediate({ type: 'optional', entries, context });\n }\n}\n\nexport interface IActorQueryOperationLeftJoinArgs 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-leftjoin",
|
|
3
|
-
"version": "4.4.0",
|
|
3
|
+
"version": "4.4.2-alpha.49.0",
|
|
4
4
|
"description": "A leftjoin query-operation actor",
|
|
5
5
|
"lsd:module": true,
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"build:components": "componentsjs-generator"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@comunica/bus-query-operation": "
|
|
45
|
-
"@comunica/bus-rdf-join": "
|
|
46
|
-
"@comunica/context-entries": "
|
|
47
|
-
"@comunica/core": "
|
|
48
|
-
"@comunica/types": "
|
|
49
|
-
"@comunica/utils-
|
|
50
|
-
"
|
|
44
|
+
"@comunica/bus-query-operation": "4.4.2-alpha.49.0",
|
|
45
|
+
"@comunica/bus-rdf-join": "4.4.2-alpha.49.0",
|
|
46
|
+
"@comunica/context-entries": "4.4.2-alpha.49.0",
|
|
47
|
+
"@comunica/core": "4.4.2-alpha.49.0",
|
|
48
|
+
"@comunica/types": "4.4.2-alpha.49.0",
|
|
49
|
+
"@comunica/utils-algebra": "4.4.2-alpha.49.0",
|
|
50
|
+
"@comunica/utils-query-operation": "4.4.2-alpha.49.0"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "ef6f96cfd8faf7c37955bb7e0fe9f6fc6a994bdf"
|
|
53
53
|
}
|