Sha256: 3faf8065e9b330f2479bbdea6993e76dd21b18a124bd785190980776e353332a
Contents?: true
Size: 543 Bytes
Versions: 14
Compression:
Stored size: 543 Bytes
Contents
class Kiss module SequelMySQLDataset # Returns results from dataset query as array of arrays, # instead of array of hashes. def all_arrays(opts = nil, &block) a = [] fetch_arrays(select_sql()) {|r| a << r} a.each(&block) if block a end # Fixes bug in Sequel 1.5; shouldn't be needed for Sequel 2.x # (need to double-check, however). def fetch_arrays(sql) execute(sql) do |r| while row = r.fetch_row yield row end end self end end end
Version data entries
14 entries across 14 versions & 1 rubygems