Class: Sequel::Amalgalite::Dataset

Class | Sequel::Amalgalite::Dataset
In: | lib/sequel/adapters/amalgalite.rb
Parent: | Sequel::Dataset

Dataset class for SQLite datasets that use the amalgalite driver.

### Methods

fetch_rows

### Included Modules

::Sequel::SQLite::DatasetMethods

### Public Instance methods

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

Yield a hash for each row in the dataset.

[Source]

         # File lib/sequel/adapters/amalgalite.rb, line 151
    151:       def fetch_rows(sql)
    152:         execute(sql) do |stmt|
    153:           @columns = cols = stmt.result_fields.map{|c| output_identifier(c)}
    154:           col_count = cols.size
    155:           stmt.each do |result|
    156:             row = {}
    157:             col_count.times{|i| row[cols[i]] = result[i]}
    158:             yield row
    159:           end
    160:         end
    161:       end

[Validate]