Class | Sequel::ODBC::Dataset
In: | lib/sequel/adapters/odbc.rb
Parent: | Sequel::Dataset

### Methods

fetch_rows

### Constants

BOOL_TRUE | = | '1'.freeze
BOOL_FALSE | = | '0'.freeze
ODBC_DATE_FORMAT | = | "{d '%Y-%m-%d'}".freeze
TIMESTAMP_FORMAT | = | "{ts '%Y-%m-%d %H:%M:%S'}".freeze

### Public Instance methods

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

[Source]

         # File lib/sequel/adapters/odbc.rb, line 90
     90:       def fetch_rows(sql)
     91:         execute(sql) do |s|
     92:           i = -1
     93:           cols = s.columns(true).map{|c| [output_identifier(c.name), i+=1]}
     94:           @columns = cols.map{|c| c.at(0)}
     95:           if rows = s.fetch_all
     96:             rows.each do |row|
     97:               hash = {}
     98:               cols.each{|n,i| hash[n] = convert_odbc_value(row[i])}
     99:               yield hash
    100:             end
    101:           end
    102:         end
    103:         self
    104:       end

[Validate]