Class Index | File Index

Classes


Class moose.adapters.client.Client

Manages mysql connections. This class manages the creation of a connection pool, and is the class that retrieves/creates connections to be used my moose.
Defined in: mysql.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
Closes all connections.
 
getConnection(forceClose, String)
Retrieces a connection from the connection pool.
 
query(sql, database)
Executes a query with the given sql and database.
 
transaction(database)
Retrieves a transaction query to perform a transaction on.
Class Detail
moose.adapters.client.Client()
Method Detail
{comb.Promise} close()
Closes all connections.
Returns:
{comb.Promise} called back once all queries are done, or calls errback if an error occurs.

{Query} getConnection(forceClose, String)
Retrieces a connection from the connection pool.
Parameters:
{boolean} forceClose Optional, Default: false
whether or not to close the connection after the query is done. this is typically not needed.
String Optional
[database] the name of the database to connection to.
Returns:
{Query} the query object to perform queries on.

{comb.Promise} query(sql, database)
Executes a query with the given sql and database.
Parameters:
{String} sql
the sql to execute
{String} database Optional
the name of the database to execute the query on.
Returns:
{comb.Promise} a promise that is called back with the results.

transaction(database)
Retrieves a transaction query to perform a transaction on.
Parameters:
{String} database
the name of the database to perform the transaction on.

Documentation generated by JsDoc Toolkit 2.4.0 on Sat Jun 11 2011 03:16:39 GMT-0500 (CDT)