Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AkeraRestCrud

The implementation of the akera.io data access CRUD middleware.

Hierarchy

  • AkeraRestCrud

Index

Constructors

Accessors

Methods

Constructors

constructor

  • Parameters

    • webApp: AkeraWeb

      The @akera/web instance holding the application server(s) information.

    Returns AkeraRestCrud

Accessors

webApp

  • get webApp(): AkeraWeb
  • Returns the @akera/web instance holding the application server(s) information.

    This is used by various data access handlers to establish connections to the application server.

    Returns AkeraWeb

Methods

endConnection

  • endConnection(connection: IConnection, broker: string): Promise<void>
  • Signal the @akera/web instance that a connection is not needed.

    Parameters

    • connection: IConnection

      The connection that is not needed anymore.

    • broker: string

      The broker on which the connection is established.

    Returns Promise<void>

getConnection

  • getConnection(broker: string): Promise<IConnection>
  • Establish a connection to one application server.

    Parameters

    • broker: string

      The broker alias to connect to, the connection is managed by the @akera/web instance.

    Returns Promise<IConnection>

init

  • init(): express.Router
  • Returns the middleware that can be used to mount the akera.io CRUD interface.

    Returns express.Router

jsdo

  • jsdo(asDataset?: boolean, sqlSafe?: boolean): express.Router
  • Returns the middleware that can be used to mount the JSDO CRUD interface.

    Parameters

    • Default value asDataset: boolean = true

      If true data will be passed using a dataset structure, this is needed if before-image is required, if false data is passed as temp-table structure.

    • Default value sqlSafe: boolean = false

      If true names of table and fields are made SQL safe.

    Returns express.Router