Adapter Namespace


Classes


MongoDB

constructor

With the help of this method you can create a new instance of MongoDB.

Signature

constructor(String name, Object config) : String, Object

Parameters

  • name
    • Name of the connection
    • Type: String
  • config
    • Config of the connection
    • Type: Object

Returns

  • String
    • Name of the connection
  • Object
    • Config of the connection

configure

Establish the connection and do some configurations for it.

Signature

configure(Function callback) : void

Parameters

  • callback
    • Function to call on finish
    • Type: Function

close

Close the connection(s) which where established.

Signature

close(Function callback) : void

Parameters

  • callback
    • Function to call on finish
    • Type: Function

create

Management method - will create the database for the configured connection.

Signature

create(Function callback) : void

Parameters

  • callback
    • Function to call on finish
    • Type: Function

drop

Management method - will drop the database for the configured connection.

Signature

drop(Function callback) : void

Parameters

  • callback
    • Function to call on finish
    • Type: Function

migrate

Management method - will run all migrations for the configured connection.

Signature

migrate(Function callback) : void

Parameters

  • callback
    • Function to call on finish
    • Type: Function

fill

Management method - will run all migrations for the configured connection.

Signature

fill(Function callback) : void

Parameters

  • callback
    • Function to call on finish
    • Type: Function

clear

Management method - will clear all data from all collections.

Signature

clear(Function callback) : void

Parameters

  • callback
    • Function to call on finish
    • Type: Function

purge

Management method - will remove all collections.

Signature

purge(Function callback) : void

Parameters

  • callback
    • Function to call on finish
    • Type: Function


MySQL

constructor

With the help of this method you can create a new instance of MySQL.

Signature

constructor(String name, Object config) : String, Object

Parameters

  • name
    • Name of the connection
    • Type: String
  • config
    • Config of the connection
    • Type: Object

Returns

  • String
    • Name of the connection
  • Object
    • Config of the connection

configure

Establish the connection and do some configurations for it.

Signature

configure(Function callback) : void

Parameters

  • callback
    • Function to call on finish
    • Type: Function

prepare

Prepare a connection to auto reconnect on close events.

Signature

prepare(Object connection) : void

Parameters

  • connection
    • Connection to prepare
    • Type: Object

close

Close the connection(s) which where established.

Signature

close(Function callback) : void

Parameters

  • callback
    • Function to call on finish
    • Type: Function

create

Management method - will create the database for the configured connection.

Signature

create(Function callback) : void

Parameters

  • callback
    • Function to call on finish
    • Type: Function

drop

Management method - will drop the database for the configured connection.

Signature

drop(Function callback) : void

Parameters

  • callback
    • Function to call on finish
    • Type: Function

migrate

Management method - will run all migrations for the configured connection.

Signature

migrate(Function callback) : void

Parameters

  • callback
    • Function to call on finish
    • Type: Function

fill

Management method - will run all migrations for the configured connection.

Signature

fill(Function callback) : void

Parameters

  • callback
    • Function to call on finish
    • Type: Function

clear

Management method - will clear all data from all tables.

Signature

clear(Function callback) : void

Parameters

  • callback
    • Function to call on finish
    • Type: Function

purge

Management method - will remove all tables.

Signature

purge(Function callback) : void

Parameters

  • callback
    • Function to call on finish
    • Type: Function