Skip to main content
server.ProjectedQuery A query whose output has been projected, before an order is defined.

Type parameters

Hierarchy

Methods

filter

▸ filter(predicate): ProjectedQuery<TableInfo, Fields> Filter the projected query’s output. The predicate still evaluates the original document, including properties the projection omits, so a filter means exactly what it means on an unprojected query.

Parameters

Returns

ProjectedQuery<TableInfo, Fields>

Inherited from

ProjectedOrderedQuery.filter

paginate

▸ paginate(paginationOpts): Promise<PaginationResult<SelectedDocument<DocumentByInfo<TableInfo>, Fields>>> Load a page of projected results.

Parameters

Returns

Promise<PaginationResult<SelectedDocument<DocumentByInfo<TableInfo>, Fields>>>

Inherited from

ProjectedOrderedQuery.paginate

collect

▸ collect(): Promise<SelectedDocument<DocumentByInfo<TableInfo>, Fields>[]> Return all of the projected results as an array.

Returns

Promise<SelectedDocument<DocumentByInfo<TableInfo>, Fields>[]>

Inherited from

ProjectedOrderedQuery.collect

take

▸ take(n): Promise<SelectedDocument<DocumentByInfo<TableInfo>, Fields>[]> Return the first n projected results.

Parameters

Returns

Promise<SelectedDocument<DocumentByInfo<TableInfo>, Fields>[]>

Inherited from

ProjectedOrderedQuery.take

first

▸ first(): Promise<null | SelectedDocument<DocumentByInfo<TableInfo>, Fields>> Return the first projected result, or null.

Returns

Promise<null | SelectedDocument<DocumentByInfo<TableInfo>, Fields>>

Inherited from

ProjectedOrderedQuery.first

unique

▸ unique(): Promise<null | SelectedDocument<DocumentByInfo<TableInfo>, Fields>> Return the single projected result, or null; throw if there are more.

Returns

Promise<null | SelectedDocument<DocumentByInfo<TableInfo>, Fields>>

Inherited from

ProjectedOrderedQuery.unique

order

▸ order(order): ProjectedOrderedQuery<TableInfo, Fields> Define the order of the projected query’s output.

Parameters

Returns

ProjectedOrderedQuery<TableInfo, Fields>

[asyncIterator]

▸ [asyncIterator](): AsyncIterator<SelectedDocument<DocumentByInfo<TableInfo>, Fields>, any, undefined>

Returns

AsyncIterator<SelectedDocument<DocumentByInfo<TableInfo>, Fields>, any, undefined>

Inherited from

ProjectedOrderedQuery.[asyncIterator]