new SQLManager(connection, optionsopt)
Class representing an SQLDatabaseManager.
| Name | Type | Attributes | Default | Description | 
|---|---|---|---|---|
connection | 
            
            ConnectionData | The connection data for the SQL DB.  | 
        ||
options | 
            
            DatabaseManagerOptions | 
                
                    <optional> | 
            
            
                {} | The DatabaseManagerOptions.  | 
        
- Source:
 
Extends
Members
(protected) _qb :QueryBuilder
- QueryBuilder
 
- Source:
 
Methods
(async, abstract) add(type, data) → {Promise.<any>}
Add a new DatabaseObject.
| Name | Type | Description | 
|---|---|---|
type | 
            
            string | The type of DatabaseObject to add.  | 
        
data | 
            
            any | The raw data for the new DatabaseObject.  | 
        
- Overrides:
 - Source:
 
The new DatabaseObject (should not need to be saved).
- Type
 - Promise.<any>
 
(async, abstract) delete(object) → {Promise.<void>}
Delete a DatabaseObject.
| Name | Type | Description | 
|---|---|---|
object | 
            
            DatabaseObject | The DatabaseObject to delete.  | 
        
- Overrides:
 - Source:
 
- Type
 - Promise.<void>
 
(async, abstract) find(query) → {Promise.<Array.<any>>}
Execute a DatabaseQuery.
| Name | Type | Description | 
|---|---|---|
query | 
            
            DatabaseQuery | The DatabaseQuery to execute.  | 
        
- Overrides:
 - Source:
 
The raw data of the DatabaseObject(s).
- Type
 - Promise.<Array.<any>>
 
(async, abstract) get(query) → {Promise.<any>}
Execute a DatabaseQuery that can only return a single unique DataObject.
| Name | Type | Description | 
|---|---|---|
query | 
            
            DatabaseQuery | The DatabaseQuery to execute.  | 
        
- Overrides:
 - Source:
 
The raw data of the DatabaseObject.
- Type
 - Promise.<any>
 
newObject(type, data, isNewopt) → {DatabaseObject}
Create a new DatabaseObject.
| Name | Type | Attributes | Default | Description | 
|---|---|---|---|---|
type | 
            
            string | The type of DatabaseObject to create.  | 
        ||
data | 
            
            any | The data to initialize the DataObject with.  | 
        ||
isNew | 
            
            boolean | 
                
                    <optional> | 
            
            
                true | Whether or not the DatabaseObject should be treated as a new record.  | 
        
- Inherited From:
 - Source:
 
The new DatabaseObject.
- Type
 - DatabaseObject
 
newQuery(type) → {DatabaseQuery}
Start a DatabaseQuery.
| Name | Type | Description | 
|---|---|---|
type | 
            
            string | The type of DatabaseObject to query for.  | 
        
- Inherited From:
 - Source:
 
The new DatabaseQuery.
- Type
 - DatabaseQuery
 
(async, abstract) update(object) → {Promise.<any>}
Update a Database Object.
| Name | Type | Description | 
|---|---|---|
object | 
            
            DatabaseObject | The DatabaseObject to update.  | 
        
- Overrides:
 - Source:
 
The raw data of the DatabaseObject.
- Type
 - Promise.<any>