Metreeca Wire
    Preparing search index...
    • Creates an HTTP-based Repository backed by a SPARQL 1.1 Protocol endpoint.

      Each query and update is dispatched eagerly as a single HTTP request.

      Important

      Transaction Isolation — None. The SPARQL 1.1 Protocol exposes no transaction primitives.

      Error handling — every HTTP exchange is funnelled through createFetch, so:

      • Network failures (DNS, refused connection, TLS, abort) reject with a Problem carrying status: 0
      • Non-2xx responses reject with a Problem carrying the wire status, the response statusText as detail, and the parsed body (RFC 7807 JSON, plain text, or omitted) as report
      • Malformed JSON in a 2xx ask/select response rejects with a synthesised Problem carrying the response status and a parse-failure detail
      • A 2xx construct response whose Content-Type is not N-Triples rejects with a synthesised Problem
      • A malformed result payload surfaces the decoder's own error: a SyntaxError for ill-formed N-Triples, or a RangeError for a malformed or unrecognised SPARQL Results JSON binding

      Parameters

      • options: {
            query: string;
            update?: string;
            fetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
        }

        Endpoint URLs and the optional fetch override

        • Readonlyquery: string

          SPARQL query endpoint URL, for example http://localhost:7200/repositories/my-repo

        • Optional Readonlyupdate?: string

          SPARQL update endpoint URL; defaults to query when omitted

        • Optional Readonlyfetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>

          Custom fetch implementation used for every HTTP exchange, enabling header, auth, and exchange customisation; defaults to the global fetch

      Returns Repository

      An immutable Repository backed by the configured endpoints