datalist

Description
POST - Ajax route use by the datalist

Methods


start( data )

Description
Called at route start
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

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 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

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 string 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 string Result of the datatable query as raw data
preparedData string Post processed data of datatable query results. This is the data sent as response