Skip to content

CursorSelector

Defined in: runtime/selector.ts:56

The most abstract form of access to an unbounded list. This provides the basic mechanics for all pagination in the platform.

A naive access pattern for this would be:

const firstPage = await somethingThatReturnsASelector().limit(100).execute();
const secondPage = await somethingThatReturnsASelector().limit(100).cursor(firstPage.cursor).execute();

Note that selectors are chainable and immutable. This the following will work:

const selector = somethingThatReturnsASelector().limit(100);
const firstPage = await selector.execute();
const secondPage = await selector.cursor(firstPage.cursor).execute();

TResult

cursor(value): this

Defined in: runtime/selector.ts:57

CursorInput

this


execute(): CursorSelectorResult<TResult>

Defined in: runtime/selector.ts:58

CursorSelectorResult<TResult>


first(): Promise<TResult | undefined>

Defined in: runtime/selector.ts:59

Promise<TResult | undefined>


iterator(): AsyncGenerator<TResult, void, undefined>

Defined in: runtime/selector.ts:60

AsyncGenerator<TResult, void, undefined>


limit(value): this

Defined in: runtime/selector.ts:61

number

this