Properties
.db: Sequelize
(Static) The Sequelize connection to the database specified by your chosen storage provider.
WARNING: Accessing this before the client has created the singleton instance will throw an error. To be safe, wait until
clientReady
before accessing the Database connection
- Source:
.db: Sequelize
The Sequelize connection to the database specified by your chosen storage provider
- Source:
Methods
(static) .instance(url?: string, debug?: boolean) → Database
As long as a Sequelize-using storage provider is being used, this will return the Database instance holding the Sequelize connection to the database.
Parameters are not needed and will be passed internally by
the framework when the Database singleton is created before
clientReady
is emitted.
WARNING: Accessing this before the client has created the singleton instance will throw an error. To be safe, wait until
clientReady
before accessing the Database connection
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
url |
|
<optional> |
The database connection url |
|
debug |
|
<optional> |
false
|
Whether or not to log Database debug info |
- Source:
.init() → Promise<void>
Authenticate the connection to the database. This is called internally by the framework
- Source: