Class: PeaInsertResponse

Inherits:
PeaResponse show all
Defined in:
lib/pea_response.rb

Overview

Represents the concept of response in the case of an INSERT query executed on the database of an AS/400 server by a PeaClient object.

Instance Method Summary collapse

Methods inherited from PeaResponse

#has_succeeded, #sql_message, #sql_state

Constructor Details

#initialize(has_succeeded, sql_message, sql_state, row_count) ⇒ PeaInsertResponse

Initialize a new instance of the PeaResponse class.

Params:

has_succeeded

Boolean set to true if the query has correctly been executed. Set to true if the SQL state is 00000.

sql_message

SQL message return from the execution of the query.

sql_state

SQL state return from the execution of the query.

row_count

Represents the number of rows that have been updated by the query.



206
207
208
209
210
# File 'lib/pea_response.rb', line 206

def initialize(has_succeeded, sql_message, sql_state, row_count)
    super has_succeeded, sql_message, sql_state
    
    @row_count = row_count
end

Instance Method Details

#row_countObject



212
213
214
# File 'lib/pea_response.rb', line 212

def row_count
    @row_count
end