Class: ActiveRecord::ConnectionAdapters::SQLiteAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/arel_rails2_hacks.rb

Overview

FIXME: Shouldn’t use select_rows anymore

Instance Method Summary collapse

Instance Method Details

#select_rows(sql, name = nil) ⇒ Object



44
45
46
47
48
# File 'lib/arel_rails2_hacks.rb', line 44

def select_rows(sql, name = nil)
  execute(sql, name).map do |row|
    row.keys.select{|key| key.is_a? Integer}.sort.map{|key| row[key]}
  end
end