Class | Sequel::ODBC::Dataset |
In: |
lib/sequel/adapters/odbc.rb
|
Parent: | Sequel::Dataset |
# File lib/sequel/adapters/odbc.rb, line 89 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: if rows = s.fetch_all 96: rows.each do |row| 97: hash = {} 98: cols.each{|n,t,j| hash[n] = convert_odbc_value(row[j], t)} 99: yield hash 100: end 101: end 102: end 103: self 104: end