@ibm-cloud/cloudant - v0.12.8
    Preparing search index...

    Class Pagination<I>

    Pagination is the entry point for pagination features.

    Use the static methods to create new Pagination instances. The instances in turn can be used to create:

    • Stream of result rows via ()
    • Stream of pages via ()
    • AsyncIterableIterator of result rows via ()
    • AsyncIterableIterators of pages via ()
    • IBM Cloud SDK style Pagers via ()

    Type Parameters

    • I

      the result row type of the operation.

    Index

    Methods

    • Get an AsyncIterableIterator for all the pages.

      This function is useful for handling pages in an enhanced for loop e.g.

      for await (const row: ReadonlyArray<DocsResultRow> of Pagination.newPagination(client, PagerType.POST_ALL_DOCS, allDocsParams).pages()){
      ...
      }

      Returns AsyncIterableIterator<readonly I[]>

      an Iterable over all the pages

    • Get an AsyncIterableIterator for all the rows from all the pages.

      This function is useful for handling rows in an enhanced for loop e.g.

      for await (const row: DocsResultRow of Pagination.newPagination(client, PagerType.POST_ALL_DOCS, allDocsParams).rows()) {
      ...
      }

      Returns AsyncIterableIterator<I>

      an AsyncIterableIterator over all the result rows