protected function push(Statement $statement)
    {
        $maxConnections = $this->pool->getConnectionLimit();

        if ($this->statements->count() > ($maxConnections / 10)) {
            return;
        }

        if ($maxConnections === $this->pool->getConnectionCount() && $this->pool->getIdleConnectionCount() === 0) {
            return;
        }

        $this->statements->push($statement);
    }
protected function push(Statement $statement)
    {
        $maxConnections = $this->pool->getConnectionLimit();

        if ($this->statements->count() > ($maxConnections / 10)) {
            return;
        }

        if ($maxConnections === $this->pool->getConnectionCount() && $this->pool->getIdleConnectionCount() === 0) {
            return;
        }

        $this->statements->push($statement);
    }
protected function push ( Statement $ statement ) { $ maxConnections = $ this -> pool -> getConnectionLimit ( ) ; if ( $ this -> statements -> count ( ) > ( $ maxConnections / 10 ) ) { return ; } if ( $ maxConnections === $ this -> pool -> getConnectionCount ( ) && $ this -> pool -> getIdleConnectionCount ( ) === 0 ) { return ; } $ this -> statements -> push ( $ statement ) ; }
Only retains statements if less than 10% of the pool is consumed by this statement and the pool has
available connections.

@param Statement $statement
Only retains statements if less than 10% of the pool is consumed by this statement and the pool has available connections .