mise API - v0.0.0
    Preparing search index...

    Function listPages_walkWindowed

    • Walks every page of a paginated CUBE list with several pages in flight.

      The one pagination loop, windowed: the first page is fetched alone to learn the server's total, and every further offset is then known, so up to inFlight pages are fetched at once and yielded as each lands — in completion order, which is why this walk suits a consumer that keys rows by id and commits the whole set when it is done, and not one that reads rows in server order or resumes from an offset. A server that reports no total is walked one page at a time, exactly as listPages_walk does. A fetch error ends the walk once the pages already in flight have settled, and propagates.

      Type Parameters

      • T

      Parameters

      • page_fetch: (offset: number, limit: number) => Promise<ListPage<T>>

        Fetches one page at the given offset and limit.

      • options: WindowedPageWalkOptions = {}

        Page size and window width. See WindowedPageWalkOptions.

      Returns AsyncGenerator<PageWalkStep<T>, void, void>

      Async generator yielding a PageWalkStep per fetched page.