Methods

Class/Module Index [+]

Quicksearch

Sequel::Informix::Dataset

Constants

DatasetClass

Public Instance Methods

fetch_rows(sql) click to toggle source
# File lib/sequel/adapters/informix.rb, line 39
def fetch_rows(sql)
  execute(sql) do |cursor|
    begin
      col_map = nil
      cursor.open.each_hash do |h|
        unless col_map
          col_map = {}
          @columns = h.keys.map{|k| col_map[k] = output_identifier(k)}
        end
        h2 = {}
        h.each{|k,v| h2[col_map[k]||k] = v}
        yield h2
      end
    ensure
      cursor.respond_to?(:free) ? cursor.free : cursor.drop
    end
  end
  self
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.