Methods

Class/Module Index [+]

Quicksearch

Sequel::Swift::Dataset

Constants

DatasetClass

Public Instance Methods

fetch_rows(sql) click to toggle source

Set the columns and yield the hashes to the block.

# File lib/sequel/adapters/swift.rb, line 132
def fetch_rows(sql)
  execute(sql) do |res|
    col_map = {}
    @columns = res.fields.map do |c|
      col_map[c] = output_identifier(c)
    end
    res.each do |r|
      h = {}
      r.each do |k, v|
        h[col_map[k]] = v.is_a?(StringIO) ? SQL::Blob.new(v.read) : v
      end
      yield h
    end
  end
  self
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.