@comunica/actor-query-operation-leftjoin 4.5.0 → 5.0.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/README.md +1 -1
- package/components/ActorQueryOperationLeftJoin.jsonld +26 -16
- package/components/components.jsonld +1 -1
- package/components/context.jsonld +1 -1
- package/lib/ActorQueryOperationLeftJoin.d.ts +1 -1
- package/lib/ActorQueryOperationLeftJoin.js +5 -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
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ After installing, this package can be added to your engine's configuration as fo
|
|
|
23
23
|
{
|
|
24
24
|
"@context": [
|
|
25
25
|
...
|
|
26
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-leftjoin/^
|
|
26
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-leftjoin/^5.0.0/components/context.jsonld"
|
|
27
27
|
],
|
|
28
28
|
"actors": [
|
|
29
29
|
...
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@context": [
|
|
3
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-leftjoin/^
|
|
4
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^
|
|
5
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-operation/^
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-leftjoin/^5.0.0/components/context.jsonld",
|
|
4
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^5.0.0/components/context.jsonld",
|
|
5
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-operation/^5.0.0/components/context.jsonld"
|
|
6
6
|
],
|
|
7
7
|
"@id": "npmd:@comunica/actor-query-operation-leftjoin",
|
|
8
8
|
"components": [
|
|
@@ -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
|
],
|
|
@@ -50,37 +60,37 @@
|
|
|
50
60
|
"genericTypeInstances": [
|
|
51
61
|
{
|
|
52
62
|
"@type": "ParameterRangeGenericTypeReference",
|
|
53
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
63
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
54
64
|
},
|
|
55
65
|
{
|
|
56
66
|
"@type": "ParameterRangeGenericTypeReference",
|
|
57
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
67
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
58
68
|
},
|
|
59
69
|
{
|
|
60
70
|
"@type": "ParameterRangeGenericTypeReference",
|
|
61
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
71
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
62
72
|
},
|
|
63
73
|
{
|
|
64
74
|
"@type": "ParameterRangeGenericTypeReference",
|
|
65
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
75
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
|
|
66
76
|
}
|
|
67
77
|
]
|
|
68
78
|
},
|
|
69
79
|
{
|
|
70
80
|
"@type": "ParameterRangeGenericTypeReference",
|
|
71
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
81
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
72
82
|
},
|
|
73
83
|
{
|
|
74
84
|
"@type": "ParameterRangeGenericTypeReference",
|
|
75
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
85
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
76
86
|
},
|
|
77
87
|
{
|
|
78
88
|
"@type": "ParameterRangeGenericTypeReference",
|
|
79
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
89
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
80
90
|
},
|
|
81
91
|
{
|
|
82
92
|
"@type": "ParameterRangeGenericTypeReference",
|
|
83
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
93
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
|
|
84
94
|
}
|
|
85
95
|
]
|
|
86
96
|
},
|
|
@@ -117,19 +127,19 @@
|
|
|
117
127
|
"genericTypeInstances": [
|
|
118
128
|
{
|
|
119
129
|
"@type": "ParameterRangeGenericTypeReference",
|
|
120
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
130
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
121
131
|
},
|
|
122
132
|
{
|
|
123
133
|
"@type": "ParameterRangeGenericTypeReference",
|
|
124
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
134
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
125
135
|
},
|
|
126
136
|
{
|
|
127
137
|
"@type": "ParameterRangeGenericTypeReference",
|
|
128
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
138
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
129
139
|
},
|
|
130
140
|
{
|
|
131
141
|
"@type": "ParameterRangeGenericTypeReference",
|
|
132
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
142
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
|
|
133
143
|
}
|
|
134
144
|
]
|
|
135
145
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@context": [
|
|
3
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-leftjoin/^
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-leftjoin/^5.0.0/components/context.jsonld"
|
|
4
4
|
],
|
|
5
5
|
"@id": "npmd:@comunica/actor-query-operation-leftjoin",
|
|
6
6
|
"@type": "Module",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^6.0.0/components/context.jsonld",
|
|
4
4
|
{
|
|
5
5
|
"npmd": "https://linkedsoftwaredependencies.org/bundles/npm/",
|
|
6
|
-
"caqol": "npmd:@comunica/actor-query-operation-leftjoin/^
|
|
6
|
+
"caqol": "npmd:@comunica/actor-query-operation-leftjoin/^5.0.0/",
|
|
7
7
|
"ActorQueryOperationLeftJoin": {
|
|
8
8
|
"@id": "caqol:components/ActorQueryOperationLeftJoin.jsonld#ActorQueryOperationLeftJoin",
|
|
9
9
|
"@prefix": true,
|
|
@@ -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,23 @@ 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
|
+
mediatorJoin;
|
|
13
14
|
constructor(args) {
|
|
14
|
-
super(args,
|
|
15
|
+
super(args, utils_algebra_1.Algebra.Types.LEFT_JOIN);
|
|
16
|
+
this.mediatorJoin = args.mediatorJoin;
|
|
15
17
|
}
|
|
16
18
|
async testOperation(_operation, _context) {
|
|
17
19
|
return (0, core_1.passTestVoid)();
|
|
18
20
|
}
|
|
19
21
|
async runOperation(operationOriginal, context) {
|
|
20
22
|
const dataFactory = context.getSafe(context_entries_1.KeysInitQuery.dataFactory);
|
|
21
|
-
const algebraFactory = new
|
|
23
|
+
const algebraFactory = new utils_algebra_1.AlgebraFactory(dataFactory);
|
|
22
24
|
// Delegate to join bus
|
|
23
25
|
const entries = (await Promise.all(operationOriginal.input
|
|
24
26
|
.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,sDAAkD;IACjF,YAAY,CAAkB;IAE9C,YAAmB,IAAsC;QACvD,KAAK,CAAC,IAAI,EAAE,uBAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACrC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;IACxC,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,UAA4B,EAAE,QAAwB;QAC/E,OAAO,IAAA,mBAAY,GAAE,CAAC;IACxB,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,iBAAmC,EAAE,OAAuB;QAEpF,MAAM,WAAW,GAAwB,OAAO,CAAC,OAAO,CAAC,+BAAa,CAAC,WAAW,CAAC,CAAC;QACpF,MAAM,cAAc,GAAG,IAAI,8BAAc,CAAC,WAAW,CAAC,CAAC;QAEvD,uBAAuB;QACvB,MAAM,OAAO,GAAiB,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK;aACrE,GAAG,CAAC,KAAK,EAAC,YAAY,EAAE,KAAK,EAAE,EAAE;YAChC,MAAM,MAAM,GAAG,IAAA,uCAAe,EAAC,MAAM,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;YAEhH,6CAA6C;YAC7C,wDAAwD;YACxD,2BAA2B;YAC3B,IAAI,iBAAiB,CAAC,UAAU,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;gBAChD,OAAO;oBACL,MAAM;oBACN,SAAS,EAAE,cAAc,CAAC,YAAY,CAAC,YAAY,EAAE,iBAAiB,CAAC,UAAU,CAAC;oBAClF,iBAAiB,EAAE,IAAI;iBACxB,CAAC;YACJ,CAAC;YAED,OAAO;gBACL,MAAM;gBACN,SAAS,EAAE,YAAY;aACxB,CAAC;QACJ,CAAC,CAAC,CAAC,CAAC,CAAC;QAEP,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;CACF;AAzCD,kEAyCC","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 this.mediatorJoin = args.mediatorJoin;\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": "
|
|
3
|
+
"version": "5.0.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": "^5.0.0",
|
|
45
|
+
"@comunica/bus-rdf-join": "^5.0.0",
|
|
46
|
+
"@comunica/context-entries": "^5.0.0",
|
|
47
|
+
"@comunica/core": "^5.0.0",
|
|
48
|
+
"@comunica/types": "^5.0.0",
|
|
49
|
+
"@comunica/utils-algebra": "^5.0.0",
|
|
50
|
+
"@comunica/utils-query-operation": "^5.0.0"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "0b1756fdb9bef014133432489627c1bd71779bd0"
|
|
53
53
|
}
|