@lancedb/lancedb • Docs
@lancedb/lancedb / Listing
Class: Listing<T>¶
A lazy async iterator over database resources with pagination state. Requests occur during iteration; request errors terminate the iterator.
Example¶
Type Parameters¶
• T
Implements¶
AsyncIterableIterator<T>
Methods¶
[asyncIterator]()¶
Returns¶
AsyncIterableIterator<T>
Implementation of¶
AsyncIterableIterator.[asyncIterator]
next()¶
Fetch the next item, requesting another page only when needed.
Returns¶
Promise<IteratorResult<T, any>>
Implementation of¶
AsyncIterableIterator.next
numPageResults()¶
Number of cached items available without another request.
Returns¶
number
pageToken()¶
Token for the next request. Initially this is the supplied starting token. Returns undefined after fetching the final page, even with cached items. Drain the cache before saving a token to avoid skipping items on resumption. Failed requests terminate iteration and retain their token for a new iterator.
Returns¶
undefined | string