class QueryEngine
implements IQueryEngine
import { QueryEngine } from "https://deno.land/x/ldkit/mod.ts";
A query engine that can query a SPARQL endpoint.
Implements IQueryEngine interface.
This engine is used by default if no other engine is configured. See Options for more details.
If you need to query other data sources, or multiple SPARQL endpoints, you can use Comunica instead, extend this engine, or implement your own.
Methods
protected
getFetch(context?: QueryContext): fetchprotected
getSparqlEndpoint(context?: QueryContext): stringprotected
query(): Promise<Response>protected
queryAndResolve<T extends ResolverType>()queryBindings(query: string, context?: QueryContext): Promise<RDF.ResultStream<RDF.Bindings>>
Executes a SPARQL SELECT query and returns a stream of bindings.
queryBoolean(query: string, context?: QueryContext): Promise<boolean>
Executes a SPARQL ASK query and returns a boolean result.
queryQuads(query: string, context?: QueryContext): Promise<RDF.ResultStream<RDF.Quad>>
Executes a SPARQL CONSTRUCT query and returns a stream of quads.
queryVoid(query: string, context?: QueryContext): Promise<void>
Executes a SPARQL UPDATE query and returns nothing.