Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions library/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const defaultOptions = {
engine: new QueryEngine(),
take: 1000,
logQuery: () => {},
distinctConstruct: true, // Needed for Comunica to filter duplicate quads on CONSTRUCT queries
};

let globalOptions: Options = {};
Expand Down
11 changes: 0 additions & 11 deletions library/rdf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ export type { RDF };

export { fromRdf, toRdf } from "npm:rdf-literal@^2.0.0";

import { quadToStringQuad } from "npm:rdf-string@^2.0.0";

import { DataFactory, DefaultGraph } from "npm:rdf-data-factory@^2.0.2";
export { DataFactory, DefaultGraph };

Expand All @@ -21,17 +19,8 @@ export type Graph = Map<IRI, Node>;
export const quadsToGraph = (quadStream: RDF.ResultStream<RDF.Quad>) => {
return new Promise<Graph>((resolve, reject) => {
const graph: Graph = new Map();
const included: Record<string, true> = {};

quadStream.on("data", (quad) => {
const hash = Object.values(quadToStringQuad(quad)).join(" ");

if (included[hash]) {
return;
}

included[hash] = true;

const s = quad.subject.value;
const p = quad.predicate.value;

Expand Down
2 changes: 1 addition & 1 deletion tests/test_deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ export {

export { assert as assertTypeSafe, type Equals } from "npm:tsafe@^1.8.5";

export { QueryEngine as Comunica } from "npm:@comunica/query-sparql-rdfjs@^4.1.0";
export { QueryEngine as Comunica } from "npm:@comunica/query-sparql-rdfjs@^4.3.0";