If before image information is not needed asDataset
option can be set to false
in which case the data will be serialized in a simple temp-table format.
The @akera/web
web handler instance.
If set to true data will be serialized using a dataset format.
If set to true the table/field names will be made SQL safe
.
Returns the actual data access handler instance that will handle basic CRUD operations.
Returns the @akera/web
instance used by the data access handler.
Log an error message and optionally pipe it into the Response.
The error object or message string.
The Response instance to pipe the error message.
The HTTP status code to use.
Log a message back to the parrent @akera/web
instance.
The log message
The log level
Returns a data access middleware that is either set to work with a specific broker or expect the broker alias to be sent as route parameter.
This will mount the following routes:
GET
/$meta Return the catalog for all connected databases.
GET
/$meta/:db Return the catalog for just one database.
GET
/$meta/:db/:table Return the catalog for just one database table.
GET
/:db/:table/count Return the select count for one table (optional filter).
GET
/:db/:table Return the select records for one table (optional filter, fields, sort, paging).
GET
/:db/:table/ Return the one record select using primary key values (rest path parameter).
POST
/:db/:table Receives the records to be inserted in body and returns the new records.
PUT
/:db/:table Receives the record(s) to be updated in body and returns the updated records.
DELETE
/:db/:table* Receives the record(s) to be deleted in body and returns the number of deleted records.
The broker name.
Return the catalog
- the meta data information for connected databases of
any application server (broker).
The broker name.
The database name to load the catalog for, if not set all databases information are returned.
The table name if only one table information is needed, if not set all tables info are returned.
Return an SQL safe
name, reserved characters are replaced.
The table/field name to make SQL safe
.
Returns the middleware that can be mounted on an express route.
If there is a single application server configured all requests
on the route's root will be dispatched to that broker.
When multiple application servers (different alias) are present in
configuration then for each alias entry a separate 'sub-route' will be
created and all requests on those routes will be dispatched to the
respective application server. Requests made on route's root will be
rejected with a 405 Method Not Allowed
, those for a sub-route that
doesn't match the name of any application server alias will be rejected
with 404 Broker not found
.
The JSDO implementation of the data access handler.
This will support basic CRUD operations as exposed in a JSDO catalog for
business entities
.