Class Index | File Index

## Classes

- _Association
- _global_
- Dataset
- ManyToMany
- ManyToOne
- MayToOne
- Migrations
- Model
- moose
- moose.adapters
- moose.adapters.client.Client
- moose.adapters.client.ConnectionPool
- moose.adapters.client.mysql.ConnectionPool
- moose.adapters.client.mysql.Query
- moose.adapters.client.mysql.TransactionQuery
- moose.adapters.mysql
- moose.adapters.mysql.types
- moose.plugins
- moose.plugins.AssociationPlugin
- moose.plugins.CachePlugin
- moose.plugins.QueryPlugin
- moose.plugins.TimeStampPlugin
- moose.Table
- OneToMany
- SQL
- Type

# Class moose.adapters.client.ConnectionPool

Extends comb.collections.Pool.
Base class for all connection pools
Defined in: ConnectionPool.js.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| moose.adapters.client.ConnectionPool()

Method Summary
Method Attributes | Method Name and Description
--- | ---
| closeConnection(conn) Override to implement close connection functionality;
| createConnection() Override to create connections to insert into this ConnectionPool.
| endAll() Override to implement the closing of all connections.
| getConnection() Performs a query on one of the connection in this Pool.
| removeConnection(conn) Removes a connection from the pool.
| returnConnection(connection) Return a connection to the pool.
| returnObject(connection) Override comb.collections.Pool to allow async validation to allow pools to do any calls to reset a connection if it needs to be done.
| validate(connection) Override to provide any additional validation.

Class Detail
moose.adapters.client.ConnectionPool()
Method Detail
{comb.Promise} closeConnection(conn)
Override to implement close connection functionality;

Parameters:
{*} conn
  the connection to close;

Returns:
  {comb.Promise} called back when the connection is closed.

createConnection()
Override to create connections to insert into this ConnectionPool.

{comb.Promise} endAll()
Override to implement the closing of all connections.

Returns:
  {comb.Promise} called when all connections are closed.

{comb.Promise} getConnection()
Performs a query on one of the connection in this Pool.

Returns:
  {comb.Promise} A promise to called back with a connection.

removeConnection(conn)
Removes a connection from the pool.

Parameters:
conn

{*} returnConnection(connection)
Return a connection to the pool.

Parameters:
{*} connection
  the connection to return.

Returns:
  {*} an adapter specific connection.

returnObject(connection)
Override comb.collections.Pool to allow async validation to allow pools to do any calls to reset a connection if it needs to be done.

Parameters:
{*} connection
  the connection to return.

{comb.Promise} validate(connection)
Override to provide any additional validation. By default the promise is called back with true.

Parameters:
{*} connection
  the conneciton to validate.

Returns:
  {comb.Promise} called back with a valid or invalid state.

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