Public Instance methods
fetch_rows(sql)
[show source]
# File lib/sequel/adapters/odbc.rb 89 def fetch_rows(sql) 90 execute(sql) do |s| 91 i = -1 92 cols = s.columns(true).map{|c| [output_identifier(c.name), c.type, i+=1]} 93 columns = cols.map{|c| c[0]} 94 self.columns = columns 95 s.each do |row| 96 hash = {} 97 cols.each do |n,t,j| 98 v = row[j] 99 # We can assume v is not false, so this shouldn't convert false to nil. 100 hash[n] = (convert_odbc_value(v, t) if v) 101 end 102 yield hash 103 end 104 end 105 self 106 end