def connect(options = {})
      return @pool = options[:pool] if options[:pool]
      options   = options.dup
      timeout   = options.delete(:timeout) || 5
      pool_size = options.delete(:pool_size) || 1
      @pool     = Squirm::Pool.new(timeout)
      pool_size.times do
        conn = PGconn.open(options)
        yield conn if block_given?
        @pool.checkin conn
      end
    end
def connect(options = {})
      return @pool = options[:pool] if options[:pool]
      options   = options.dup
      timeout   = options.delete(:timeout) || 5
      pool_size = options.delete(:pool_size) || 1
      @pool     = Squirm::Pool.new(timeout)
      pool_size.times do
        conn = PGconn.open(options)
        yield conn if block_given?
        @pool.checkin conn
      end
    end
Establishes a connection pool.
 @param [Hash] options The connection options
 @option options [String] :pool Use the given pool rather than Squirm's.
 @option options [Fixnum] :timeout The pool timeout.
 @option options [Fixnum] :pool_size The pool size.