lib/ConnectionPool.js
function () {
            var ret = new Promise(), conn;
            if (this.count > this.__maxObjects) {
                this.__deferredQueue.enqueue(ret);
            } else {
                //todo override getObject to make async so creating a connetion can execute setup sql
                conn = this.getObject();
                if (!conn) {
                    //we need to deffer it
                    this.__deferredQueue.enqueue(ret);
                } else {
                    ret.callback(conn);
                }
            }
            if (this.count > this.__maxObjects && !conn) {
                ret.errback(new Error("Unexpected ConnectionPool error"));
            }
            return ret.promise();
        }
function () {
            var ret = new Promise(), conn;
            if (this.count > this.__maxObjects) {
                this.__deferredQueue.enqueue(ret);
            } else {
                //todo override getObject to make async so creating a connetion can execute setup sql
                conn = this.getObject();
                if (!conn) {
                    //we need to deffer it
                    this.__deferredQueue.enqueue(ret);
                } else {
                    ret.callback(conn);
                }
            }
            if (this.count > this.__maxObjects && !conn) {
                ret.errback(new Error("Unexpected ConnectionPool error"));
            }
            return ret.promise();
        }
function ( ) { var ret = new Promise ( ) , conn ; if ( this . count > this . __maxObjects ) { this . __deferredQueue . enqueue ( ret ) ; } else { //todo override getObject to make async so creating a connetion can execute setup sql conn = this . getObject ( ) ; if ( ! conn ) { //we need to deffer it this . __deferredQueue . enqueue ( ret ) ; } else { ret . callback ( conn ) ; } } if ( this . count > this . __maxObjects && ! conn ) { ret . errback ( new Error ( "Unexpected ConnectionPool error" ) ) ; } return ret . promise ( ) ; }
Performs a query on one of the connection in this Pool.

@return {comb.Promise} A promise to called back with a connection.
Performs a query on one of the connection in this Pool .