import type * as RDF from '@rdfjs/types'; import { AsyncIterator } from 'asynciterator'; import type { QuadTermName } from 'rdf-terms'; import type { BindingsProducer } from './BindingsProducer'; /** * An async iterator over the bindings produced by a single store lookup. * * `RdfStore#matchBindings` used to wrap the `readBindings` generator using `wrap()`, * which routes every single binding through a generator resume, an iterator result object, * and the read method of a `WrappingIterator`. * Reading straight from a {@link BindingsProducer} removes all three. * * A lookup that can not produce any results gets this iterator without a producer, rather than * asynciterator's `empty()`. An `EmptyIterator` has already ended by the time it is constructed and * schedules its only `end` event immediately, so a consumer that subscribes a tick later never sees * it and waits forever. This iterator starts out open and ends on its first read, just like the * wrapped generator did. */ export declare class BindingsIterator extends AsyncIterator { private producer; /** * Skips this scan ahead to a term, when the store it reads from can do that. Absent otherwise, so * that a consumer can tell whether skipping is supported by checking for it. */ readonly seekTo: ((component: QuadTermName, term: RDF.Term) => void) | undefined; /** * The components this scan varies over, in the order it produces them, or undefined when the * index it reads is not sorted and therefore produces no useful order. */ readonly resultOrder: QuadTermName[] | undefined; constructor(producer?: BindingsProducer, seekTo?: (component: QuadTermName, term: RDF.Term) => void, resultOrder?: QuadTermName[]); read(): RDF.Bindings | null; protected _destroy(cause: Error | undefined, callback: (error?: Error) => void): void; }