Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VectorPipeline

A pipeline implemented using 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 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

Hierarchy

Index

Methods

bufferCount

catch

clone

collect

defaultValues

distinct

  • Returns a PipelineStage that emits all items emitted by the source PipelineStage that are distinct by comparison from previous items.

    Type parameters

    • T

    • K

    Parameters

    • input: PipelineStage<T>

      Input PipelineStage

    • Optional selector: undefined | function

      Optional function to select which value you want to check as distinct.

    Returns PipelineStage<T>

    A PipelineStage that emits items from the source PipelineStage with distinct values.

empty

endWith

  • Returns a PipelineStage that emits the items you specify as arguments after it finishes emitting items emitted by the source PipelineStage.

    Type parameters

    • T

    Parameters

    • input: PipelineStage<T>

      Input PipelineStage

    • values: T[]

      Values to append

    Returns PipelineStage<T>

    A PipelineStage that emits the items emitted by the source PipelineStage and then emits the additional values.

filter

finalize

first

flatMap

flatten

forEach

  • forEach<T>(input: VectorStage<T>, cb: function): void

from

fromAsync

groupBy

  • groupBy<T, K, R>(input: PipelineStage<T>, keySelector: function, elementSelector?: undefined | function): PipelineStage<[K, R[]]>
  • Groups the items produced by a pipeline according to a specified criterion, and emits the resulting groups

    Type parameters

    • T

    • K

    • R

    Parameters

    • input: PipelineStage<T>

      Input PipelineStage

    • keySelector: function

      A function that extracts the grouping key for each item

        • (value: T): K
        • Parameters

          • value: T

          Returns K

    • Optional elementSelector: undefined | function

      (optional) A function that transforms items before inserting them in a group

    Returns PipelineStage<[K, R[]]>

limit

map

max

  • Find the smallest value produced by a pipeline of iterators. It takes a ranking function as input, which is invoked with (x, y) and must returns True if x > y and False otherwise. Warning: this function needs to materialize all values of the pipeline.

    Type parameters

    • T

    Parameters

    • input: PipelineStage<T>

      Input PipelineStage

    • Optional ranking: undefined | function

    Returns PipelineStage<T>

    A pipeline stage that emits the highest value found

merge

mergeMap

min

  • Find the smallest value produced by a pipeline of iterators. It takes a ranking function as input, which is invoked with (x, y) and must returns True if x < y and False otherwise. Warning: this function needs to materialize all values of the pipeline.

    Type parameters

    • T

    Parameters

    • input: PipelineStage<T>

      Input PipelineStage

    • Optional ranking: undefined | function

    Returns PipelineStage<T>

    A pipeline stage that emits the lowest value found

of

peekIf

  • peekIf<T, O>(input: PipelineStage<T>, count: number, predicate: function, ifCase: function, elseCase: function): PipelineStage<O>
  • Peek values from the input pipeline stage, and use them to decide between two candidate pipeline stages to continue the pipeline.

    Type parameters

    • T

    • O

    Parameters

    • input: PipelineStage<T>

      Input pipeline stage

    • count: number

      How many items to peek from the input?

    • predicate: function

      Predicate function invoked with the values

        • (values: T[]): boolean
        • Parameters

          • values: T[]

          Returns boolean

    • ifCase: function

      Callback invoked if the predicate function evaluates to True

    • elseCase: function

      Callback invoked if the predicate function evaluates to False

    Returns PipelineStage<O>

    A pipeline stage

reduce

skip

tap

  • Perform a side effect for every emission on the source PipelineStage, but return a PipelineStage that is identical to the source.

    Type parameters

    • T

    Parameters

    • input: PipelineStage<T>

      Input PipelineStage

    • cb: function

      Callback invoked on each item

        • (value: T): void
        • Parameters

          • value: T

          Returns void

    Returns PipelineStage<T>

    A PipelineStage identical to the source, but runs the specified PipelineStage or callback(s) for each item.

Generated using TypeDoc