Class Iterator<T>

Type Parameters

  • T

Implements

  • AsyncIterableIterator<T>

Constructors

Methods

  • Returns AsyncIterableIterator<T, any, any>

  • Calls a defined callback function on each QueryResult. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

    Type Parameters

    • B

    Parameters

    • acc: B

      The initial value of the accumulator.

    • fn: ((value: T, acc: B) => B)

      A function that accepts a QueryResult and accumulator, and returns an accumulator.

        • (value, acc): B
        • Parameters

          • value: T
          • acc: B

          Returns B

    Returns Promise<B>

  • Performs the specified action for each element.

    Parameters

    • fn: ((value: T) => void)

      A function that accepts a QueryResult. forEach calls the fn function one time for each QueryResult.

        • (value): void
        • Parameters

          • value: T

          Returns void

    Returns Promise<void>

  • Calls a defined callback function on each QueryResult, and returns an array that contains the results.

    Type Parameters

    • B

    Parameters

    • fn: ((t: T) => B)

      A function that accepts a QueryResult. map calls the fn function one time for each QueryResult.

        • (t): B
        • Parameters

          Returns B

    Returns Iterator<B>

  • Returns Promise<IteratorResult<T, any>>