class Sequel::Firebird::Dataset
Public Instance Methods
fetch_rows(sql) { |h| ... }
click to toggle source
Yield all rows returned by executing the given SQL and converting the types.
# File lib/sequel/adapters/firebird.rb, line 87 def fetch_rows(sql) execute(sql) do |s| begin @columns = columns = s.fields.map{|c| output_identifier(c.name)} s.fetchall.each do |r| h = {} r.zip(columns).each{|v, c| h[c] = v} yield h end ensure s.close end end self end