Method: InterMine::PathQuery::Query#each_row
- Defined in:
- lib/intermine/query.rb
#each_row(start = nil, size = nil) ⇒ Object
Iterate over the results of this query one row at a time.
Rows support both array-like index based access as well as hash-like key based access. For key based acces you can use either the full path or the headless short version:
query.each_row do |row|
puts r["Gene.symbol"], r["proteins.primaryIdentifier"]
puts r[0]
puts r.to_a # Materialize the row an an Array
puts r.to_h # Materialize the row an a Hash
end
This method is now deprecated and will be removed in version 1 Please use Query#rows
436 437 438 439 440 441 442 |
# File 'lib/intermine/query.rb', line 436 def each_row(start=nil, size=nil) start = start.nil? ? @start : start size = size.nil? ? @size : size results_reader(start, size).each_row {|row| yield row } end |