class Sequel::OpenBase::Dataset

  1. lib/sequel/adapters/openbase.rb
Parent: OpenBase

Methods

Public Instance

  1. fetch_rows

Constants

DatasetClass = self  
SELECT_CLAUSE_METHODS = clause_methods(:select, %w'select distinct columns from join where group having compounds order limit')  

Public Instance methods

fetch_rows (sql)
[show source]
# File lib/sequel/adapters/openbase.rb, line 36
def fetch_rows(sql)
  execute(sql) do |result|
    begin
      @columns = result.column_infos.map{|c| output_identifier(c.name)}
      result.each do |r|
        row = {}
        r.each_with_index {|v, i| row[@columns[i]] = v}
        yield row
      end
    ensure
      # result.close
    end
  end
  self
end