Methods

Class/Module Index [+]

Quicksearch

Sequel::Amalgalite::Dataset

Dataset class for SQLite datasets that use the amalgalite driver.

Constants

DatasetClass

Public Instance Methods

fetch_rows(sql) click to toggle source

Yield a hash for each row in the dataset.

# File lib/sequel/adapters/amalgalite.rb, line 159
def fetch_rows(sql)
  execute(sql) do |stmt|
    @columns = cols = stmt.result_fields.map{|c| output_identifier(c)}
    col_count = cols.size
    stmt.each do |result|
      row = {}
      col_count.times{|i| row[cols[i]] = result[i]}
      yield row
    end
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.