import { PipelineInput, StreamPipelineInput, PipelineStage, PipelineEngine } from './pipeline-engine'; /** * A PipelineStage which materializes all intermediate results in main memory. * @author Thomas Minier */ export declare class VectorStage implements PipelineStage { private readonly _content; constructor(content: Promise>); getContent(): Promise>; subscribe(onData: (value: T) => void, onError: (err: any) => void, onEnd: () => void): void; forEach(cb: (value: T) => void): void; } export declare class VectorStreamInput implements StreamPipelineInput { private readonly _resolve; private readonly _reject; private _content; constructor(resolve: any, reject: any); next(value: T): void; error(err: any): void; complete(): void; } /** * A pipeline implemented using {@link VectorStage}, *i.e.*, all intermediate results are materialized in main memory. This approach is often called **vectorized approach**. * This pipeline is more efficient CPU-wise than {@link RxjsPipeline}, but it also consumes much more memory, as it materializes evey stage of the pipeline before moving to the next. * It should only be used when SPARQL queries generate few intermediate results. * @see P. A. Boncz, S. Manegold, and M. L. Kersten. "Database architecture evolution: Mammals flourished long before dinosaurs became extinct". PVLDB, (2009) * @author Thomas Minier */ export default class VectorPipeline extends PipelineEngine { empty(): VectorStage; of(...values: T[]): VectorStage; from(x: PipelineInput): VectorStage; fromAsync(cb: (input: StreamPipelineInput) => void): VectorStage; clone(stage: VectorStage): VectorStage; catch(input: VectorStage, handler?: (err: Error) => VectorStage): VectorStage; merge(...inputs: Array>): VectorStage; map(input: VectorStage, mapper: (value: F) => T): VectorStage; flatMap(input: VectorStage, mapper: (value: F) => T[]): VectorStage; mergeMap(input: VectorStage, mapper: (value: F) => VectorStage): VectorStage; filter(input: VectorStage, predicate: (value: T) => boolean): VectorStage; finalize(input: VectorStage, callback: () => void): VectorStage; reduce(input: VectorStage, reducer: (acc: T, value: F) => T, initial: T): VectorStage; limit(input: VectorStage, stopAfter: number): VectorStage; skip(input: VectorStage, toSkip: number): VectorStage; defaultValues(input: VectorStage, ...values: T[]): VectorStage; bufferCount(input: VectorStage, count: number): VectorStage; forEach(input: VectorStage, cb: (value: T) => void): void; first(input: VectorStage): VectorStage; collect(input: VectorStage): VectorStage; }