Sha256: bc73ec0b1b92d68bf9ea014021113fd8c1d0f222fb10f89999cf77d13bd34859

Contents?: true

Size: 561 Bytes

Versions: 21

Compression:

Stored size: 561 Bytes

Contents

module DataObjects
  # The Result class is returned from Connection#execute_non_query.
  class Result
    # The ID of a row inserted by the Command
    attr_accessor :insert_id
    # The number of rows affected by the Command
    attr_accessor :affected_rows

    # Create a new Result. Used internally in the adapters.
    def initialize(command, affected_rows, insert_id = nil)
      @command, @affected_rows, @insert_id = command, affected_rows, insert_id
    end

    # Return the number of affected rows
    def to_i
      @affected_rows
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
data_objects-0.10.17 lib/data_objects/result.rb
data_objects-0.10.16 lib/data_objects/result.rb
data_objects-0.10.15 lib/data_objects/result.rb
data_objects-0.10.14 lib/data_objects/result.rb
data_objects-0.10.13 lib/data_objects/result.rb
data_objects-0.10.12 lib/data_objects/result.rb
data_objects-0.10.11 lib/data_objects/result.rb
data_objects-0.10.10 lib/data_objects/result.rb
data_objects-0.10.9 lib/data_objects/result.rb
data_objects-0.10.8 lib/data_objects/result.rb
data_objects-0.10.7 lib/data_objects/result.rb
data_objects-0.10.6 lib/data_objects/result.rb
data_objects-0.10.5 lib/data_objects/result.rb
data_objects-0.10.4 lib/data_objects/result.rb
data_objects-0.10.4.rc2 lib/data_objects/result.rb
data_objects-0.10.4.rc1 lib/data_objects/result.rb
data_objects-0.10.3 lib/data_objects/result.rb
data_objects-0.10.2 lib/data_objects/result.rb
data_objects-0.10.1 lib/data_objects/result.rb
data_objects-0.10.0 lib/data_objects/result.rb