@comunica/bus-query-operation 4.4.2-alpha.49.0 → 4.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/components/ActorQueryOperation.jsonld +0 -0
- package/components/ActorQueryOperationTyped.jsonld +63 -3
- package/components/ActorQueryOperationTypedMediated.jsonld +63 -3
- package/components/BusQueryOperation.jsonld +0 -0
- package/components/ClosableIterator.jsonld +108 -0
- package/components/components.jsonld +0 -0
- package/components/context.jsonld +0 -0
- package/lib/ActorQueryOperation.d.ts +1 -1
- package/lib/ActorQueryOperation.js +0 -0
- package/lib/ActorQueryOperation.js.map +1 -1
- package/lib/ActorQueryOperationTyped.d.ts +1 -1
- package/lib/ActorQueryOperationTyped.js +0 -0
- package/lib/ActorQueryOperationTyped.js.map +1 -1
- package/lib/ActorQueryOperationTypedMediated.d.ts +1 -1
- package/lib/ActorQueryOperationTypedMediated.js +0 -0
- package/lib/ActorQueryOperationTypedMediated.js.map +1 -1
- package/lib/BusQueryOperation.d.ts +0 -0
- package/lib/BusQueryOperation.js +0 -0
- package/lib/BusQueryOperation.js.map +0 -0
- 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
|
File without changes
|
|
@@ -26,11 +26,71 @@
|
|
|
26
26
|
{
|
|
27
27
|
"@id": "cbqo:components/ActorQueryOperationTyped.jsonld#ActorQueryOperationTyped__generic_O",
|
|
28
28
|
"range": {
|
|
29
|
-
"@type": "
|
|
29
|
+
"@type": "ParameterRangeUnion",
|
|
30
30
|
"parameterRangeElements": [
|
|
31
|
-
"urn:npm
|
|
31
|
+
"urn:npm:sparqlalgebrajs:Ask",
|
|
32
|
+
{
|
|
33
|
+
"@type": "ParameterRangeUnion",
|
|
34
|
+
"parameterRangeElements": [
|
|
35
|
+
"urn:npm:sparqlalgebrajs:AggregateExpression",
|
|
36
|
+
"urn:npm:sparqlalgebrajs:GroupConcatExpression",
|
|
37
|
+
"urn:npm:sparqlalgebrajs:ExistenceExpression",
|
|
38
|
+
"urn:npm:sparqlalgebrajs:NamedExpression",
|
|
39
|
+
"urn:npm:sparqlalgebrajs:OperatorExpression",
|
|
40
|
+
"urn:npm:sparqlalgebrajs:TermExpression",
|
|
41
|
+
"urn:npm:sparqlalgebrajs:WildcardExpression",
|
|
42
|
+
"urn:npm:sparqlalgebrajs:BoundAggregate"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"urn:npm:sparqlalgebrajs:Bgp",
|
|
46
|
+
"urn:npm:sparqlalgebrajs:Construct",
|
|
47
|
+
"urn:npm:sparqlalgebrajs:Describe",
|
|
48
|
+
"urn:npm:sparqlalgebrajs:Distinct",
|
|
49
|
+
"urn:npm:sparqlalgebrajs:Extend",
|
|
50
|
+
"urn:npm:sparqlalgebrajs:From",
|
|
51
|
+
"urn:npm:sparqlalgebrajs:Filter",
|
|
52
|
+
"urn:npm:sparqlalgebrajs:Graph",
|
|
53
|
+
"urn:npm:sparqlalgebrajs:Group",
|
|
54
|
+
"urn:npm:sparqlalgebrajs:Join",
|
|
55
|
+
"urn:npm:sparqlalgebrajs:LeftJoin",
|
|
56
|
+
"urn:npm:sparqlalgebrajs:Minus",
|
|
57
|
+
"urn:npm:sparqlalgebrajs:Nop",
|
|
58
|
+
"urn:npm:sparqlalgebrajs:OrderBy",
|
|
59
|
+
"urn:npm:sparqlalgebrajs:Path",
|
|
60
|
+
"urn:npm:sparqlalgebrajs:Pattern",
|
|
61
|
+
"urn:npm:sparqlalgebrajs:Project",
|
|
32
62
|
{
|
|
33
|
-
"@type": "
|
|
63
|
+
"@type": "ParameterRangeUnion",
|
|
64
|
+
"parameterRangeElements": [
|
|
65
|
+
"urn:npm:sparqlalgebrajs:Alt",
|
|
66
|
+
"urn:npm:sparqlalgebrajs:Inv",
|
|
67
|
+
"urn:npm:sparqlalgebrajs:Link",
|
|
68
|
+
"urn:npm:sparqlalgebrajs:Nps",
|
|
69
|
+
"urn:npm:sparqlalgebrajs:OneOrMorePath",
|
|
70
|
+
"urn:npm:sparqlalgebrajs:Seq",
|
|
71
|
+
"urn:npm:sparqlalgebrajs:ZeroOrMorePath",
|
|
72
|
+
"urn:npm:sparqlalgebrajs:ZeroOrOnePath"
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
"urn:npm:sparqlalgebrajs:Reduced",
|
|
76
|
+
"urn:npm:sparqlalgebrajs:Service",
|
|
77
|
+
"urn:npm:sparqlalgebrajs:Slice",
|
|
78
|
+
"urn:npm:sparqlalgebrajs:Union",
|
|
79
|
+
"urn:npm:sparqlalgebrajs:Values",
|
|
80
|
+
{
|
|
81
|
+
"@type": "ParameterRangeUnion",
|
|
82
|
+
"parameterRangeElements": [
|
|
83
|
+
"urn:npm:sparqlalgebrajs:CompositeUpdate",
|
|
84
|
+
"urn:npm:sparqlalgebrajs:DeleteInsert",
|
|
85
|
+
"urn:npm:sparqlalgebrajs:Load",
|
|
86
|
+
"urn:npm:sparqlalgebrajs:Clear",
|
|
87
|
+
"urn:npm:sparqlalgebrajs:Create",
|
|
88
|
+
"urn:npm:sparqlalgebrajs:Drop",
|
|
89
|
+
"urn:npm:sparqlalgebrajs:Add",
|
|
90
|
+
"urn:npm:sparqlalgebrajs:Move",
|
|
91
|
+
"urn:npm:sparqlalgebrajs:Copy",
|
|
92
|
+
"urn:npm:sparqlalgebrajs:Nop"
|
|
93
|
+
]
|
|
34
94
|
}
|
|
35
95
|
]
|
|
36
96
|
}
|
|
@@ -40,11 +40,71 @@
|
|
|
40
40
|
{
|
|
41
41
|
"@id": "cbqo:components/ActorQueryOperationTypedMediated.jsonld#ActorQueryOperationTypedMediated__generic_O",
|
|
42
42
|
"range": {
|
|
43
|
-
"@type": "
|
|
43
|
+
"@type": "ParameterRangeUnion",
|
|
44
44
|
"parameterRangeElements": [
|
|
45
|
-
"urn:npm
|
|
45
|
+
"urn:npm:sparqlalgebrajs:Ask",
|
|
46
|
+
{
|
|
47
|
+
"@type": "ParameterRangeUnion",
|
|
48
|
+
"parameterRangeElements": [
|
|
49
|
+
"urn:npm:sparqlalgebrajs:AggregateExpression",
|
|
50
|
+
"urn:npm:sparqlalgebrajs:GroupConcatExpression",
|
|
51
|
+
"urn:npm:sparqlalgebrajs:ExistenceExpression",
|
|
52
|
+
"urn:npm:sparqlalgebrajs:NamedExpression",
|
|
53
|
+
"urn:npm:sparqlalgebrajs:OperatorExpression",
|
|
54
|
+
"urn:npm:sparqlalgebrajs:TermExpression",
|
|
55
|
+
"urn:npm:sparqlalgebrajs:WildcardExpression",
|
|
56
|
+
"urn:npm:sparqlalgebrajs:BoundAggregate"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"urn:npm:sparqlalgebrajs:Bgp",
|
|
60
|
+
"urn:npm:sparqlalgebrajs:Construct",
|
|
61
|
+
"urn:npm:sparqlalgebrajs:Describe",
|
|
62
|
+
"urn:npm:sparqlalgebrajs:Distinct",
|
|
63
|
+
"urn:npm:sparqlalgebrajs:Extend",
|
|
64
|
+
"urn:npm:sparqlalgebrajs:From",
|
|
65
|
+
"urn:npm:sparqlalgebrajs:Filter",
|
|
66
|
+
"urn:npm:sparqlalgebrajs:Graph",
|
|
67
|
+
"urn:npm:sparqlalgebrajs:Group",
|
|
68
|
+
"urn:npm:sparqlalgebrajs:Join",
|
|
69
|
+
"urn:npm:sparqlalgebrajs:LeftJoin",
|
|
70
|
+
"urn:npm:sparqlalgebrajs:Minus",
|
|
71
|
+
"urn:npm:sparqlalgebrajs:Nop",
|
|
72
|
+
"urn:npm:sparqlalgebrajs:OrderBy",
|
|
73
|
+
"urn:npm:sparqlalgebrajs:Path",
|
|
74
|
+
"urn:npm:sparqlalgebrajs:Pattern",
|
|
75
|
+
"urn:npm:sparqlalgebrajs:Project",
|
|
46
76
|
{
|
|
47
|
-
"@type": "
|
|
77
|
+
"@type": "ParameterRangeUnion",
|
|
78
|
+
"parameterRangeElements": [
|
|
79
|
+
"urn:npm:sparqlalgebrajs:Alt",
|
|
80
|
+
"urn:npm:sparqlalgebrajs:Inv",
|
|
81
|
+
"urn:npm:sparqlalgebrajs:Link",
|
|
82
|
+
"urn:npm:sparqlalgebrajs:Nps",
|
|
83
|
+
"urn:npm:sparqlalgebrajs:OneOrMorePath",
|
|
84
|
+
"urn:npm:sparqlalgebrajs:Seq",
|
|
85
|
+
"urn:npm:sparqlalgebrajs:ZeroOrMorePath",
|
|
86
|
+
"urn:npm:sparqlalgebrajs:ZeroOrOnePath"
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
"urn:npm:sparqlalgebrajs:Reduced",
|
|
90
|
+
"urn:npm:sparqlalgebrajs:Service",
|
|
91
|
+
"urn:npm:sparqlalgebrajs:Slice",
|
|
92
|
+
"urn:npm:sparqlalgebrajs:Union",
|
|
93
|
+
"urn:npm:sparqlalgebrajs:Values",
|
|
94
|
+
{
|
|
95
|
+
"@type": "ParameterRangeUnion",
|
|
96
|
+
"parameterRangeElements": [
|
|
97
|
+
"urn:npm:sparqlalgebrajs:CompositeUpdate",
|
|
98
|
+
"urn:npm:sparqlalgebrajs:DeleteInsert",
|
|
99
|
+
"urn:npm:sparqlalgebrajs:Load",
|
|
100
|
+
"urn:npm:sparqlalgebrajs:Clear",
|
|
101
|
+
"urn:npm:sparqlalgebrajs:Create",
|
|
102
|
+
"urn:npm:sparqlalgebrajs:Drop",
|
|
103
|
+
"urn:npm:sparqlalgebrajs:Add",
|
|
104
|
+
"urn:npm:sparqlalgebrajs:Move",
|
|
105
|
+
"urn:npm:sparqlalgebrajs:Copy",
|
|
106
|
+
"urn:npm:sparqlalgebrajs:Nop"
|
|
107
|
+
]
|
|
48
108
|
}
|
|
49
109
|
]
|
|
50
110
|
}
|
|
File without changes
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": [
|
|
3
|
+
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-operation/^4.0.0/components/context.jsonld"
|
|
4
|
+
],
|
|
5
|
+
"@id": "npmd:@comunica/bus-query-operation",
|
|
6
|
+
"components": [
|
|
7
|
+
{
|
|
8
|
+
"@id": "cbqo:components/ClosableIterator.jsonld#ClosableIterator",
|
|
9
|
+
"@type": "Class",
|
|
10
|
+
"requireElement": "ClosableIterator",
|
|
11
|
+
"extends": [
|
|
12
|
+
{
|
|
13
|
+
"@type": "GenericComponentExtension",
|
|
14
|
+
"component": "urn:npm:asynciterator:AsyncIterator",
|
|
15
|
+
"genericTypeInstances": [
|
|
16
|
+
{
|
|
17
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
18
|
+
"parameterRangeGenericType": "cbqo:components/ClosableIterator.jsonld#ClosableIterator__generic_S"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"comment": "An AsyncIterator with a callback for when this iterator is closed in any way. In contrast to ClosableTransformIterator, this does not add the overhead of a TransformIterator.",
|
|
24
|
+
"genericTypeParameters": [
|
|
25
|
+
{
|
|
26
|
+
"@id": "cbqo:components/ClosableIterator.jsonld#ClosableIterator__generic_S"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"parameters": [
|
|
30
|
+
{
|
|
31
|
+
"@id": "cbqo:components/ClosableIterator.jsonld#ClosableIterator_options_onClose",
|
|
32
|
+
"range": {
|
|
33
|
+
"@type": "ParameterRangeWildcard"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"@id": "cbqo:components/ClosableIterator.jsonld#ClosableIterator_source",
|
|
38
|
+
"range": {
|
|
39
|
+
"@type": "ParameterRangeGenericComponent",
|
|
40
|
+
"component": "urn:npm:asynciterator:AsyncIterator",
|
|
41
|
+
"genericTypeInstances": [
|
|
42
|
+
{
|
|
43
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
44
|
+
"parameterRangeGenericType": "cbqo:components/ClosableIterator.jsonld#ClosableIterator__generic_S"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"memberFields": [
|
|
51
|
+
{
|
|
52
|
+
"@id": "cbqo:components/ClosableIterator.jsonld#ClosableIterator__member__source",
|
|
53
|
+
"memberFieldName": "_source",
|
|
54
|
+
"range": {
|
|
55
|
+
"@type": "ParameterRangeIntersection",
|
|
56
|
+
"parameterRangeElements": [
|
|
57
|
+
{
|
|
58
|
+
"@type": "ParameterRangeGenericComponent",
|
|
59
|
+
"component": "urn:npm:asynciterator:AsyncIterator",
|
|
60
|
+
"genericTypeInstances": [
|
|
61
|
+
{
|
|
62
|
+
"@type": "ParameterRangeGenericTypeReference",
|
|
63
|
+
"parameterRangeGenericType": "cbqo:components/ClosableIterator.jsonld#InternalSource__generic_T"
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"@type": "ParameterRangeWildcard"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"@id": "cbqo:components/ClosableIterator.jsonld#ClosableIterator__member_onClose",
|
|
75
|
+
"memberFieldName": "onClose"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"@id": "cbqo:components/ClosableIterator.jsonld#ClosableIterator__member_constructor",
|
|
79
|
+
"memberFieldName": "constructor"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"@id": "cbqo:components/ClosableIterator.jsonld#ClosableIterator__member_read",
|
|
83
|
+
"memberFieldName": "read"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"@id": "cbqo:components/ClosableIterator.jsonld#ClosableIterator__member__end",
|
|
87
|
+
"memberFieldName": "_end"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"constructorArguments": [
|
|
91
|
+
{
|
|
92
|
+
"@id": "cbqo:components/ClosableIterator.jsonld#ClosableIterator_source"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"@id": "cbqo:components/ClosableIterator.jsonld#ClosableIterator_options__constructorArgument",
|
|
96
|
+
"fields": [
|
|
97
|
+
{
|
|
98
|
+
"keyRaw": "onClose",
|
|
99
|
+
"value": {
|
|
100
|
+
"@id": "cbqo:components/ClosableIterator.jsonld#ClosableIterator_options_onClose"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { IActorArgs, IActorTest, IAction, Mediate } from '@comunica/core';
|
|
2
2
|
import { Actor } from '@comunica/core';
|
|
3
3
|
import type { IQueryOperationResult, Bindings, IActionContext, FunctionArgumentsCache } from '@comunica/types';
|
|
4
|
-
import type { Algebra } from '@comunica/utils-algebra';
|
|
5
4
|
import type * as RDF from '@rdfjs/types';
|
|
5
|
+
import type { Algebra } from 'sparqlalgebrajs';
|
|
6
6
|
/**
|
|
7
7
|
* A comunica actor for query-operation events.
|
|
8
8
|
*
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActorQueryOperation.js","sourceRoot":"","sources":["ActorQueryOperation.ts"],"names":[],"mappings":";;;AACA,yCAAuC;AAUvC;;;;;;;;;;GAUG;AACH,MAAsB,mBACpB,SAAQ,YAAmE;IAC3E,4BAA4B;IAC5B;;;;OAIG;IACH,2BAA2B;IAC3B,YAAsB,IAAkC;QACtD,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;CACF;AAZD,kDAYC","sourcesContent":["import type { IActorArgs, IActorTest, IAction, Mediate } from '@comunica/core';\nimport { Actor } from '@comunica/core';\nimport type {\n IQueryOperationResult,\n Bindings,\n IActionContext,\n FunctionArgumentsCache,\n} from '@comunica/types';\nimport type
|
|
1
|
+
{"version":3,"file":"ActorQueryOperation.js","sourceRoot":"","sources":["ActorQueryOperation.ts"],"names":[],"mappings":";;;AACA,yCAAuC;AAUvC;;;;;;;;;;GAUG;AACH,MAAsB,mBACpB,SAAQ,YAAmE;IAC3E,4BAA4B;IAC5B;;;;OAIG;IACH,2BAA2B;IAC3B,YAAsB,IAAkC;QACtD,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;CACF;AAZD,kDAYC","sourcesContent":["import type { IActorArgs, IActorTest, IAction, Mediate } from '@comunica/core';\nimport { Actor } from '@comunica/core';\nimport type {\n IQueryOperationResult,\n Bindings,\n IActionContext,\n FunctionArgumentsCache,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica actor for query-operation events.\n *\n * Actor types:\n * * Input: IActionQueryOperation: A SPARQL Algebra operation.\n * * Test: <none>\n * * Output: IActorQueryOperationOutput: A bindings stream.\n *\n * @see IActionQueryOperation\n * @see IQueryOperationResult\n */\nexport abstract class ActorQueryOperation<TS = undefined>\n extends Actor<IActionQueryOperation, IActorTest, IQueryOperationResult, TS> {\n /* eslint-disable max-len */\n /**\n * @param args -\n * \\ @defaultNested {<default_bus> a <cbqo:components/BusQueryOperation.jsonld#BusQueryOperation>} bus\n * \\ @defaultNested {Query operation processing failed: none of the configured actors were able to handle the operation type ${action.operation.type}} busFailMessage\n */\n /* eslint-enable max-len */\n protected constructor(args: IActorQueryOperationArgs<TS>) {\n super(args);\n }\n}\n\nexport interface IActionQueryOperation extends IAction {\n /**\n * The query operation to handle.\n */\n operation: Algebra.Operation;\n}\n\nexport type IActorQueryOperationArgs<TS = undefined> = IActorArgs<\n IActionQueryOperation,\nIActorTest,\nIQueryOperationResult,\nTS\n>;\n\nexport type MediatorQueryOperation = Mediate<IActionQueryOperation, IQueryOperationResult>;\n\nexport interface IBaseExpressionContext {\n now?: Date;\n baseIRI?: string;\n extensionFunctionCreator?: (functionNamedNode: RDF.NamedNode) =>\n ((args: RDF.Term[]) => Promise<RDF.Term>) | undefined;\n functionArgumentsCache?: FunctionArgumentsCache;\n actionContext: IActionContext;\n}\n\nexport interface ISyncExpressionContext extends IBaseExpressionContext {\n bnode: (input?: string | undefined) => RDF.BlankNode;\n}\n\nexport interface IAsyncExpressionContext extends IBaseExpressionContext {\n bnode: (input?: string | undefined) => Promise<RDF.BlankNode>;\n exists?: (expr: Algebra.ExistenceExpression, bindings: Bindings) => Promise<boolean>;\n}\n\nexport type FragmentSelectorShapeTestFlags = {\n joinBindings?: boolean;\n filterBindings?: boolean;\n};\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IActorTest, TestResult } from '@comunica/core';
|
|
2
2
|
import type { IQueryOperationResult, IActionContext } from '@comunica/types';
|
|
3
|
-
import type { Algebra } from '
|
|
3
|
+
import type { Algebra } from 'sparqlalgebrajs';
|
|
4
4
|
import type { IActionQueryOperation, IActorQueryOperationArgs } from './ActorQueryOperation';
|
|
5
5
|
import { ActorQueryOperation } from './ActorQueryOperation';
|
|
6
6
|
/**
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActorQueryOperationTyped.js","sourceRoot":"","sources":["ActorQueryOperationTyped.ts"],"names":[],"mappings":";;;AAAA,+DAA8E;AAE9E,yCAA0C;
|
|
1
|
+
{"version":3,"file":"ActorQueryOperationTyped.js","sourceRoot":"","sources":["ActorQueryOperationTyped.ts"],"names":[],"mappings":";;;AAAA,+DAA8E;AAE9E,yCAA0C;AAO1C,6DAA2D;AAI3D,+DAA4D;AAE5D;;GAEG;AACH,MAAsB,wBAGpB,SAAQ,yCAAuB;IAG/B,YAAsB,IAAkC,EAAE,aAAqB;QAC7E,KAAK,CAAO,EAAE,GAAG,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC;QACxC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;QACxE,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,MAA6B;QAC7C,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;YACtB,OAAO,IAAA,eAAQ,EAAC,0DAA0D,CAAC,CAAC;QAC9E,CAAC;QACD,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,KAAK,IAAI,CAAC,aAAa,EAAE,CAAC;YACjD,OAAO,IAAA,eAAQ,EAAC,SAAS,IAAI,CAAC,IAAI,kBAAkB,IAAI,CAAC,aAAa,wBAClE,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;QAC/B,CAAC;QACD,MAAM,SAAS,GAAU,MAAM,CAAC,SAAS,CAAC;QAC1C,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACvD,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,MAA6B,EAAE,QAAY;QAC1D,uBAAuB;QACvB,MAAM,uBAAuB,GAAyC,MAAM,CAAC,OAAO;aACjF,GAAG,CAAC,+BAAa,CAAC,uBAAuB,CAAC,CAAC;QAC9C,IAAI,uBAAuB,EAAE,CAAC;YAC5B,uBAAuB,CAAC,YAAY,CAClC,MAAM,CAAC,SAAS,CAAC,IAAI,EACrB,SAAS,EACT,MAAM,CAAC,SAAS,EAChB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,+BAAa,CAAC,qBAAqB,CAAC,EACvD,IAAI,CAAC,IAAI,EACT,EAAE,CACH,CAAC;YACF,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,+BAAa,CAAC,qBAAqB,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;QAC7F,CAAC;QAED,MAAM,SAAS,GAAU,MAAM,CAAC,SAAS,CAAC;QAC1C,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,oCAAkB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QAC/E,MAAM,MAAM,GAA0B,MAAM,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC/F,IAAI,UAAU,IAAI,MAAM,EAAE,CAAC;YACzB,MAAM,CAAC,QAAQ,GACb,IAAA,gCAAe,EAA8E,MAAM,CAAC,QAAQ,CAAC,CAAC;QAClH,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CAMF;AAvDD,4DAuDC","sourcesContent":["import { KeysInitQuery, KeysQueryOperation } from '@comunica/context-entries';\nimport type { IActorTest, TestResult } from '@comunica/core';\nimport { failTest } from '@comunica/core';\nimport type {\n IQueryOperationResult,\n IPhysicalQueryPlanLogger,\n IActionContext,\n IMetadata,\n} from '@comunica/types';\nimport { cachifyMetadata } from '@comunica/utils-metadata';\nimport type * as RDF from '@rdfjs/types';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport type { IActionQueryOperation, IActorQueryOperationArgs } from './ActorQueryOperation';\nimport { ActorQueryOperation } from './ActorQueryOperation';\n\n/**\n * A base implementation for query operation actors for a specific operation type.\n */\nexport abstract class ActorQueryOperationTyped<\n O extends Algebra.Operation,\nTS = undefined,\n> extends ActorQueryOperation<TS> {\n public readonly operationName: string;\n\n protected constructor(args: IActorQueryOperationArgs<TS>, operationName: string) {\n super(<any> { ...args, operationName });\n if (!this.operationName) {\n throw new Error('A valid \"operationName\" argument must be provided.');\n }\n }\n\n public async test(action: IActionQueryOperation): Promise<TestResult<IActorTest, TS>> {\n if (!action.operation) {\n return failTest('Missing field \\'operation\\' in a query operation action.');\n }\n if (action.operation.type !== this.operationName) {\n return failTest(`Actor ${this.name} only supports ${this.operationName} operations, but got ${\n action.operation.type}`);\n }\n const operation: O = <O> action.operation;\n return this.testOperation(operation, action.context);\n }\n\n public async run(action: IActionQueryOperation, sideData: TS): Promise<IQueryOperationResult> {\n // Log to physical plan\n const physicalQueryPlanLogger: IPhysicalQueryPlanLogger | undefined = action.context\n .get(KeysInitQuery.physicalQueryPlanLogger);\n if (physicalQueryPlanLogger) {\n physicalQueryPlanLogger.logOperation(\n action.operation.type,\n undefined,\n action.operation,\n action.context.get(KeysInitQuery.physicalQueryPlanNode),\n this.name,\n {},\n );\n action.context = action.context.set(KeysInitQuery.physicalQueryPlanNode, action.operation);\n }\n\n const operation: O = <O> action.operation;\n const subContext = action.context.set(KeysQueryOperation.operation, operation);\n const output: IQueryOperationResult = await this.runOperation(operation, subContext, sideData);\n if ('metadata' in output) {\n output.metadata = <any>\n cachifyMetadata<IMetadata<RDF.QuadTermName | RDF.Variable>, RDF.QuadTermName | RDF.Variable>(output.metadata);\n }\n return output;\n }\n\n protected abstract testOperation(operation: O, context: IActionContext): Promise<TestResult<IActorTest, TS>>;\n\n protected abstract runOperation(operation: O, context: IActionContext, sideData: TS):\n Promise<IQueryOperationResult>;\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Algebra } from '
|
|
1
|
+
import type { Algebra } from 'sparqlalgebrajs';
|
|
2
2
|
import type { IActorQueryOperationArgs, MediatorQueryOperation } from './ActorQueryOperation';
|
|
3
3
|
import { ActorQueryOperationTyped } from './ActorQueryOperationTyped';
|
|
4
4
|
/**
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActorQueryOperationTypedMediated.js","sourceRoot":"","sources":["ActorQueryOperationTypedMediated.ts"],"names":[],"mappings":";;;AAEA,yEAAsE;AAEtE;;GAEG;AACH,MAAsB,gCAGpB,SAAQ,mDAA+B;IAIvC,YAAmB,IAA+C,EAAE,aAAqB;QACvF,KAAK,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IAC7B,CAAC;CACF;AAVD,4EAUC","sourcesContent":["import type { Algebra } from '
|
|
1
|
+
{"version":3,"file":"ActorQueryOperationTypedMediated.js","sourceRoot":"","sources":["ActorQueryOperationTypedMediated.ts"],"names":[],"mappings":";;;AAEA,yEAAsE;AAEtE;;GAEG;AACH,MAAsB,gCAGpB,SAAQ,mDAA+B;IAIvC,YAAmB,IAA+C,EAAE,aAAqB;QACvF,KAAK,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IAC7B,CAAC;CACF;AAVD,4EAUC","sourcesContent":["import type { Algebra } from 'sparqlalgebrajs';\nimport type { IActorQueryOperationArgs, MediatorQueryOperation } from './ActorQueryOperation';\nimport { ActorQueryOperationTyped } from './ActorQueryOperationTyped';\n\n/**\n * A base implementation for query operation actors for a specific operation type that have a query operation mediator.\n */\nexport abstract class ActorQueryOperationTypedMediated<\n O extends Algebra.Operation,\nTS = undefined,\n> extends ActorQueryOperationTyped<O, TS>\n implements IActorQueryOperationTypedMediatedArgs<TS> {\n public readonly mediatorQueryOperation: MediatorQueryOperation;\n\n public constructor(args: IActorQueryOperationTypedMediatedArgs<TS>, operationName: string) {\n super(args, operationName);\n }\n}\n\nexport interface IActorQueryOperationTypedMediatedArgs<TS = undefined> extends IActorQueryOperationArgs<TS> {\n mediatorQueryOperation: MediatorQueryOperation;\n}\n"]}
|
|
File without changes
|
package/lib/BusQueryOperation.js
CHANGED
|
File without changes
|
|
File without changes
|
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/bus-query-operation",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "A comunica bus for query-operation events.",
|
|
5
5
|
"lsd:module": true,
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
"build:components": "componentsjs-generator"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@comunica/context-entries": "4.
|
|
44
|
-
"@comunica/core": "4.
|
|
45
|
-
"@comunica/types": "4.
|
|
46
|
-
"@comunica/utils-
|
|
47
|
-
"@
|
|
48
|
-
"
|
|
43
|
+
"@comunica/context-entries": "^4.5.0",
|
|
44
|
+
"@comunica/core": "^4.5.0",
|
|
45
|
+
"@comunica/types": "^4.5.0",
|
|
46
|
+
"@comunica/utils-metadata": "^4.5.0",
|
|
47
|
+
"@rdfjs/types": "*",
|
|
48
|
+
"sparqlalgebrajs": "^5.0.2"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "2bcd98c387a021fc5c08d375793c205ca3d1bf0d"
|
|
51
51
|
}
|