| Class | Sequel::Informix::Dataset |
| In: |
lib/sequel/adapters/informix.rb
|
| Parent: | Sequel::Dataset |
| SELECT_CLAUSE_METHODS | = | clause_methods(:select, %w'limit distinct columns from join where having group compounds order') |
# File lib/sequel/adapters/informix.rb, line 42
42: def fetch_rows(sql, &block)
43: execute(sql) do |cursor|
44: begin
45: col_map = nil
46: cursor.open.each_hash do |h|
47: unless col_map
48: col_map = {}
49: @columns = h.keys.map{|k| col_map[k] = output_identifier(k)}
50: end
51: h2 = {}
52: h.each{|k,v| h2[col_map[k]||k] = v}
53: yield h2
54: end
55: ensure
56: cursor.drop
57: end
58: end
59: self
60: end