The JDSO data access handler.
Flag to use the dataset data structure format.
Flag to 'translate' table/field names to SQL safe
names.
Delete a single record from the database table, primary key and fields values available through query params in request.
The broker alias to connect to.
The Express request object, the way route/query params are used depends on the implementation.
The Express response object, the function should not throw any error but send the error message in response.
Delete a single record from the database table, record identifier (rowid) and fields values available through query params in request.
The broker alias to connect to.
The Express request object, the way route/query params are used depends on the implementation.
The Express response object, the function should not throw any error but send the error message in response.
Insert a single record into the database table, fields values (including the primary key) available through query params in request.
The broker alias to connect to.
The Express request object, the way route/query params are used depends on the implementation.
The Express response object, the function should not throw any error but send the error message in response.
Select multiple records from one database table, filter, sort and fields selection available through query params in request.
The broker alias to connect to.
The Express request object, the way route/query params are used depends on the implementation.
The Express response object, the function should not throw any error but send the error message in response.
Select the total number of records from one database table, filter selection available through query params in request.
The broker alias to connect to.
The Express request object, the way route/query params are used depends on the implementation.
The Express response object, the function should not throw any error but send the error message in response.
Select a single record from the database table, primary key and fields selection available through query params in request.
The broker alias to connect to.
The Express request object, the way route/query params are used depends on the implementation.
The Express response object, the function should not throw any error but send the error message in response.
Override of abstract implementation method. If 'rest' path parameters are present then a single record update is done using the primary key values sent through the path parameter.
Otherwise a 'save changes' operation is performed so not only updates but also new or deleted records are processed using the information from 'before-image'.
The broker name.
The express Request object.
The express Response object.
Update a single record from the database table, record identifier (rowid) and fields values available through query params in request.
The broker alias to connect to.
The Express request object, the way route/query params are used depends on the implementation.
The Express response object, the function should not throw any error but send the error message in response.
Signal the @akera/web
instance that a connection is not needed.
The connection that is not needed anymore.
The broker on which the connection is established.
Establish a connection to one application server.
The broker alias to connect to, the connection is managed by the @akera/web
instance.
Returns the records to be deleted from a given table.
If dataset structure is used records from before image with state [JSDOState.DELETED] are considered.
The table name (used for dataset structure).
The data structure (array for table, object for dataset).
Returns the records to be inserted into a given table.
If dataset structure is used records from current image with state [JSDOState.CREATED] are considered.
The table name (used for dataset structure).
The data structure (array for table, object for dataset).
Returns the primary key filter for a table using the primary key values passed
as rest
parameter in request. If the table does not have a primary key or not
all values for the fields part of the primary key index are not specified this
will be rejected with an error.
The table name.
The primary key values as string (path format, backslash separator).
Return a primary key
filter using values from the table record.
If the table does not have a primary key or not all fields of the
primary key have values set in the table record this will be rejected
with an error.
The table buffer.
The table record.
Make sure we have the request body parsed so we can use in case of requests that expects JSON body, a body parser is needed for this to work.
The express Request to read body information from.
Returns a table buffer instance from given connection or is rejected with an error if table is not found.
The API connection to use.
The express Request holding database and table information (path parameters).
Return the 'rest' path parameter from an express Request, if any.
The express Request.
Override of abstract implementation method to parse filter information according to the JSDO protocol (abl filter).
The express Request object used to parse filter information.
The API connection to run the select query on.
The table name to select records from.
The primary key filter from Request path/query string.
The JSDO does not support filter selection.
If the query should use pagination information from Request.
If the query should use sort information from Request.
Returns the records to be updated for a given table.
If dataset structure is used records from current image with state [JSDOState.UPDATED] are considered.
The table name (used for dataset structure).
The data structure (array for table, object for dataset).
Flag to remove any prodataset internal properties (state, id).
Writes the deleted records result response back.
Default implementation sends a JSON object with the deleted
property set.
If no record was found to be delete a 404 Record not found
error will be
returned.
The table buffer.
The number of records deleted.
The express Response to write to.
Writes the inserted records result response back.
The inserted records are sent back in the same way as for select, the format depends on whether the dataset format is used or not.
The table buffer.
The table records array of the insert query.
The express Response to write to.
Writes the select records result response back either using a dataset format or the default implementation.
The table buffer.
The table records array of the select query.
The express Response to write to.
Writes the select count response back.
JSDO implementation sends a JSON object with an response
object having
the numRecs
property set.
The table buffer.
The total number of records for the select query executed.
The express Response to write to.
Writes the selected record response back.
JSDO expects an array even if only one record is selected.
The table buffer.
The table records array of the select query, it should have at most one item.
The express Response to write to.
Writes the updated records result response back.
The updated records are sent back in the same way as for select, the format depends on whether the dataset format is used or not.
The table buffer.
The table records array of the update query.
The express Response to write to.
The JSDO implementation of the data access interface.