The Objection.js model.
Additional options for the controller.
Optional
searchColumns to search in by default.
Deletes records by ID(s).
The ID or IDs of records to delete.
Optional
queryBuilder: anyOptional query builder instance.
The promise of the resulting data.
Deletes records based on where clause.
Criteria for delete operation.
Optional
queryBuilder: anyOptional query builder instance.
The promise of the resulting data.
Protected
errorFormats an error response object.
Optional
errorObj: anyThe error object or message.
Optional
status: number = 500The HTTP status code.
Optional
code: number = 0Additional status code.
The error response object.
Inserts one or multiple records.
The data to insert.
Optional
queryBuilder: anyOptional query builder instance.
The promise of the resulting data.
Lists records based on search criteria.
The search criteria.
Optional
queryBuilder: anyOptional query builder instance.
The promise of the resulting data.
Selects a record by its ID.
The ID or IDs to select.
Optional
queryBuilder: anyOptional query builder instance.
The promise of the resulting data.
Selects one record based on given criteria without considering active state.
Criteria to find the record.
Optional
queryBuilder: anyOptional query builder instance.
The promise of the resulting data.
Selects one active record based on given criteria.
Criteria to find the record.
Optional
queryBuilder: anyOptional query builder instance.
The promise of the resulting data.
Protected
successFormats a successful response object.
Optional
data: anyThe data to return in the response.
Optional
status: number = 200The HTTP status code.
Optional
code: number = 0Additional status code.
The success response object.
Protected
successMerges additional data into a successful response object.
Optional
data: anyThe data to return in the response.
Optional
status: number = 200The HTTP status code.
Optional
code: number = 0Additional status code.
The merged success response object.
Updates records using an upsert operation.
The data for upsert.
Optional
queryBuilder: anyOptional query builder instance.
The promise of the resulting data.
Controller
Description
A controller class for handling database queries using Objection.js models.