Class: Imparcial::Driver::MysqlResult
- Inherits:
-
AbstractResult
- Object
- AbstractResult
- Imparcial::Driver::MysqlResult
- Defined in:
- lib/imparcial/driver/mysql/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 |
# File 'lib/imparcial/driver/mysql/result.rb', line 11 def fetch fields = @specific.fetch_fields @specific.each do |row| v = [] row.each_with_index do |r, index| v << Row.new(fields[index].name, r) end yield(*v) end end |
#rows ⇒ Object
5 6 7 8 9 |
# File 'lib/imparcial/driver/mysql/result.rb', line 5 def rows @specific.num_rows end |