UNPKG

rdf-streaming-store

Version:

A read-only RDF/JS store that allows parallel data lookup and insertion.

27 lines (26 loc) 1.14 kB
import type * as RDF from '@rdfjs/types'; import type { PassThrough } from 'readable-stream'; /** * A PendingStreamsIndex stores pending streams indexed by the quad pattern they have been created for. */ export declare class PendingStreamsIndex<Q extends RDF.BaseQuad = RDF.Quad> { private static readonly ID_VARIABLE; private static readonly ID_SEPARATOR; readonly indexedStreams: Map<string, PassThrough[]>; readonly allStreams: PassThrough[]; protected termToString(term?: RDF.Term | null): string; /** * Add a new pending stream for the given quad pattern. * @param pendingStream A pending stream. * @param subject A term. * @param predicate A term. * @param object A term. * @param graph A term. */ addPatternListener(pendingStream: PassThrough, subject?: RDF.Term | null, predicate?: RDF.Term | null, object?: RDF.Term | null, graph?: RDF.Term | null): void; /** * Find all the pending streams from which their quad pattern match the given quad. * @param quad The quad to match patterns to. */ getPendingStreamsForQuad(quad: Q): PassThrough[]; }