Class moose.adapters.client.mysql.Query
MySQL Client wrapper to standardize queries.
NOTE this class is not publicly exposed, but returned from calling getConnection on moose.getConnection
Defined in: mysql.js.
Constructor Attributes | Constructor Name and Description |
---|---|
moose.adapters.client.mysql.Query(pool, forceClose=false, database)
|
Field Attributes | Field Name and Description |
---|---|
the name of the database the query is currently using.
|
Method Attributes | Method Name and Description |
---|---|
query(query)
Queries the database.
|
Class Detail
moose.adapters.client.mysql.Query(pool, forceClose=false, database)
- Parameters:
- {moose.adapters.mysql.ConnectionPool} pool
- the pool to retrieve connections from.
- {Boolean} forceClose=false
- whether or not to force close the connection
- {String} database Optional
- the database to connect to when querying.
Field Detail
{String}
database
the name of the database the query is currently using.
Method Detail
{comb.Promise}
query(query)
Queries the database.
- Parameters:
- {String} query
- query to perform
- Returns:
- {comb.Promise} promise that is called back with the results, or error backs with an error.