SPARQL connector for @metreeca/wire backed by a SPARQL 1.1 Protocol endpoint.
Exposes any SPARQL 1.1 Protocol compliant endpoint through the common
@metreeca/wire-sparql Repository interface, issuing each query and update as a single HTTP request. For RDF4J
Server repositories with server-managed transactions, use the companion
@metreeca/wire-sparql-rdf4j connector.
npm install @metreeca/wire-sparql # the SPARQL query API
npm install @metreeca/wire-sparql-http # this connector
TypeScript consumers must use "moduleResolution": "nodenext"/"node16"/"bundler" in tsconfig.json.
The legacy "node" resolver is not supported.
Connect to a SPARQL 1.1 Protocol endpoint with createHTTPRepository, then issue queries and updates through the
@metreeca/wire-sparql Repository API:
import { createHTTPRepository } from "@metreeca/wire-sparql-http";
const repository = createHTTPRepository({
query: "https://example.org/sparql",
update: "https://example.org/sparql/statements"
});
The optional graphs setting names a Graph Store Protocol endpoint,
where merge and store upload their triples in bulk. Without it, they run as SPARQL updates on the update endpoint,
with the same effect on the store, but with the data parsed as SPARQL text and sent as a single update request.
See @metreeca/wire-sparql for the Repository API: ask, select and construct query the store, update,
merge and store write to it, and execute and close manage transactions and resources.
This connector provides no transaction isolation: the SPARQL 1.1 Protocol exposes no transaction primitives, so each query and update is
dispatched eagerly as a single HTTP request and execute runs its task directly, without bracketing. A
multi-statement update is atomic only insofar as the endpoint applies it atomically.
This project is licensed under the Apache 2.0 License – see LICENSE file for details.
Creates an HTTP-based Repository backed by a SPARQL 1.1 Protocol endpoint.
SPARQL 1.1 Protocol endpoint connector for the @metreeca/wire storage connector collection.
Exposes any SPARQL 1.1 Protocol compliant endpoint through the common Repository API.
Transaction Isolation — None. The SPARQL 1.1 Protocol exposes no transaction primitives.
See
SPARQL 1.1 Protocol