Methods

Class/Module Index [+]

Quicksearch

Sequel::DataObjects::Dataset

Dataset class for Sequel::DataObjects::Database objects.

Constants

DatasetClass

Public Instance Methods

fetch_rows(sql) click to toggle source

Execute the SQL on the database and yield the rows as hashes with symbol keys.

# File lib/sequel/adapters/do.rb, line 155
def fetch_rows(sql)
  execute(sql) do |reader|
    cols = @columns = reader.fields.map{|f| output_identifier(f)}
    while(reader.next!) do
      h = {}
      cols.zip(reader.values).each{|k, v| h[k] = v}
      yield h
    end
  end
  self
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.