Constructor
new awSQL()
Methods
createInstance(hostname, username, password, optionsopt) → {Instance}
Creates a new instance (database connection)
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
hostname | String | localhost | Hostname where the database is located | |
username | String | Username to login with | ||
password | String | |||
options | InstanceOptions | <optional> |
Returns:
- Type:
- Instance
deleteInstance(identifier) → {true}
Deletes an instance (and closes any open connection)
Parameters:
| Name | Type | Description |
|---|---|---|
identifier | String | Identifier of the instance to delete |
Returns:
- Type:
- true
getInstance(identifieropt) → {Instance}
Returns an instance matching the given identifier Returns default (or first) instance if no identifier is given
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
identifier | String | <optional> | Identifier of the instance to get |
Returns:
- Type:
- Instance
listInstances() → {Array.<String>}
Returns a list of the identifiers of all instances
Returns:
- Type:
- Array.<String>