Class: PeaCreateResponse
- Inherits:
-
PeaResponse
- Object
- PeaResponse
- PeaCreateResponse
- Defined in:
- lib/pea_response.rb
Overview
Represents the concept of response in the case of a CREATE query executed on the database of an AS/400 server by a PeaClient object.
Instance Method Summary collapse
- #database_name ⇒ Object
- #index_name ⇒ Object
-
#initialize(has_succeeded, sql_message, sql_state, database_name, index_name, table_schema) ⇒ PeaCreateResponse
constructor
Initialize a new instance of the PeaCreateResponse class.
- #table_schema ⇒ Object
Methods inherited from PeaResponse
#has_succeeded, #sql_message, #sql_state
Constructor Details
#initialize(has_succeeded, sql_message, sql_state, database_name, index_name, table_schema) ⇒ PeaCreateResponse
Initialize a new instance of the PeaCreateResponse 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.
database_name
-
Name of the database if the SQL create query creates a new database.
index_name
-
Name of the index if the SQL create query creates a new index.
table_schema
-
Schema of the table if the SQL create query creates a new table. The Schema is a Dictionary with columns’ name as key and a ColumnInfo object as value.
47 48 49 50 51 52 53 |
# File 'lib/pea_response.rb', line 47 def initialize(has_succeeded, , sql_state, database_name, index_name, table_schema) super has_succeeded, , sql_state @database_name = database_name @index_name = index_name @table_schema = table_schema end |
Instance Method Details
#database_name ⇒ Object
55 56 57 |
# File 'lib/pea_response.rb', line 55 def database_name @database_name end |
#index_name ⇒ Object
59 60 61 |
# File 'lib/pea_response.rb', line 59 def index_name @index_name end |
#table_schema ⇒ Object
63 64 65 |
# File 'lib/pea_response.rb', line 63 def table_schema @table_schema end |