Parent

Methods

Included Modules

Files

Class/Module Index [+]

Quicksearch

ActiveRecord::Result

This class encapsulates a Result returned from calling exec_query on any database connection adapter. For example:

x = ActiveRecord::Base.connection.exec_query('SELECT * FROM foo')
x # => #<ActiveRecord::Result:0xdeadbeef>

Attributes

columns[R]
rows[R]

Public Class Methods

new(columns, rows) click to toggle source
# File lib/active_record/result.rb, line 13
def initialize(columns, rows)
  @columns   = columns
  @rows      = rows
  @hash_rows = nil
end

Public Instance Methods

each() click to toggle source
# File lib/active_record/result.rb, line 19
def each
  hash_rows.each { |row| yield row }
end
to_hash() click to toggle source
# File lib/active_record/result.rb, line 23
def to_hash
  hash_rows
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.