Skip to content

ItemCursorSelector

Defined in: runtime/selector.ts:89

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


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


only(template): TemplateItemCursorSelector<TItem>

Defined in: runtime/selector.ts:90

string

TemplateItemCursorSelector<TItem>


paginate(options): ItemPaginateSelector<TItem>

Defined in: runtime/selector.ts:91

PaginateOptions

ItemPaginateSelector<TItem>


parent(parentOrParents): this

Defined in: runtime/selector.ts:75

SelectorIdInput

this

BaseSelector.parent


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

Defined in: runtime/selector.ts:92

string | string[]

"append" | "replace"

TemplateItemCursorSelector<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): TemplateItemCursorSelector<TItem>

Defined in: runtime/selector.ts:93

string

TemplateItemCursorSelector<TItem>


union(template): TemplateItemCursorSelector<TItem>

Defined in: runtime/selector.ts:94

string

TemplateItemCursorSelector<TItem>