@metreeca/wire-sparql-http
v0.9.0
Published
SPARQL connector for @metreeca/wire backed by a SPARQL 1.1 Protocol endpoint.
Maintainers
Readme
@metreeca/wire-sparql-http
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.
Installation
npm install @metreeca/wire-sparql # the SPARQL query API
npm install @metreeca/wire-sparql-http # this connector[!WARNING]
TypeScript consumers must use
"moduleResolution": "nodenext"/"node16"/"bundler"intsconfig.json. The legacy"node"resolver is not supported.
Usage
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"
});See @metreeca/wire-sparql for the Repository query API (ask, select, construct, update, execute, close).
[!IMPORTANT]
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
executeruns its task directly, without bracketing. A multi-statement update is atomic only insofar as the endpoint applies it atomically.
Support
- open an issue to report a problem or to suggest a new feature
- start a discussion to ask a how-to question or to share an idea
License
This project is licensed under the Apache 2.0 License – see LICENSE file for details.
