Skip to main content
Module

x/ldkit/rdf.ts>RDF.Store

LDkit - Linked Data query toolkit for TypeScript developers
Go to Latest
interface RDF.Store
implements Source<Q>, Sink<Stream<Q>, EventEmitter>
import { type RDF } from "https://deno.land/x/ldkit@v0.5.1/rdf.ts";
const { Store } = RDF;

A Store is an object that usually used to persist quads.

The interface allows removing quads, beside read and write access. The quads can be stored locally or remotely.

Access to stores LDP or SPARQL endpoints can be implemented with a Store inteface.

Type Parameters

optional
Q extends BaseQuad = Quad

Methods

remove(stream: Stream<Q>): EventEmitter

Removes all streamed quads.

The end and error events are used like described in the Stream interface.

removeMatches(
subject?: Term | null,
predicate?: Term | null,
object?: Term | null,
graph?: Term | null,
): EventEmitter

All quads matching the pattern will be removed.

The end and error events are used like described in the Stream interface.

deleteGraph(graph: Q["graph"] | string): EventEmitter

Deletes the given named graph.

The end and error events are used like described in the Stream interface.