class Sequel::Amalgalite::Dataset

Dataset class for SQLite datasets that use the amalgalite driver.

Public Instance Methods

fetch_rows(sql) { |row| ... } 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

Private Instance Methods

literal_string_append(sql, v) click to toggle source

Quote the string using the adapter instance method.

# File lib/sequel/adapters/amalgalite.rb, line 174
def literal_string_append(sql, v)
  db.synchronize(@opts[:server]){|c| sql << c.quote(v)}
end