@comunica/actor-query-operation-update-deleteinsert 1.22.2 → 2.0.1-alpha.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/LICENSE.txt +2 -2
- package/README.md +8 -12
- package/components/ActorQueryOperationUpdateDeleteInsert.jsonld +198 -0
- package/components/components.jsonld +5 -3
- package/components/context.jsonld +46 -6
- package/lib/ActorQueryOperationUpdateDeleteInsert.d.ts +11 -7
- package/lib/ActorQueryOperationUpdateDeleteInsert.js +14 -12
- package/lib/index.d.ts +1 -0
- package/{index.js → lib/index.js} +1 -1
- package/package.json +14 -39
- package/components/Actor/QueryOperation/UpdateDeleteInsert.jsonld +0 -35
- package/index.d.ts +0 -1
package/LICENSE.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright © 2017–
|
|
4
|
-
Ghent University – imec, Belgium
|
|
3
|
+
Copyright © 2017–now Ruben Taelman, Joachim Van Herwegen
|
|
4
|
+
Comunica Association and Ghent University – imec, Belgium
|
|
5
5
|
|
|
6
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
7
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -25,22 +25,18 @@ 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/^2.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/^2.0.0/components/context.jsonld",
|
|
31
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-quads/^2.0.0/components/context.jsonld"
|
|
32
32
|
],
|
|
33
33
|
"actors": [
|
|
34
34
|
...
|
|
35
35
|
{
|
|
36
|
-
"@id": "
|
|
36
|
+
"@id": "urn:comunica:default:query-operation/actors#update-deleteinsert",
|
|
37
37
|
"@type": "ActorQueryOperationUpdateDeleteInsert",
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"@id": "config-sets:sparql-queryoperator-update.json#mediatorUpdateQuads",
|
|
41
|
-
"@type": "MediatorRace",
|
|
42
|
-
"cc:Mediator/bus": { "@id": "cbruq:Bus/RdfUpdateQuads" }
|
|
43
|
-
}
|
|
38
|
+
"mediatorQueryOperation": { "@id": "urn:comunica:default:query-operation/mediators#main" },
|
|
39
|
+
"mediatorUpdateQuads": { "@id": "urn:comunica:default:rdf-update-quads/mediators#main" }
|
|
44
40
|
}
|
|
45
41
|
]
|
|
46
42
|
}
|
|
@@ -48,5 +44,5 @@ After installing, this package can be added to your engine's configuration as fo
|
|
|
48
44
|
|
|
49
45
|
### Config Parameters
|
|
50
46
|
|
|
51
|
-
* `
|
|
52
|
-
* `
|
|
47
|
+
* `mediatorQueryOperation`: A mediator over the [Query Operation bus](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation).
|
|
48
|
+
* `mediatorUpdateQuads`: A mediator over the [RDF Update Quads bus](https://github.com/comunica/comunica/tree/master/packages/bus-rdf-update-quads).
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": [
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-update-deleteinsert/^2.0.0/components/context.jsonld",
|
|
4
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^2.0.0/components/context.jsonld",
|
|
5
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-operation/^2.0.0/components/context.jsonld"
|
|
6
|
+
],
|
|
7
|
+
"@id": "npmd:@comunica/actor-query-operation-update-deleteinsert",
|
|
8
|
+
"components": [
|
|
9
|
+
{
|
|
10
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert",
|
|
11
|
+
"@type": "Class",
|
|
12
|
+
"requireElement": "ActorQueryOperationUpdateDeleteInsert",
|
|
13
|
+
"extends": [
|
|
14
|
+
{
|
|
15
|
+
"@type": "GenericComponentExtension",
|
|
16
|
+
"component": "cbqo:components/ActorQueryOperationTypedMediated.jsonld#ActorQueryOperationTypedMediated",
|
|
17
|
+
"genericTypeInstances": [
|
|
18
|
+
"urn:npm:sparqlalgebrajs:DeleteInsert"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"comment": "A comunica Update DeleteInsert Query Operation Actor.",
|
|
23
|
+
"parameters": [
|
|
24
|
+
{
|
|
25
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert_args_mediatorUpdateQuads",
|
|
26
|
+
"range": "cc:components/Mediator.jsonld#Mediator",
|
|
27
|
+
"comment": "The RDF Update Quads mediator"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert_args_mediatorQueryOperation",
|
|
31
|
+
"range": "cc:components/Mediator.jsonld#Mediator"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert_args_name",
|
|
35
|
+
"range": "xsd:string",
|
|
36
|
+
"default": {
|
|
37
|
+
"@id": "rdf:subject"
|
|
38
|
+
},
|
|
39
|
+
"comment": "The name for this actor."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert_args_bus",
|
|
43
|
+
"range": {
|
|
44
|
+
"@type": "ParameterRangeGenericComponent",
|
|
45
|
+
"component": "cc:components/Bus.jsonld#Bus",
|
|
46
|
+
"genericTypeInstances": [
|
|
47
|
+
{
|
|
48
|
+
"@type": "ParameterRangeGenericComponent",
|
|
49
|
+
"component": "cc:components/Actor.jsonld#Actor",
|
|
50
|
+
"genericTypeInstances": [
|
|
51
|
+
{
|
|
52
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
53
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
57
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
61
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
67
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
71
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
75
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"default": {
|
|
80
|
+
"@id": "cbqo:components/ActorQueryOperation.jsonld#ActorQueryOperation_default_bus",
|
|
81
|
+
"@type": "cc:components/Bus.jsonld#Bus"
|
|
82
|
+
},
|
|
83
|
+
"comment": "The bus this actor subscribes to."
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert_args_beforeActors",
|
|
87
|
+
"range": {
|
|
88
|
+
"@type": "ParameterRangeUnion",
|
|
89
|
+
"parameterRangeElements": [
|
|
90
|
+
{
|
|
91
|
+
"@type": "ParameterRangeArray",
|
|
92
|
+
"parameterRangeValue": {
|
|
93
|
+
"@type": "ParameterRangeGenericComponent",
|
|
94
|
+
"component": "cc:components/Actor.jsonld#Actor",
|
|
95
|
+
"genericTypeInstances": [
|
|
96
|
+
{
|
|
97
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
98
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_I"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
102
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_T"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
106
|
+
"parameterRangeGenericType": "npmd:@comunica/actor-abstract-mediatyped/^2.0.0/components/ActorAbstractMediaTyped.jsonld#ActorAbstractMediaTyped__generic_O"
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"@type": "ParameterRangeUndefined"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
"comment": "Actor that must be registered in the bus before this actor."
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"memberFields": [
|
|
120
|
+
{
|
|
121
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert__member_mediatorUpdateQuads",
|
|
122
|
+
"memberFieldName": "mediatorUpdateQuads",
|
|
123
|
+
"range": "cc:components/Mediator.jsonld#Mediator"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert__member_blankNodeCounter",
|
|
127
|
+
"memberFieldName": "blankNodeCounter",
|
|
128
|
+
"range": "xsd:number"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert__member_constructor",
|
|
132
|
+
"memberFieldName": "constructor"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert__member_testOperation",
|
|
136
|
+
"memberFieldName": "testOperation"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert__member_runOperation",
|
|
140
|
+
"memberFieldName": "runOperation"
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"constructorArguments": [
|
|
144
|
+
{
|
|
145
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert_args__constructorArgument",
|
|
146
|
+
"fields": [
|
|
147
|
+
{
|
|
148
|
+
"keyRaw": "mediatorUpdateQuads",
|
|
149
|
+
"value": {
|
|
150
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert_args_mediatorUpdateQuads"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"keyRaw": "mediatorQueryOperation",
|
|
155
|
+
"value": {
|
|
156
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert_args_mediatorQueryOperation"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"keyRaw": "name",
|
|
161
|
+
"value": {
|
|
162
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert_args_name"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"keyRaw": "bus",
|
|
167
|
+
"value": {
|
|
168
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert_args_bus"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"keyRaw": "beforeActors",
|
|
173
|
+
"value": {
|
|
174
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert_args_beforeActors"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#IActorQueryOperationUpdateDeleteInsertArgs",
|
|
183
|
+
"@type": "AbstractClass",
|
|
184
|
+
"requireElement": "IActorQueryOperationUpdateDeleteInsertArgs",
|
|
185
|
+
"extends": [
|
|
186
|
+
"cbqo:components/ActorQueryOperationTypedMediated.jsonld#IActorQueryOperationTypedMediatedArgs"
|
|
187
|
+
],
|
|
188
|
+
"parameters": [],
|
|
189
|
+
"memberFields": [
|
|
190
|
+
{
|
|
191
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#IActorQueryOperationUpdateDeleteInsertArgs__member_mediatorUpdateQuads",
|
|
192
|
+
"memberFieldName": "mediatorUpdateQuads"
|
|
193
|
+
}
|
|
194
|
+
],
|
|
195
|
+
"constructorArguments": []
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"@context":
|
|
2
|
+
"@context": [
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-update-deleteinsert/^2.0.0/components/context.jsonld"
|
|
4
|
+
],
|
|
3
5
|
"@id": "npmd:@comunica/actor-query-operation-update-deleteinsert",
|
|
4
6
|
"@type": "Module",
|
|
5
7
|
"requireName": "@comunica/actor-query-operation-update-deleteinsert",
|
|
6
8
|
"import": [
|
|
7
|
-
"
|
|
9
|
+
"caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld"
|
|
8
10
|
]
|
|
9
|
-
}
|
|
11
|
+
}
|
|
@@ -1,12 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@context": [
|
|
3
|
-
"https://linkedsoftwaredependencies.org/bundles/npm
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^4.0.0/components/context.jsonld",
|
|
4
4
|
{
|
|
5
5
|
"npmd": "https://linkedsoftwaredependencies.org/bundles/npm/",
|
|
6
|
-
"caqoudi": "npmd:@comunica/actor-query-operation-update-deleteinsert/",
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
"caqoudi": "npmd:@comunica/actor-query-operation-update-deleteinsert/^2.0.0/",
|
|
7
|
+
"ActorQueryOperationUpdateDeleteInsert": {
|
|
8
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert",
|
|
9
|
+
"@prefix": true,
|
|
10
|
+
"@context": {
|
|
11
|
+
"args_mediatorUpdateQuads": {
|
|
12
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert_args_mediatorUpdateQuads"
|
|
13
|
+
},
|
|
14
|
+
"args_mediatorQueryOperation": {
|
|
15
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert_args_mediatorQueryOperation"
|
|
16
|
+
},
|
|
17
|
+
"args_name": {
|
|
18
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert_args_name"
|
|
19
|
+
},
|
|
20
|
+
"args_bus": {
|
|
21
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert_args_bus"
|
|
22
|
+
},
|
|
23
|
+
"args_beforeActors": {
|
|
24
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert_args_beforeActors",
|
|
25
|
+
"@container": "@list"
|
|
26
|
+
},
|
|
27
|
+
"mediatorUpdateQuads": {
|
|
28
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert_args_mediatorUpdateQuads"
|
|
29
|
+
},
|
|
30
|
+
"mediatorQueryOperation": {
|
|
31
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert_args_mediatorQueryOperation"
|
|
32
|
+
},
|
|
33
|
+
"name": {
|
|
34
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert_args_name"
|
|
35
|
+
},
|
|
36
|
+
"bus": {
|
|
37
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert_args_bus"
|
|
38
|
+
},
|
|
39
|
+
"beforeActors": {
|
|
40
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#ActorQueryOperationUpdateDeleteInsert_args_beforeActors",
|
|
41
|
+
"@container": "@list"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"IActorQueryOperationUpdateDeleteInsertArgs": {
|
|
46
|
+
"@id": "caqoudi:components/ActorQueryOperationUpdateDeleteInsert.jsonld#IActorQueryOperationUpdateDeleteInsertArgs",
|
|
47
|
+
"@prefix": true,
|
|
48
|
+
"@context": {}
|
|
49
|
+
}
|
|
10
50
|
}
|
|
11
51
|
]
|
|
12
|
-
}
|
|
52
|
+
}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';
|
|
2
2
|
import { ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
3
|
+
import type { MediatorRdfUpdateQuads } from '@comunica/bus-rdf-update-quads';
|
|
4
|
+
import type { IActorTest } from '@comunica/core';
|
|
5
|
+
import type { IQueryOperationResult, IActionContext } from '@comunica/types';
|
|
5
6
|
import type { Algebra } from 'sparqlalgebrajs';
|
|
6
7
|
/**
|
|
7
8
|
* A comunica Update DeleteInsert Query Operation Actor.
|
|
8
9
|
*/
|
|
9
10
|
export declare class ActorQueryOperationUpdateDeleteInsert extends ActorQueryOperationTypedMediated<Algebra.DeleteInsert> {
|
|
10
|
-
readonly mediatorUpdateQuads:
|
|
11
|
+
readonly mediatorUpdateQuads: MediatorRdfUpdateQuads;
|
|
11
12
|
protected blankNodeCounter: number;
|
|
12
13
|
constructor(args: IActorQueryOperationUpdateDeleteInsertArgs);
|
|
13
|
-
testOperation(
|
|
14
|
-
runOperation(
|
|
14
|
+
testOperation(operation: Algebra.DeleteInsert, context: IActionContext): Promise<IActorTest>;
|
|
15
|
+
runOperation(operation: Algebra.DeleteInsert, context: IActionContext): Promise<IQueryOperationResult>;
|
|
15
16
|
}
|
|
16
17
|
export interface IActorQueryOperationUpdateDeleteInsertArgs extends IActorQueryOperationTypedMediatedArgs {
|
|
17
|
-
|
|
18
|
+
/**
|
|
19
|
+
* The RDF Update Quads mediator
|
|
20
|
+
*/
|
|
21
|
+
mediatorUpdateQuads: MediatorRdfUpdateQuads;
|
|
18
22
|
}
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ActorQueryOperationUpdateDeleteInsert = void 0;
|
|
4
4
|
const actor_query_operation_construct_1 = require("@comunica/actor-query-operation-construct");
|
|
5
|
+
const bindings_factory_1 = require("@comunica/bindings-factory");
|
|
5
6
|
const bus_query_operation_1 = require("@comunica/bus-query-operation");
|
|
6
7
|
const asynciterator_1 = require("asynciterator");
|
|
8
|
+
const BF = new bindings_factory_1.BindingsFactory();
|
|
7
9
|
/**
|
|
8
10
|
* A comunica Update DeleteInsert Query Operation Actor.
|
|
9
11
|
*/
|
|
@@ -12,38 +14,38 @@ class ActorQueryOperationUpdateDeleteInsert extends bus_query_operation_1.ActorQ
|
|
|
12
14
|
super(args, 'deleteinsert');
|
|
13
15
|
this.blankNodeCounter = 0;
|
|
14
16
|
}
|
|
15
|
-
async testOperation(
|
|
17
|
+
async testOperation(operation, context) {
|
|
16
18
|
bus_query_operation_1.ActorQueryOperation.throwOnReadOnly(context);
|
|
17
19
|
return true;
|
|
18
20
|
}
|
|
19
|
-
async runOperation(
|
|
21
|
+
async runOperation(operation, context) {
|
|
20
22
|
// Evaluate the where clause
|
|
21
|
-
const whereBindings =
|
|
23
|
+
const whereBindings = operation.where ?
|
|
22
24
|
bus_query_operation_1.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation
|
|
23
|
-
.mediate({ operation:
|
|
24
|
-
new asynciterator_1.ArrayIterator([
|
|
25
|
+
.mediate({ operation: operation.where, context })).bindingsStream :
|
|
26
|
+
new asynciterator_1.ArrayIterator([BF.bindings()], { autoStart: false });
|
|
25
27
|
// Construct triples using the result based on the pattern.
|
|
26
28
|
let quadStreamInsert;
|
|
27
29
|
let quadStreamDelete;
|
|
28
|
-
if (
|
|
30
|
+
if (operation.insert) {
|
|
29
31
|
// Localize blank nodes in pattern, to avoid clashes across different INSERT/DELETE calls
|
|
30
|
-
quadStreamInsert = new actor_query_operation_construct_1.BindingsToQuadsIterator(
|
|
32
|
+
quadStreamInsert = new actor_query_operation_construct_1.BindingsToQuadsIterator(operation.insert.map(actor_query_operation_construct_1.BindingsToQuadsIterator.localizeQuad.bind(null, this.blankNodeCounter)), whereBindings.clone(), false);
|
|
31
33
|
this.blankNodeCounter++;
|
|
32
34
|
}
|
|
33
|
-
if (
|
|
35
|
+
if (operation.delete) {
|
|
34
36
|
// Localize blank nodes in pattern, to avoid clashes across different INSERT/DELETE calls
|
|
35
|
-
quadStreamDelete = new actor_query_operation_construct_1.BindingsToQuadsIterator(
|
|
37
|
+
quadStreamDelete = new actor_query_operation_construct_1.BindingsToQuadsIterator(operation.delete.map(actor_query_operation_construct_1.BindingsToQuadsIterator.localizeQuad.bind(null, this.blankNodeCounter)), whereBindings.clone(), false);
|
|
36
38
|
this.blankNodeCounter++;
|
|
37
39
|
}
|
|
38
40
|
// Evaluate the required modifications
|
|
39
|
-
const {
|
|
41
|
+
const { voidResult } = await this.mediatorUpdateQuads.mediate({
|
|
40
42
|
quadStreamInsert,
|
|
41
43
|
quadStreamDelete,
|
|
42
44
|
context,
|
|
43
45
|
});
|
|
44
46
|
return {
|
|
45
|
-
type: '
|
|
46
|
-
|
|
47
|
+
type: 'void',
|
|
48
|
+
voidResult,
|
|
47
49
|
};
|
|
48
50
|
}
|
|
49
51
|
}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ActorQueryOperationUpdateDeleteInsert';
|
|
@@ -10,5 +10,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./
|
|
13
|
+
__exportStar(require("./ActorQueryOperationUpdateDeleteInsert"), exports);
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comunica/actor-query-operation-update-deleteinsert",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.0.1-alpha.5.0",
|
|
4
4
|
"description": "A update-deleteinsert query-operation actor",
|
|
5
5
|
"lsd:module": true,
|
|
6
|
-
"main": "index.js",
|
|
7
|
-
"typings": "index",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"typings": "lib/index",
|
|
8
8
|
"repository": "https://github.com/comunica/comunica/tree/master/packages/actor-query-operation-update-deleteinsert",
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public"
|
|
@@ -23,46 +23,21 @@
|
|
|
23
23
|
"files": [
|
|
24
24
|
"components",
|
|
25
25
|
"lib/**/*.d.ts",
|
|
26
|
-
"lib/**/*.js"
|
|
27
|
-
"index.d.ts",
|
|
28
|
-
"index.js"
|
|
26
|
+
"lib/**/*.js"
|
|
29
27
|
],
|
|
30
28
|
"dependencies": {
|
|
31
|
-
"@comunica/actor-query-operation-construct": "
|
|
29
|
+
"@comunica/actor-query-operation-construct": "2.0.1-alpha.5.0",
|
|
30
|
+
"@comunica/bindings-factory": "2.0.1-alpha.5.0",
|
|
31
|
+
"@comunica/bus-query-operation": "2.0.1-alpha.5.0",
|
|
32
|
+
"@comunica/bus-rdf-update-quads": "2.0.1-alpha.5.0",
|
|
33
|
+
"@comunica/core": "2.0.1-alpha.5.0",
|
|
32
34
|
"@rdfjs/types": "*",
|
|
33
|
-
"asynciterator": "^3.2.
|
|
34
|
-
},
|
|
35
|
-
"peerDependencies": {
|
|
36
|
-
"@comunica/bus-query-operation": "^1.19.2",
|
|
37
|
-
"@comunica/bus-rdf-update-quads": "^1.0.0",
|
|
38
|
-
"@comunica/core": "^1.19.2"
|
|
39
|
-
},
|
|
40
|
-
"devDependencies": {
|
|
41
|
-
"@comunica/bus-query-operation": "^1.22.0",
|
|
42
|
-
"@comunica/bus-rdf-update-quads": "^1.22.2",
|
|
43
|
-
"@comunica/core": "^1.22.0"
|
|
44
|
-
},
|
|
45
|
-
"jest": {
|
|
46
|
-
"globals": {
|
|
47
|
-
"ts-jest": {
|
|
48
|
-
"tsConfig": "../../tsconfig.json"
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"transform": {
|
|
52
|
-
"^.+\\.ts$": "ts-jest"
|
|
53
|
-
},
|
|
54
|
-
"testRegex": "(/test/.*|(\\.|/)(test|spec))\\.ts$",
|
|
55
|
-
"moduleFileExtensions": [
|
|
56
|
-
"ts",
|
|
57
|
-
"js"
|
|
58
|
-
],
|
|
59
|
-
"collectCoverage": true
|
|
35
|
+
"asynciterator": "^3.2.1"
|
|
60
36
|
},
|
|
61
37
|
"scripts": {
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"build": "
|
|
65
|
-
"validate": "npm ls"
|
|
38
|
+
"build": "npm run build:ts && npm run build:components",
|
|
39
|
+
"build:ts": "node \"../../node_modules/typescript/bin/tsc\"",
|
|
40
|
+
"build:components": "componentsjs-generator"
|
|
66
41
|
},
|
|
67
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "e2ae2e9e924bf0656df60cc99774f7e560d47695"
|
|
68
43
|
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"@context": [
|
|
3
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-operation-update-deleteinsert/^1.0.0/components/context.jsonld",
|
|
4
|
-
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-operation/^1.0.0/components/context.jsonld"
|
|
5
|
-
],
|
|
6
|
-
"@id": "npmd:@comunica/actor-query-operation-update-deleteinsert",
|
|
7
|
-
"components": [
|
|
8
|
-
{
|
|
9
|
-
"@id": "caqoudi:Actor/QueryOperation/UpdateDeleteInsert",
|
|
10
|
-
"@type": "Class",
|
|
11
|
-
"extends": "cbqo:Actor/QueryOperationTypedMediated",
|
|
12
|
-
"requireElement": "ActorQueryOperationUpdateDeleteInsert",
|
|
13
|
-
"comment": "A comunica Update DeleteInsert Query Operation Actor.",
|
|
14
|
-
"parameters": [
|
|
15
|
-
{
|
|
16
|
-
"@id": "caqoudi:mediatorUpdateQuads",
|
|
17
|
-
"comment": "The RDF Update Quads mediator",
|
|
18
|
-
"required": true,
|
|
19
|
-
"unique": true
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
"constructorArguments": [
|
|
23
|
-
{
|
|
24
|
-
"extends": "cbqo:Actor/QueryOperationTypedMediated/constructorArgumentsObject",
|
|
25
|
-
"fields": [
|
|
26
|
-
{
|
|
27
|
-
"keyRaw": "mediatorUpdateQuads",
|
|
28
|
-
"value": "caqoudi:mediatorUpdateQuads"
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
}
|
package/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/ActorQueryOperationUpdateDeleteInsert';
|