Class | Sequel::Oracle::Dataset
In: | lib/sequel/adapters/oracle.rb
Parent: | Sequel::Dataset

### Methods

fetch_rows

### Included Modules

DatasetMethods

### Public Instance methods

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

[Source]

         # File lib/sequel/adapters/oracle.rb, line 107
    107:       def fetch_rows(sql, &block)
    108:         execute(sql) do |cursor|
    109:           begin
    110:             @columns = cursor.get_col_names.map{|c| output_identifier(c)}
    111:             while r = cursor.fetch
    112:               row = {}
    113:               r.each_with_index {|v, i| row[@columns[i]] = v unless @columns[i] == :raw_rnum_}
    114:               yield row
    115:             end
    116:           ensure
    117:             cursor.close
    118:           end
    119:         end
    120:         self
    121:       end

[Validate]