Method: ActiveRecord::ConnectionAdapters::PostgreSQLAdapter#query

Defined in:
lib/active_record/connection_adapters/postgresql_adapter.rb

#query(sql, name = nil) ⇒ Object

Queries the database and returns the results in an Array-like object



630
631
632
633
634
# File 'lib/active_record/connection_adapters/postgresql_adapter.rb', line 630

def query(sql, name = nil) #:nodoc:
  log(sql, name) do
    result_as_array @connection.async_exec(sql)
  end
end