class DataObjects::Result

The Result class is returned from Connection#execute_non_query.

Attributes

affected_rows[RW]

The number of rows affected by the Command

insert_id[RW]

The ID of a row inserted by the Command

Public Class Methods

new(command, affected_rows, insert_id = nil) click to toggle source

Create a new Result. Used internally in the adapters.

# File lib/data_objects/result.rb, line 10
def initialize(command, affected_rows, insert_id = nil)
  @command, @affected_rows, @insert_id = command, affected_rows, insert_id
end

Public Instance Methods

to_i() click to toggle source

Return the number of affected rows

# File lib/data_objects/result.rb, line 15
def to_i
  @affected_rows
end