API - MysqlAdapter

Extends AbstractAdapter

The MysqlAdapter is the default adapter in this framework, this sets the queryBuilder object with the "universal-query" module which is a query builder for mysql.

Methods

This function will return the indexes on the selected table.

Parameters
Name Type Description
name String The table name to get the indexed from

Returns Promse: The promise with all the information.

This method will receive various information of the server.

Parameters
Name Type Description
name String The table name from which to return the data.

Returns Promise: The promise with the server information.

This function will be available for every object, this will clone the current object.

Returns Object: An exact copy of the current object

This method will execute a query on the server.

Parameters
Name Type Description
query Object The query object to execute.

Returns Promise: The promise with all the data returned from the server.

This is a private function to allow for config extending This method takes two parameters the first is the original config and the second will be appeneded to this one.

Parameters
Name Type Description
target Object The config object.
source Object The object to extend the config object.

Return the command chain to run behaviors.

Returns CommandChain: CommandChain object.

Use this function to acquire a variable from config.js

Parameters
Name Type Description
key String Key to specify the config to return

Returns Object: The requested config value.

Use this function to acquire the identifier object

Returns ObjectIdentifier: Identifier object.

This method will return an instance of the mysql connection, If there is a problem with the connection an error will be thrown.

Parameters
Name Type Description
name Object
config Object

Returns Promise: A resolved promise with the connection.

This is a alias of ObjectManager.getObject to use in the "this" context.

Parameters
Name Type Description
identifier String Identifier of the object to load
config Object|null Config to push to the object

Returns Promise: call ".then" to use the object when ready.

This function must return a query builder object, or sele when overridden.

Returns Undefined | :

This method will create the schema to use.

Parameters
Name Type Description
name String The name of the table to get the schema from.

Returns Promise: The promise containing the schema.

Every object called through getObject will go through this function. This will set the identifier and adds the behaviors (if any).

Parameters
Name Type Description
config Object Object with config values

Returns Promise: call ".then" to use the object when ready.

This is the handler which will try to mixin functions from another object.

Parameters
Name Type Description
object Object The object to mix into the current object.