Class: PeaResponse
- Inherits:
-
Object
- Object
- PeaResponse
- 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.
Direct Known Subclasses
PeaAlterResponse, PeaCreateResponse, PeaDeleteResponse, PeaDropResponse, PeaInsertResponse, PeaSelectResponse, PeaUpdateResponse
Instance Method Summary collapse
- #has_succeeded ⇒ Object
-
#initialize(has_succeeded, sql_message, sql_state) ⇒ PeaResponse
constructor
Initialize a new instance of the PeaResponse class.
- #sql_message ⇒ Object
- #sql_state ⇒ Object
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_state) @has_succeeded = has_succeeded @sql_message = @sql_state = sql_state end |
Instance Method Details
#has_succeeded ⇒ Object
19 20 21 |
# File 'lib/pea_response.rb', line 19 def has_succeeded @has_succeeded end |
#sql_message ⇒ Object
23 24 25 |
# File 'lib/pea_response.rb', line 23 def @sql_message end |
#sql_state ⇒ Object
27 28 29 |
# File 'lib/pea_response.rb', line 27 def sql_state @sql_state end |