Skip to content

Instance Method

page(withIndex:size:)

Returns a single Page out of the complete result set.
func page(withIndex page: Int, size per: Int) -> EventLoopFuture<Page<Model>>

Parameters

page

The index of the page.

per

The size of the page.

Return Value

A single Page of the result set containing the requested items and page metadata.

Discussion

This method will first count() the result set, then request a subset of the results using range() and all().