subdatalist

Description
POST - Ajax route use by the datalist in tab (like has many tab)

Methods


beforeDatatableQuery( data )

Description
Called before datatable query build and execution
Parameters
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
speWhere string <optional>
Specific `where` case added to datatable's request
speInclude string <optional>
Specific elements to `include` to datatable's request. An array of field path compatible with `helpers.model_builder.getIncludeFromFields()` is expected
tableInfo object Table information from client

afterDatatableQuery( data )

Description
Called after datatable query execution, before post processing of results
Parameters
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
speWhere object <optional>
Specific `where` case added to datatable's request
speInclude Array.<string> <optional>
Specific elements to `include` to datatable's request. An array of field path compatible with `helpers.model_builder.getIncludeFromFields()` is expected
tableInfo object Table information from client
rawData object Result of the datatable query as raw data

beforeResponse( data )

Description
Called before json response
Parameters
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
speWhere object <optional>
Specific `where` case added to datatable's request
speInclude Array.<string> <optional>
Specific elements to `include` to datatable's request. An array of field path compatible with `helpers.model_builder.getIncludeFromFields()` is expected
tableInfo object Table information from client
rawData object Result of the datatable query as raw data
preparedData object Post processed data of datatable query results. This is the data sent as response