The @akera/web web handler instance.
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 record(s).
PUT /:db/:table/ Receives the record(s) to be updated in body and primary key values in route path and returns the updated record.
DELETE /:db/:table/* Receives the record(s) to be deleted in body and primary key values in route path 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.
Flag to completelly load all table information (fields, indexes).
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.
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.
akera.io data access handler implementation.