@comunica/actor-query-operation-update-deleteinsert 4.4.2-alpha.49.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 +3 -3
- package/components/ActorQueryOperationUpdateDeleteInsert.jsonld +15 -15
- package/components/components.jsonld +1 -1
- package/components/context.jsonld +1 -1
- package/lib/ActorQueryOperationUpdateDeleteInsert.js +5 -1
- package/lib/ActorQueryOperationUpdateDeleteInsert.js.map +1 -1
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -25,10 +25,10 @@ After installing, this package can be added to your engine's configuration as fo
|
|
|
25
25
|
{
|
|
26
26
|
"@context": [
|
|
27
27
|
...
|
|
28
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-update-deleteinsert/^
|
|
28
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-update-deleteinsert/^5.0.0/components/context.jsonld",
|
|
29
29
|
|
|
30
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/mediator-race/^
|
|
31
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-quads/^
|
|
30
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/mediator-race/^5.0.0/components/context.jsonld",
|
|
31
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-quads/^5.0.0/components/context.jsonld"
|
|
32
32
|
],
|
|
33
33
|
"actors": [
|
|
34
34
|
...
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@context": [
|
|
3
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-update-deleteinsert/^
|
|
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-update-deleteinsert/^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-update-deleteinsert",
|
|
8
8
|
"components": [
|
|
@@ -65,37 +65,37 @@
|
|
|
65
65
|
"genericTypeInstances": [
|
|
66
66
|
{
|
|
67
67
|
"@type": "ParameterRangeGenericTypeReference",
|
|
68
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
68
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
"@type": "ParameterRangeGenericTypeReference",
|
|
72
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
72
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
"@type": "ParameterRangeGenericTypeReference",
|
|
76
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
76
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
"@type": "ParameterRangeGenericTypeReference",
|
|
80
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
80
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
|
|
81
81
|
}
|
|
82
82
|
]
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
"@type": "ParameterRangeGenericTypeReference",
|
|
86
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
86
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
"@type": "ParameterRangeGenericTypeReference",
|
|
90
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
90
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
"@type": "ParameterRangeGenericTypeReference",
|
|
94
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
94
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
"@type": "ParameterRangeGenericTypeReference",
|
|
98
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
98
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
|
|
99
99
|
}
|
|
100
100
|
]
|
|
101
101
|
},
|
|
@@ -132,19 +132,19 @@
|
|
|
132
132
|
"genericTypeInstances": [
|
|
133
133
|
{
|
|
134
134
|
"@type": "ParameterRangeGenericTypeReference",
|
|
135
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
135
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
136
136
|
},
|
|
137
137
|
{
|
|
138
138
|
"@type": "ParameterRangeGenericTypeReference",
|
|
139
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
139
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
142
|
"@type": "ParameterRangeGenericTypeReference",
|
|
143
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
143
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
144
144
|
},
|
|
145
145
|
{
|
|
146
146
|
"@type": "ParameterRangeGenericTypeReference",
|
|
147
|
-
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^
|
|
147
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^5.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_TS"
|
|
148
148
|
}
|
|
149
149
|
]
|
|
150
150
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@context": [
|
|
3
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-update-deleteinsert/^
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-update-deleteinsert/^5.0.0/components/context.jsonld"
|
|
4
4
|
],
|
|
5
5
|
"@id": "npmd:@comunica/actor-query-operation-update-deleteinsert",
|
|
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
|
-
"caqoudi": "npmd:@comunica/actor-query-operation-update-deleteinsert/^
|
|
6
|
+
"caqoudi": "npmd:@comunica/actor-query-operation-update-deleteinsert/^5.0.0/",
|
|
7
7
|
"ActorQueryOperationUpdateDeleteInsert": {
|
|
8
8
|
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert",
|
|
9
9
|
"@prefix": true,
|
|
@@ -12,9 +12,13 @@ const asynciterator_1 = require("asynciterator");
|
|
|
12
12
|
* A comunica Update DeleteInsert Query Operation Actor.
|
|
13
13
|
*/
|
|
14
14
|
class ActorQueryOperationUpdateDeleteInsert extends bus_query_operation_1.ActorQueryOperationTypedMediated {
|
|
15
|
+
mediatorUpdateQuads;
|
|
16
|
+
mediatorMergeBindingsContext;
|
|
17
|
+
blankNodeCounter = 0;
|
|
15
18
|
constructor(args) {
|
|
16
19
|
super(args, utils_algebra_1.Algebra.Types.DELETE_INSERT);
|
|
17
|
-
this.
|
|
20
|
+
this.mediatorUpdateQuads = args.mediatorUpdateQuads;
|
|
21
|
+
this.mediatorMergeBindingsContext = args.mediatorMergeBindingsContext;
|
|
18
22
|
}
|
|
19
23
|
async testOperation(operation, context) {
|
|
20
24
|
return (0, utils_query_operation_1.testReadOnly)(context);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActorQueryOperationUpdateDeleteInsert.js","sourceRoot":"","sources":["ActorQueryOperationUpdateDeleteInsert.ts"],"names":[],"mappings":";;;AAAA,+FAAoF;AAGpF,uEAEuC;AAEvC,+DAA0D;AAG1D,2DAAkD;AAClD,6EAAmE;AACnE,2EAAgF;AAGhF,iDAA8C;AAE9C;;GAEG;AACH,MAAa,qCAAsC,SAAQ,sDAAsD;
|
|
1
|
+
{"version":3,"file":"ActorQueryOperationUpdateDeleteInsert.js","sourceRoot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;QAC3D,IAAI,gBAAqD,CAAC;QAC1D,IAAI,gBAAqD,CAAC;QAC1D,IAAI,SAAS,CAAC,MAAM,EAAE,CAAC;YACrB,yFAAyF;YACzF,gBAAgB,GAAG,IAAI,yDAAuB,CAC5C,WAAW,EACX,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,yDAAuB,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC,EACzG,aAAa,CAAC,KAAK,EAAE,CACtB,CAAC;YACF,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC1B,CAAC;QACD,IAAI,SAAS,CAAC,MAAM,EAAE,CAAC;YACrB,yFAAyF;YACzF,gBAAgB,GAAG,IAAI,yDAAuB,CAC5C,WAAW,EACX,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,yDAAuB,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC,EACzG,aAAa,CAAC,KAAK,EAAE,CACtB,CAAC;YACF,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC1B,CAAC;QAED,sCAAsC;QACtC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC;YACzD,gBAAgB;YAChB,gBAAgB;YAChB,OAAO;SACR,CAAC,CAAC;QAEH,OAAO;YACL,IAAI,EAAE,MAAM;YACZ,OAAO;SACR,CAAC;IACJ,CAAC;CACF;AA/DD,sFA+DC","sourcesContent":["import { BindingsToQuadsIterator } from '@comunica/actor-query-operation-construct';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { MediatorRdfUpdateQuads } from '@comunica/bus-rdf-update-quads';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { IActorTest, TestResult } from '@comunica/core';\nimport type { IQueryOperationResult, BindingsStream, IActionContext, ComunicaDataFactory } from '@comunica/types';\nimport { Algebra } from '@comunica/utils-algebra';\nimport { BindingsFactory } from '@comunica/utils-bindings-factory';\nimport { getSafeBindings, testReadOnly } from '@comunica/utils-query-operation';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { ArrayIterator } from 'asynciterator';\n\n/**\n * A comunica Update DeleteInsert Query Operation Actor.\n */\nexport class ActorQueryOperationUpdateDeleteInsert extends ActorQueryOperationTypedMediated<Algebra.DeleteInsert> {\n public readonly mediatorUpdateQuads: MediatorRdfUpdateQuads;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n protected blankNodeCounter = 0;\n\n public constructor(args: IActorQueryOperationUpdateDeleteInsertArgs) {\n super(args, Algebra.Types.DELETE_INSERT);\n this.mediatorUpdateQuads = args.mediatorUpdateQuads;\n this.mediatorMergeBindingsContext = args.mediatorMergeBindingsContext;\n }\n\n public async testOperation(\n operation: Algebra.DeleteInsert,\n context: IActionContext,\n ): Promise<TestResult<IActorTest>> {\n return testReadOnly(context);\n }\n\n public async runOperation(operation: Algebra.DeleteInsert, context: IActionContext):\n Promise<IQueryOperationResult> {\n const dataFactory: ComunicaDataFactory = context.getSafe(KeysInitQuery.dataFactory);\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context, dataFactory);\n // Evaluate the where clause\n const whereBindings: BindingsStream = operation.where ?\n getSafeBindings(await this.mediatorQueryOperation\n .mediate({ operation: operation.where, context })).bindingsStream :\n new ArrayIterator<RDF.Bindings>([ bindingsFactory.bindings() ], { autoStart: false });\n\n // Construct triples using the result based on the pattern.\n let quadStreamInsert: AsyncIterator<RDF.Quad> | undefined;\n let quadStreamDelete: AsyncIterator<RDF.Quad> | undefined;\n if (operation.insert) {\n // Localize blank nodes in pattern, to avoid clashes across different INSERT/DELETE calls\n quadStreamInsert = new BindingsToQuadsIterator(\n dataFactory,\n operation.insert.map(BindingsToQuadsIterator.localizeQuad.bind(null, dataFactory, this.blankNodeCounter)),\n whereBindings.clone(),\n );\n this.blankNodeCounter++;\n }\n if (operation.delete) {\n // Localize blank nodes in pattern, to avoid clashes across different INSERT/DELETE calls\n quadStreamDelete = new BindingsToQuadsIterator(\n dataFactory,\n operation.delete.map(BindingsToQuadsIterator.localizeQuad.bind(null, dataFactory, this.blankNodeCounter)),\n whereBindings.clone(),\n );\n this.blankNodeCounter++;\n }\n\n // Evaluate the required modifications\n const { execute } = await this.mediatorUpdateQuads.mediate({\n quadStreamInsert,\n quadStreamDelete,\n context,\n });\n\n return {\n type: 'void',\n execute,\n };\n }\n}\n\nexport interface IActorQueryOperationUpdateDeleteInsertArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * The RDF Update Quads mediator\n */\n mediatorUpdateQuads: MediatorRdfUpdateQuads;\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comunica/actor-query-operation-update-deleteinsert",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "A update-deleteinsert query-operation actor",
|
|
5
5
|
"lsd:module": true,
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
"build:components": "componentsjs-generator"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@comunica/actor-query-operation-construct": "
|
|
41
|
-
"@comunica/bus-merge-bindings-context": "
|
|
42
|
-
"@comunica/bus-query-operation": "
|
|
43
|
-
"@comunica/bus-rdf-update-quads": "
|
|
44
|
-
"@comunica/context-entries": "
|
|
45
|
-
"@comunica/core": "
|
|
46
|
-
"@comunica/types": "
|
|
47
|
-
"@comunica/utils-algebra": "
|
|
48
|
-
"@comunica/utils-bindings-factory": "
|
|
49
|
-
"@comunica/utils-query-operation": "
|
|
40
|
+
"@comunica/actor-query-operation-construct": "^5.0.0",
|
|
41
|
+
"@comunica/bus-merge-bindings-context": "^5.0.0",
|
|
42
|
+
"@comunica/bus-query-operation": "^5.0.0",
|
|
43
|
+
"@comunica/bus-rdf-update-quads": "^5.0.0",
|
|
44
|
+
"@comunica/context-entries": "^5.0.0",
|
|
45
|
+
"@comunica/core": "^5.0.0",
|
|
46
|
+
"@comunica/types": "^5.0.0",
|
|
47
|
+
"@comunica/utils-algebra": "^5.0.0",
|
|
48
|
+
"@comunica/utils-bindings-factory": "^5.0.0",
|
|
49
|
+
"@comunica/utils-query-operation": "^5.0.0",
|
|
50
50
|
"@rdfjs/types": "*",
|
|
51
51
|
"asynciterator": "^3.10.0"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "0b1756fdb9bef014133432489627c1bd71779bd0"
|
|
54
54
|
}
|