Class: MySQLDatabaseConnection

MySQLDatabaseConnection

MySQL database connection.


new MySQLDatabaseConnection(connectionInfo)

Creates a new MySQL database connection.

Parameters:
Name Type Description
connectionInfo

The connection info to utilize for the connection.

Properties
Name Type Argument Default Description
host string <optional>
"localhost"

The host to connect to.

port number <optional>
3306

The port to connect to.

database string <optional>
"aquae"

The database to open with the connection.

username string <optional>
""

The username to supply with the connection.

password string <optional>
""

The password to supply with the connection.

Source:

Extends

Methods


close()

Closes an open MySQL database and returns a Promise.

Overrides:
Source:
Returns:
Type
Promise

close(callback)

Closes an open MySQL database and utilizes the supplied callback when complete.

Parameters:
Name Type Description
callback IRelationalDatabaseConnection~closeCallback

The node.js style callback to use in conjunction with the command.

Overrides:
Source:

connect()

Connects to a MySQL database and returns a Promise.

Overrides:
Source:
Returns:
Type
Promise

connect(connectionInfo)

Connects to a MySQL database with the supplied connection info and returns a Promise.

Parameters:
Name Type Description
connectionInfo

The connection info to utilize for the connection.

Properties
Name Type Argument Description
host string <optional>

The host to connect to.

port number <optional>

The port to connect to.

database string <optional>

The database to open with the connection.

username string <optional>

The username to supply with the connection.

password string <optional>

The password to supply with the connection.

Overrides:
Source:
Returns:
Type
Promise

connect(callback)

Connects to a MySQL database and utilizes the supplied callback when complete.

Parameters:
Name Type Description
callback IRelationalDatabaseConnection~connectCallback

The node.js style callback to use in conjunction with the connection.

Overrides:
Source:

connect(connectionInfo, callback)

Connects to a MySQL database with the supplied connection info and utilizes the supplied callback when complete.

Parameters:
Name Type Description
connectionInfo

The connection info to utilize for the connection.

Properties
Name Type Argument Description
host string <optional>

The host to connect to.

port number <optional>

The port to connect to.

database string <optional>

The database to open with the connection.

username string <optional>

The username to supply with the connection.

password string <optional>

The password to supply with the connection.

callback IRelationalDatabaseConnection~connectCallback

The node.js style callback to use in conjunction with the connection.

Overrides:
Source: