Class | Sequel::Informix::Dataset
In: | lib/sequel/adapters/informix.rb
Parent: | Sequel::Dataset

### Methods

fetch_rows

### Included Modules

DatasetMethods

### Constants

DatasetClass | = | self

### Public Instance methods

fetch_rows(sql) {|h2| ...}

[Source]

        # File lib/sequel/adapters/informix.rb, line 39
    39:       def fetch_rows(sql)
    40:         execute(sql) do |cursor|
    41:           begin
    42:             col_map = nil
    43:             cursor.open.each_hash do |h|
    44:               unless col_map
    45:                 col_map = {}
    46:                 @columns = h.keys.map{|k| col_map[k] = output_identifier(k)}
    47:               end
    48:               h2 = {}
    49:               h.each{|k,v| h2[col_map[k]||k] = v}
    50:               yield h2
    51:             end
    52:           ensure
    53:             cursor.respond_to?(:free) ? cursor.free : cursor.drop
    54:           end
    55:         end
    56:         self
    57:       end

[Validate]