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();Extends
Section titled “Extends”BaseSelector.CursorSelector<TItem>.BaseFilterSelector
Type Parameters
Section titled “Type Parameters”TItem
Methods
Section titled “Methods”archived()
Section titled “archived()”archived(
include):this
Defined in: runtime/selector.ts:72
Parameters
Section titled “Parameters”include
Section titled “include”boolean | "include" | "exclude" | "only"
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”BaseSelector.archived
assign()
Section titled “assign()”assign(
input):this
Defined in: runtime/selector.ts:71
Parameters
Section titled “Parameters”ItemQuery
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”BaseSelector.assign
cursor()
Section titled “cursor()”cursor(
value):this
Defined in: runtime/selector.ts:57
Parameters
Section titled “Parameters”Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”debug()
Section titled “debug()”debug():
this
Defined in: runtime/selector.ts:78
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”BaseSelector.debug
execute()
Section titled “execute()”execute():
CursorSelectorResult<TItem>
Defined in: runtime/selector.ts:58
Returns
Section titled “Returns”CursorSelectorResult<TItem>
Inherited from
Section titled “Inherited from”filter()
Section titled “filter()”filter(
condition):this
Defined in: runtime/selector.ts:82
Parameters
Section titled “Parameters”condition
Section titled “condition”ItemFilter
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”BaseFilterSelector.filter
first()
Section titled “first()”first():
Promise<TItem|undefined>
Defined in: runtime/selector.ts:59
Returns
Section titled “Returns”Promise<TItem | undefined>
Inherited from
Section titled “Inherited from”id(
itemOrItems):this
Defined in: runtime/selector.ts:73
Parameters
Section titled “Parameters”itemOrItems
Section titled “itemOrItems”Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”BaseSelector.id
iterator()
Section titled “iterator()”iterator():
AsyncGenerator<TItem,void,undefined>
Defined in: runtime/selector.ts:60
Returns
Section titled “Returns”AsyncGenerator<TItem, void, undefined>
Inherited from
Section titled “Inherited from”join()
Section titled “join()”join(…
relations):this
Defined in: runtime/selector.ts:118
Parameters
Section titled “Parameters”relations
Section titled “relations”…[string, ...string[]]
Returns
Section titled “Returns”this
key(
key):this
Defined in: runtime/selector.ts:74
Parameters
Section titled “Parameters”string | string[]
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”BaseSelector.key
limit()
Section titled “limit()”limit(
value):this
Defined in: runtime/selector.ts:61
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”paginate()
Section titled “paginate()”paginate(
options):UnionPaginateSelector<TItem>
Defined in: runtime/selector.ts:119
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”UnionPaginateSelector<TItem>
parent()
Section titled “parent()”parent(
parentOrParents):this
Defined in: runtime/selector.ts:75
Parameters
Section titled “Parameters”parentOrParents
Section titled “parentOrParents”Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”BaseSelector.parent
prn(
prn,mode?):UnionCursorSelector<TItem>
Defined in: runtime/selector.ts:120
Parameters
Section titled “Parameters”string | string[]
"append" | "replace"
Returns
Section titled “Returns”UnionCursorSelector<TItem>
search()
Section titled “search()”search(
idx,query):this
Defined in: runtime/selector.ts:76
Parameters
Section titled “Parameters”Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”BaseSelector.search
state()
Section titled “state()”state(
state):this
Defined in: runtime/selector.ts:77
Parameters
Section titled “Parameters”string | string[]
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”BaseSelector.state
template()
Section titled “template()”template(
template):UnionCursorSelector<TItem>
Defined in: runtime/selector.ts:121
Parameters
Section titled “Parameters”template
Section titled “template”string
Returns
Section titled “Returns”UnionCursorSelector<TItem>