Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IDataAccess

This is a typical data access CRUD interface that is to be implemented by any data access provider.

Hierarchy

  • IDataAccess

Implemented by

Index

Methods

doDelete

  • doDelete(broker: string, req: express.Request, res: express.Response): Promise<void>
  • Delete a single record from the database table, primary key and fields values available through query params in request.

    Parameters

    • broker: string

      The broker alias to connect to.

    • req: express.Request

      The Express request object, the way route/query params are used depends on the implementation.

    • res: express.Response

      The Express response object, the function should not throw any error but send the error message in response.

    Returns Promise<void>

doDeleteByRowid

  • doDeleteByRowid(broker: string, req: express.Request, res: express.Response): Promise<void>
  • Delete a single record from the database table, record identifier (rowid) and fields values available through query params in request.

    Parameters

    • broker: string

      The broker alias to connect to.

    • req: express.Request

      The Express request object, the way route/query params are used depends on the implementation.

    • res: express.Response

      The Express response object, the function should not throw any error but send the error message in response.

    Returns Promise<void>

doInsert

  • doInsert(broker: string, req: express.Request, res: express.Response): Promise<void>
  • Insert a single record into the database table, fields values (including the primary key) available through query params in request.

    Parameters

    • broker: string

      The broker alias to connect to.

    • req: express.Request

      The Express request object, the way route/query params are used depends on the implementation.

    • res: express.Response

      The Express response object, the function should not throw any error but send the error message in response.

    Returns Promise<void>

doSelect

  • doSelect(broker: string, req: express.Request, res: express.Response): Promise<void>
  • Select multiple records from one database table, filter, sort and fields selection available through query params in request.

    Parameters

    • broker: string

      The broker alias to connect to.

    • req: express.Request

      The Express request object, the way route/query params are used depends on the implementation.

    • res: express.Response

      The Express response object, the function should not throw any error but send the error message in response.

    Returns Promise<void>

doSelectCount

  • doSelectCount(broker: string, req: express.Request, res: express.Response): Promise<void>
  • Select the total number of records from one database table, filter selection available through query params in request.

    Parameters

    • broker: string

      The broker alias to connect to.

    • req: express.Request

      The Express request object, the way route/query params are used depends on the implementation.

    • res: express.Response

      The Express response object, the function should not throw any error but send the error message in response.

    Returns Promise<void>

doSelectRecord

  • doSelectRecord(broker: string, req: express.Request, res: express.Response): Promise<void>
  • Select a single record from the database table, primary key and fields selection available through query params in request.

    Parameters

    • broker: string

      The broker alias to connect to.

    • req: express.Request

      The Express request object, the way route/query params are used depends on the implementation.

    • res: express.Response

      The Express response object, the function should not throw any error but send the error message in response.

    Returns Promise<void>

doUpdate

  • doUpdate(broker: string, req: express.Request, res: express.Response): Promise<void>
  • Update a single record from the database table, primary key and fields values available through query params in request.

    Parameters

    • broker: string

      The broker alias to connect to.

    • req: express.Request

      The Express request object, the way route/query params are used depends on the implementation.

    • res: express.Response

      The Express response object, the function should not throw any error but send the error message in response.

    Returns Promise<void>

doUpdateByRowid

  • doUpdateByRowid(broker: string, req: express.Request, res: express.Response): Promise<void>
  • Update a single record from the database table, record identifier (rowid) and fields values available through query params in request.

    Parameters

    • broker: string

      The broker alias to connect to.

    • req: express.Request

      The Express request object, the way route/query params are used depends on the implementation.

    • res: express.Response

      The Express response object, the function should not throw any error but send the error message in response.

    Returns Promise<void>