@comunica/actor-query-operation-values 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.
@@ -16,7 +16,17 @@
16
16
  "@type": "GenericComponentExtension",
17
17
  "component": "cbqo:components/ActorQueryOperationTyped.jsonld#ActorQueryOperationTyped",
18
18
  "genericTypeInstances": [
19
- "urn:npm:sparqlalgebrajs:Values"
19
+ {
20
+ "@type": "ParameterRangeIntersection",
21
+ "parameterRangeElements": [
22
+ {
23
+ "@type": "ParameterRangeWildcard"
24
+ },
25
+ {
26
+ "@type": "ParameterRangeWildcard"
27
+ }
28
+ ]
29
+ }
20
30
  ]
21
31
  }
22
32
  ],
File without changes
File without changes
@@ -3,7 +3,7 @@ import type { IActionQueryOperation } from '@comunica/bus-query-operation';
3
3
  import { ActorQueryOperationTyped } from '@comunica/bus-query-operation';
4
4
  import type { IActorArgs, IActorTest, TestResult } from '@comunica/core';
5
5
  import type { IQueryOperationResult, IActionContext } from '@comunica/types';
6
- import type { Algebra } from 'sparqlalgebrajs';
6
+ import { Algebra } from '@comunica/utils-algebra';
7
7
  /**
8
8
  * A comunica Values Query Operation Actor.
9
9
  */
@@ -4,6 +4,7 @@ exports.ActorQueryOperationValues = 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_bindings_factory_1 = require("@comunica/utils-bindings-factory");
8
9
  const utils_metadata_1 = require("@comunica/utils-metadata");
9
10
  const asynciterator_1 = require("asynciterator");
@@ -12,7 +13,7 @@ const asynciterator_1 = require("asynciterator");
12
13
  */
13
14
  class ActorQueryOperationValues extends bus_query_operation_1.ActorQueryOperationTyped {
14
15
  constructor(args) {
15
- super(args, 'values');
16
+ super(args, utils_algebra_1.Algebra.Types.VALUES);
16
17
  }
17
18
  async testOperation(_operation, _context) {
18
19
  return (0, core_1.passTestVoid)();
@@ -22,13 +23,13 @@ class ActorQueryOperationValues extends bus_query_operation_1.ActorQueryOperatio
22
23
  const bindingsFactory = await utils_bindings_factory_1.BindingsFactory.create(this.mediatorMergeBindingsContext, context, dataFactory);
23
24
  const bindingsStream = new asynciterator_1.ArrayIterator(operation.bindings
24
25
  .map(x => bindingsFactory.bindings(Object.entries(x)
25
- .map(([key, value]) => [dataFactory.variable(key.slice(1)), value]))));
26
+ .map(([key, value]) => [dataFactory.variable(key), value]))));
26
27
  const metadata = () => Promise.resolve({
27
28
  state: new utils_metadata_1.MetadataValidationState(),
28
29
  cardinality: { type: 'exact', value: operation.bindings.length },
29
30
  variables: operation.variables.map(variable => ({
30
31
  variable,
31
- canBeUndef: operation.bindings.some(bindings => !(`?${variable.value}` in bindings)),
32
+ canBeUndef: operation.bindings.some(bindings => !(variable.value in bindings)),
32
33
  })),
33
34
  });
34
35
  return { type: 'bindings', bindingsStream, metadata };
@@ -1 +1 @@
1
- {"version":3,"file":"ActorQueryOperationValues.js","sourceRoot":"","sources":["ActorQueryOperationValues.ts"],"names":[],"mappings":";;;AAEA,uEAAyE;AACzE,+DAA0D;AAE1D,yCAA8C;AAS9C,6EAAmE;AACnE,6DAAmE;AACnE,iDAA8C;AAG9C;;GAEG;AACH,MAAa,yBAA0B,SAAQ,8CAAwC;IAGrF,YAAmB,IAAgD;QACjE,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACxB,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,UAA0B,EAAE,QAAwB;QAC7E,OAAO,IAAA,mBAAY,GAAE,CAAC;IACxB,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,SAAyB,EAAE,OAAuB;QAE1E,MAAM,WAAW,GAAwB,OAAO,CAAC,OAAO,CAAC,+BAAa,CAAC,WAAW,CAAC,CAAC;QACpF,MAAM,eAAe,GAAG,MAAM,wCAAe,CAAC,MAAM,CAAC,IAAI,CAAC,4BAA4B,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QAE9G,MAAM,cAAc,GAAmB,IAAI,6BAAa,CAAW,SAAS,CAAC,QAAQ;aAClF,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;aACjD,GAAG,CAAC,CAAC,CAAE,GAAG,EAAE,KAAK,CAAE,EAAE,EAAE,CAAC,CAAE,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/E,MAAM,QAAQ,GAAG,GAA8B,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;YAChE,KAAK,EAAE,IAAI,wCAAuB,EAAE;YACpC,WAAW,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;YAChE,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;gBAC9C,QAAQ;gBACR,UAAU,EAAE,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,KAAK,EAAE,IAAI,QAAQ,CAAC,CAAC;aACrF,CAAC,CAAC;SACJ,CAAC,CAAC;QACH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC;IACxD,CAAC;CACF;AA7BD,8DA6BC","sourcesContent":["import type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActionQueryOperation } from '@comunica/bus-query-operation';\nimport { ActorQueryOperationTyped } from '@comunica/bus-query-operation';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { IActorArgs, IActorTest, TestResult } from '@comunica/core';\nimport { passTestVoid } from '@comunica/core';\nimport type {\n IQueryOperationResult,\n BindingsStream,\n Bindings,\n IActionContext,\n MetadataBindings,\n ComunicaDataFactory,\n} from '@comunica/types';\nimport { BindingsFactory } from '@comunica/utils-bindings-factory';\nimport { MetadataValidationState } from '@comunica/utils-metadata';\nimport { ArrayIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Values Query Operation Actor.\n */\nexport class ActorQueryOperationValues extends ActorQueryOperationTyped<Algebra.Values> {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationUpdateDeleteInsertArgs) {\n super(args, 'values');\n }\n\n public async testOperation(_operation: Algebra.Values, _context: IActionContext): Promise<TestResult<IActorTest>> {\n return passTestVoid();\n }\n\n public async runOperation(operation: Algebra.Values, context: IActionContext):\n Promise<IQueryOperationResult> {\n const dataFactory: ComunicaDataFactory = context.getSafe(KeysInitQuery.dataFactory);\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context, dataFactory);\n\n const bindingsStream: BindingsStream = new ArrayIterator<Bindings>(operation.bindings\n .map(x => bindingsFactory.bindings(Object.entries(x)\n .map(([ key, value ]) => [ dataFactory.variable(key.slice(1)), value ]))));\n const metadata = (): Promise<MetadataBindings> => Promise.resolve({\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: operation.bindings.length },\n variables: operation.variables.map(variable => ({\n variable,\n canBeUndef: operation.bindings.some(bindings => !(`?${variable.value}` in bindings)),\n })),\n });\n return { type: 'bindings', bindingsStream, metadata };\n }\n}\n\nexport interface IActorQueryOperationUpdateDeleteInsertArgs extends\n IActorArgs<IActionQueryOperation, IActorTest, IQueryOperationResult> {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n"]}
1
+ {"version":3,"file":"ActorQueryOperationValues.js","sourceRoot":"","sources":["ActorQueryOperationValues.ts"],"names":[],"mappings":";;;AAEA,uEAAyE;AACz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AAU,EAAE,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,IAAI,QAAQ,CAAC,CAAC;aAC/E,CAAC,CAAC;SACJ,CAAC,CAAC;QACH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC;IACxD,CAAC;CACF;AA7BD,8DA6BC","sourcesContent":["import type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActionQueryOperation } from '@comunica/bus-query-operation';\nimport { ActorQueryOperationTyped } from '@comunica/bus-query-operation';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { IActorArgs, IActorTest, TestResult } from '@comunica/core';\nimport { passTestVoid } from '@comunica/core';\nimport type {\n IQueryOperationResult,\n BindingsStream,\n Bindings,\n IActionContext,\n MetadataBindings,\n ComunicaDataFactory,\n} from '@comunica/types';\nimport { Algebra } from '@comunica/utils-algebra';\nimport { BindingsFactory } from '@comunica/utils-bindings-factory';\nimport { MetadataValidationState } from '@comunica/utils-metadata';\nimport { ArrayIterator } from 'asynciterator';\n\n/**\n * A comunica Values Query Operation Actor.\n */\nexport class ActorQueryOperationValues extends ActorQueryOperationTyped<Algebra.Values> {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationUpdateDeleteInsertArgs) {\n super(args, Algebra.Types.VALUES);\n }\n\n public async testOperation(_operation: Algebra.Values, _context: IActionContext): Promise<TestResult<IActorTest>> {\n return passTestVoid();\n }\n\n public async runOperation(operation: Algebra.Values, context: IActionContext):\n Promise<IQueryOperationResult> {\n const dataFactory: ComunicaDataFactory = context.getSafe(KeysInitQuery.dataFactory);\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context, dataFactory);\n\n const bindingsStream: BindingsStream = new ArrayIterator<Bindings>(operation.bindings\n .map(x => bindingsFactory.bindings(Object.entries(x)\n .map(([ key, value ]) => [ dataFactory.variable(key), value ]))));\n const metadata = (): Promise<MetadataBindings> => Promise.resolve({\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: operation.bindings.length },\n variables: operation.variables.map(variable => ({\n variable,\n canBeUndef: operation.bindings.some(bindings => !(variable.value in bindings)),\n })),\n });\n return { type: 'bindings', bindingsStream, metadata };\n }\n}\n\nexport interface IActorQueryOperationUpdateDeleteInsertArgs extends\n IActorArgs<IActionQueryOperation, IActorTest, IQueryOperationResult> {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\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-values",
3
- "version": "4.4.0",
3
+ "version": "4.4.2-alpha.49.0",
4
4
  "description": "A values query-operation actor",
5
5
  "lsd:module": true,
6
6
  "license": "MIT",
@@ -41,15 +41,15 @@
41
41
  "build:components": "componentsjs-generator"
42
42
  },
43
43
  "dependencies": {
44
- "@comunica/bus-merge-bindings-context": "^4.4.0",
45
- "@comunica/bus-query-operation": "^4.4.0",
46
- "@comunica/context-entries": "^4.4.0",
47
- "@comunica/core": "^4.4.0",
48
- "@comunica/types": "^4.4.0",
49
- "@comunica/utils-bindings-factory": "^4.4.0",
50
- "@comunica/utils-metadata": "^4.4.0",
51
- "asynciterator": "^3.9.0",
52
- "sparqlalgebrajs": "^4.3.8"
44
+ "@comunica/bus-merge-bindings-context": "4.4.2-alpha.49.0",
45
+ "@comunica/bus-query-operation": "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-bindings-factory": "4.4.2-alpha.49.0",
51
+ "@comunica/utils-metadata": "4.4.2-alpha.49.0",
52
+ "asynciterator": "^3.10.0"
53
53
  },
54
- "gitHead": "27acde56dfe0c1ff1162c1f46818ad752296ca88"
54
+ "gitHead": "ef6f96cfd8faf7c37955bb7e0fe9f6fc6a994bdf"
55
55
  }