Pagination uses ConstantsTrait
Pagination constants enumeration.
Provides standardized constant names for pagination parameters used across database queries, API responses, and data retrieval operations.
Tags
Table of Contents
Constants
- LIMIT : string = 'limit'
- The number of items to retrieve per page/request.
- MAX_LIMIT : string = 'maxLimit'
- The maximum allowed limit value.
- MIN_LIMIT : string = 'minLimit'
- The minimum allowed limit value.
- OFFSET : string = 'offset'
- The number of items to skip from the beginning of the result set.
- PAGE : string = 'page'
- The page number for page-based pagination.
Constants
LIMIT
The number of items to retrieve per page/request.
public
string
LIMIT
= 'limit'
Used to limit the result set size.
MAX_LIMIT
The maximum allowed limit value.
public
string
MAX_LIMIT
= 'maxLimit'
Prevents excessive resource consumption by capping the maximum number of items that can be requested at once.
MIN_LIMIT
The minimum allowed limit value.
public
string
MIN_LIMIT
= 'minLimit'
Ensures at least one item is requested when pagination is used.
OFFSET
The number of items to skip from the beginning of the result set.
public
string
OFFSET
= 'offset'
Used for pagination by specifying how many records to skip before starting to return results.
PAGE
The page number for page-based pagination.
public
string
PAGE
= 'page'
Alternative to offset-based pagination, typically starting from 1.