instance method select_rows

Ruby on Rails 4.2.9

Since v4.2.9 Last seen in v4.2.9

Signature

select_rows(sql, name = nil, binds = [])

Executes a SELECT query and returns an array of rows. Each row is an array of field values.

Parameters

sql req
name opt = nil
binds opt = []
Source
# File activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb, line 69
        def select_rows(sql, name = nil, binds = [])
          execute_and_clear(sql, name, binds) do |result|
            result.values
          end
        end

Defined in activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb line 69 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::ConnectionAdapters::PostgreSQL::DatabaseStatements

Type at least 2 characters to search.

↑↓ navigate · open · esc close