Metreeca Wire
    Preparing search index...

    Module @metreeca/wire-sparql-rdf4j - v0.9.0

    RDF4J REST API endpoint connector for the @metreeca/wire storage connector collection.

    Exposes any RDF4J Server repository through the common Repository API, bracketing each task in a server-managed transaction.

    Important

    Transaction Isolation — Determined by the target RDF4J repository.

    @metreeca/wire-sparql-rdf4j

    npm

    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" in tsconfig.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.

    Functions

    createRDF4JRepository

    Creates a Repository backed by an RDF4J REST API endpoint.