instance method select_rows

Ruby on Rails 5.0.7.2

Since v5.0.7.2 Last seen in v5.0.7.2

Signature

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

Returns an array of arrays containing the field values. Order is the same as that returned by columns.

Parameters

sql req
name opt = nil
binds opt = []
Source
# File activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb, line 18
        def select_rows(sql, name = nil, binds = [])
          select_result(sql, name, binds) do |result|
            @connection.next_result while @connection.more_results?
            result.to_a
          end
        end

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

Defined in ActiveRecord::ConnectionAdapters::MySQL::DatabaseStatements

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close