Paginator

Overview

When invoked, the paginate method returns a paginator object with the following properties and methods.

{
  next(): `<paginator>`,    
  previous(): `<paginator>`,  
  refresh(): `<paginator>`,   
  page: `int`,                
  results: `Array[<entity>]`,  
  size: `int`           
}

Properties

PropertyTypeDescription

page

int

Represents the current page number in the pagination sequence.

results

An array of entity objects present on the current page.

size

int

Indicates the count of entity objects in the current page.

Methods

None of these methods take arguments

MethodReturnDescription

next

paginator

Returns a new paginator instance, with the page property set to the next page (one ahead of the current page).

previous

paginator

Returns a new paginator instance, with the page property set to the previous page (one less than the current page).

refresh

paginator

Re-executes the current request and returns the updated paginator object with refreshed data.

Last updated