Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Iterator<T, Paginator>

Type parameters

  • T

  • Paginator: AbstractPaginator<T>

Hierarchy

Implements

  • AsyncIterableIterator<T>

Index

Constructors

Protected constructor

  • new Iterator(paginator: Paginator): Iterator

Properties

Protected Optional lastYielded

lastYielded: T

Accessors

consumedCapacity

  • get consumedCapacity(): ConsumedCapacity | undefined
  • Retrieve the reported capacity consumed by this iterator. Will be undefined unless returned consumed capacity is requested.

    Returns ConsumedCapacity | undefined

count

  • get count(): number
  • Retrieve the number of items yielded thus far by this iterator.

    Returns number

scannedCount

  • get scannedCount(): number
  • Retrieve the number of items scanned thus far during the execution of this iterator. This number should be the same as count unless a filter expression was used.

    Returns number

Methods

__@asyncIterator

  • __@asyncIterator(): this

next

  • next(): Promise<IteratorResult<T>>
  • inheritdoc

    Returns Promise<IteratorResult<T>>

pages

  • pages(): Paginator
  • Detaches the underlying paginator from this iterator and returns it. The paginator will yield arrays of unmarshalled items, with each yielded array corresponding to a single call to the underlying API. As with the underlying API, pages may contain a variable number of items or no items, in which case an empty array will be yielded.

    Calling this method will disable further iteration.

    Returns Paginator

return

  • return(): Promise<IteratorResult<T>>
  • inheritdoc

    Returns Promise<IteratorResult<T>>