Skip to content

UnionCursorSelector

Defined in: runtime/selector.ts:117

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();

TItem

archived(include): this

Defined in: runtime/selector.ts:72

boolean | "include" | "exclude" | "only"

this

BaseSelector.archived


assign(input): this

Defined in: runtime/selector.ts:71

ItemQuery

this

BaseSelector.assign


cursor(value): this

Defined in: runtime/selector.ts:57

CursorInput

this

CursorSelector.cursor


debug(): this

Defined in: runtime/selector.ts:78

this

BaseSelector.debug


execute(): CursorSelectorResult<TItem>

Defined in: runtime/selector.ts:58

CursorSelectorResult<TItem>

CursorSelector.execute


filter(condition): this

Defined in: runtime/selector.ts:82

ItemFilter

this

BaseFilterSelector.filter


first(): Promise<TItem | undefined>

Defined in: runtime/selector.ts:59

Promise<TItem | undefined>

CursorSelector.first


id(itemOrItems): this

Defined in: runtime/selector.ts:73

SelectorIdInput

this

BaseSelector.id


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

Defined in: runtime/selector.ts:60

AsyncGenerator<TItem, void, undefined>

CursorSelector.iterator


join(…relations): this

Defined in: runtime/selector.ts:118

…[string, ...string[]]

this


key(key): this

Defined in: runtime/selector.ts:74

string | string[]

this

BaseSelector.key


limit(value): this

Defined in: runtime/selector.ts:61

number

this

CursorSelector.limit


paginate(options): UnionPaginateSelector<TItem>

Defined in: runtime/selector.ts:119

PaginateOptions

UnionPaginateSelector<TItem>


parent(parentOrParents): this

Defined in: runtime/selector.ts:75

SelectorIdInput

this

BaseSelector.parent


prn(prn, mode?): UnionCursorSelector<TItem>

Defined in: runtime/selector.ts:120

string | string[]

"append" | "replace"

UnionCursorSelector<TItem>


search(idx, query): this

Defined in: runtime/selector.ts:76

ReadSearchIndexInstance

SearchQuery

this

BaseSelector.search


state(state): this

Defined in: runtime/selector.ts:77

string | string[]

this

BaseSelector.state


template(template): UnionCursorSelector<TItem>

Defined in: runtime/selector.ts:121

string

UnionCursorSelector<TItem>