@metreeca/wire-sparql-rdf4j
v0.9.0
Published
SPARQL connector for @metreeca/wire backed by an RDF4J Server repository.
Maintainers
Readme
@metreeca/wire-sparql-rdf4j
SPARQL connector for @metreeca/wire backed by an RDF4J Server repository.
Exposes any RDF4J Server repository through the common @metreeca/wire-sparql Repository
interface, bracketing each task in a server-managed transaction. One-off operations outside a transaction are delegated
to the SPARQL 1.1 Protocol through the companion
@metreeca/wire-sparql-http connector.
Installation
npm install @metreeca/wire-sparql # the SPARQL query API
npm install @metreeca/wire-sparql-rdf4j # this connector[!WARNING]
TypeScript consumers must use
"moduleResolution": "nodenext"/"node16"/"bundler"intsconfig.json. The legacy"node"resolver is not supported.
Usage
Connect to an RDF4J Server repository with createRDF4JRepository, then issue queries and updates through the
@metreeca/wire-sparql Repository API:
import { createRDF4JRepository } from "@metreeca/wire-sparql-rdf4j";
const repository = createRDF4JRepository({
server: "https://example.org/rdf4j-server",
repository: "my-repo"
});See @metreeca/wire-sparql for the Repository query API (ask, select, construct, update, execute, close).
[!IMPORTANT]
This connector defers transaction isolation to the configured RDF4J repository: server-managed transactions bracket each task for atomic commit and rollback, achieving the isolation level of the underlying store (RDF4J's MemoryStore and NativeStore both default to
SNAPSHOT_READ). The REST API exposes no isolation-level parameter on the start-transaction call.
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.
