Class: Imparcial::Driver::PostgreResult
- Inherits:
-
AbstractResult
- Object
- AbstractResult
- Imparcial::Driver::PostgreResult
- Defined in:
- lib/imparcial/driver/postgre/result.rb
Instance Attribute Summary
Attributes inherited from AbstractResult
Instance Method Summary collapse
Methods inherited from AbstractResult
#fetch_first_row, #fetch_in_array, #initialize
Constructor Details
This class inherits a constructor from Imparcial::Driver::AbstractResult
Instance Method Details
#fetch ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/imparcial/driver/postgre/result.rb', line 11 def fetch fields = @specific.fields rows = @specific.result rows.each do |row| v = [] row.each_with_index do |value, index| v << Row.new(fields[index], value) end yield(*v) end end |
#rows ⇒ Object
5 6 7 8 9 |
# File 'lib/imparcial/driver/postgre/result.rb', line 5 def rows @specific.result.length end |