diff --git a/jest.config.js b/jest.config.js index 243a948..0e1ecfd 100644 --- a/jest.config.js +++ b/jest.config.js @@ -11,10 +11,10 @@ export default { coverageReporters: ['json-summary', 'text'], coverageThreshold: { global: { - lines: 67.89, - statements: 68.24, + lines: 68.16, + statements: 68.5, branches: 64.36, - functions: 74.4, + functions: 75, }, }, transform: { diff --git a/src/generator.ts b/src/generator.ts index 392b728..51a1547 100644 --- a/src/generator.ts +++ b/src/generator.ts @@ -131,12 +131,13 @@ export class Query extends BaseQuery { public withIris(iris: NamedNode[]) { const query = clonedeep(this.query); + // Increase Comunica query performance by inserting the VALUES as the first element in the query’s WHERE clause. const patterns: Pattern[] = [ - ...(query.where ?? []), { type: 'values', values: iris.map($this => ({'?this': $this})), }, + ...(query.where ?? []), ]; query.where = [{type: 'group', patterns}];