Methods
-
start( data )
-
Description
Called to search entity results paginated and / or filtered. This route is used by ajax selectParameters
Name Type Description data
object Name Type Attributes Default Description req
object Request - See expressjs definition res
object Response - See expressjs definition transaction
object <optional> Database transaction. undefined by default, provide your own when necessary search
string The search filter wrapped in '%' char. If no filter is provided `data.search` will equals to '%%' searchField
Array.<string> The field on which the search filter is to be applied limit
number SELECT_PAGE_SIZE Limit the number of results. Defaults to `SELECT_PAGE_SIZE` global offset
number The offset of search results. Equals to page number * `data.limit` Details
-
beforeQuery( data )
-
Description
Before the Sequelize query, usefull to customize default query behaviourParameters
Name Type Description data
object Name Type Attributes Description req
object Request - See expressjs definition res
object Response - See expressjs definition transaction
object <optional> Database transaction. undefined by default, provide your own when necessary query
object Query object that will be used in Sequelize query, customizable Details
-
beforeResponse( data )
-
Description
Called before json responseParameters
Name Type Description data
object Name Type Attributes Default Description req
object Request - See expressjs definition res
object Response - See expressjs definition transaction
object <optional> Database transaction. undefined by default, provide your own when necessary search
string The search filter wrapped in '%' char. If no filter is provided `data.search` will equals to '%%' searchField
Array.<string> The field on which the search filter is to be applied limit
number SELECT_PAGE_SIZE Limit the number of results. Defaults to `SELECT_PAGE_SIZE` global offset
number The offset of search results. Equals to page number * `data.limit` results
object Search result sent to response Details