Class: PeaResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/pea_response.rb

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(has_succeeded, sql_message, sql_state) ⇒ PeaResponse

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.



13
14
15
16
17
# File 'lib/pea_response.rb', line 13

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

Instance Method Details

#has_succeededObject



19
20
21
# File 'lib/pea_response.rb', line 19

def has_succeeded
    @has_succeeded
end

#sql_messageObject



23
24
25
# File 'lib/pea_response.rb', line 23

def sql_message
    @sql_message
end

#sql_stateObject



27
28
29
# File 'lib/pea_response.rb', line 27

def sql_state
    @sql_state
end