API Docs for:
Show:

plugin_rest_dbconn Class

Module: plugins_rest
Parent Module: com_dbconn_rest

REST plugin that provides database connection functions through the following REST API:

POST requests

  1. dbconn/test

dbconn/test

Test a connection to a database.

Example of the body of the request:

{ "host": "localhost", "port": "1433", "type": "mssql:7_3_A", "user": "testuser", "pass": "testpass", "name": "test" }


Item Index

Methods

setCompDbConn

(
  • cp
)

Set dbconn architect component used by dbconn functions.

Parameters:

  • cp Object

    The dbconn architect component.

setCompUtil

(
  • comp
)

Sets the utility architect component.

Parameters:

  • comp Object

    The utility architect component.

setLogger

(
  • log
)
static

Set the logger to be used.

Parameters:

  • log Object

    The logger object. It must have at least three methods: info, warn and error as console object.

test

(
  • req
  • res
  • next
)

Test a database connections with the following REST API:

test

Parameters:

  • req Object

    The client request.

  • res Object

    The client response.

  • next Function

    Function to run the next handler in the chain.

Properties

compDbConn

Object private

The dbconn architect component used for dbconn functions.

compUtil

Object private

The utility architect component.

IDLOG

String private final

The module identifier used by the logger.

Default: [plugins_rest/dbconn]

logger

Object private

The logger. It must have at least three methods: info, warn and error.

Default: console

post

Array

REST API to be requested using HTTP GET request.

Sub-properties:

  • connection Object

    parameters