Methods
-
start( data )
-
Description
Called to search entity results paginated and / or filtered. This route is used by ajax selectParameters
Name Type Description dataobject Name Type Attributes Default Description reqobject Request - See expressjs definition resobject Response - See expressjs definition transactionobject <optional> Database transaction. undefined by default, provide your own when necessary searchstring The search filter wrapped in '%' char. If no filter is provided `data.search` will equals to '%%' searchFieldArray.<string> The field on which the search filter is to be applied limitnumber SELECT_PAGE_SIZE Limit the number of results. Defaults to `SELECT_PAGE_SIZE` global offsetnumber 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 dataobject Name Type Attributes Description reqobject Request - See expressjs definition resobject Response - See expressjs definition transactionobject <optional> Database transaction. undefined by default, provide your own when necessary queryobject Query object that will be used in Sequelize query, customizable Details
-
beforeResponse( data )
-
Description
Called before json responseParameters
Name Type Description dataobject Name Type Attributes Default Description reqobject Request - See expressjs definition resobject Response - See expressjs definition transactionobject <optional> Database transaction. undefined by default, provide your own when necessary searchstring The search filter wrapped in '%' char. If no filter is provided `data.search` will equals to '%%' searchFieldArray.<string> The field on which the search filter is to be applied limitnumber SELECT_PAGE_SIZE Limit the number of results. Defaults to `SELECT_PAGE_SIZE` global offsetnumber The offset of search results. Equals to page number * `data.limit` resultsobject Search result sent to response Details