Methods

Class/Module Index [+]

Quicksearch

Sequel::ODBC::Dataset

Public Instance Methods

fetch_rows(sql) click to toggle source
# File lib/sequel/adapters/odbc.rb, line 105
def fetch_rows(sql)
  execute(sql) do |s|
    i = -1
    cols = s.columns(true).map{|c| [output_identifier(c.name), i+=1]}
    columns = cols.map{|c| c.at(0)}
    @columns = columns
    if rows = s.fetch_all
      rows.each do |row|
        hash = {}
        cols.each{|n,i| hash[n] = convert_odbc_value(row[i])}
        yield hash
      end
    end
  end
  self
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.