Class: OCI::DatabaseToolsRuntime::Models::ExecuteSqlResponseItemBatch
- Inherits:
-
Object
- Object
- OCI::DatabaseToolsRuntime::Models::ExecuteSqlResponseItemBatch
- Defined in:
- lib/oci/database_tools_runtime/models/execute_sql_response_item_batch.rb
Overview
A statement execution response for batched type requests.
Constant Summary collapse
- STATEMENT_TYPE_ENUM =
[ STATEMENT_TYPE_QUERY = 'QUERY'.freeze, STATEMENT_TYPE_DML = 'DML'.freeze, STATEMENT_TYPE_DDL = 'DDL'.freeze, STATEMENT_TYPE_PLSQL = 'PLSQL'.freeze, STATEMENT_TYPE_SQLPLUS = 'SQLPLUS'.freeze, STATEMENT_TYPE_IGNORE = 'IGNORE'.freeze, STATEMENT_TYPE_TRANSACTION_CONTROL = 'TRANSACTION_CONTROL'.freeze, STATEMENT_TYPE_SESSION_CONTROL = 'SESSION_CONTROL'.freeze, STATEMENT_TYPE_SYSTEM_CONTROL = 'SYSTEM_CONTROL'.freeze, STATEMENT_TYPE_JDBC = 'JDBC'.freeze, STATEMENT_TYPE_OTHER = 'OTHER'.freeze, STATEMENT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#batch_statement_texts ⇒ Array<String>
DML statements to execute in jdbc batch mode.
-
#dbms_output ⇒ String
Output from DBMS_OUTPUT package.
- #error ⇒ OCI::DatabaseToolsRuntime::Models::ExecuteSqlResponseItemError
- #properties ⇒ OCI::DatabaseToolsRuntime::Models::ExecuteSqlResponseItemProperties
-
#responses ⇒ Array<String>
Responses generated when executing the statements.
-
#results ⇒ Array<Integer>
Results generated when executing the statements.
-
#statement_id ⇒ Integer
The sequence number of the statement.
- #statement_pos ⇒ OCI::DatabaseToolsRuntime::Models::ExecuteSqlResponseItemStatementPos
-
#statement_type ⇒ String
The Statement type.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ExecuteSqlResponseItemBatch
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ ExecuteSqlResponseItemBatch
Initializes the object
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/oci/database_tools_runtime/models/execute_sql_response_item_batch.rb', line 109 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.statement_id = attributes[:'statementId'] if attributes[:'statementId'] raise 'You cannot provide both :statementId and :statement_id' if attributes.key?(:'statementId') && attributes.key?(:'statement_id') self.statement_id = attributes[:'statement_id'] if attributes[:'statement_id'] self.statement_type = attributes[:'statementType'] if attributes[:'statementType'] raise 'You cannot provide both :statementType and :statement_type' if attributes.key?(:'statementType') && attributes.key?(:'statement_type') self.statement_type = attributes[:'statement_type'] if attributes[:'statement_type'] self.statement_pos = attributes[:'statementPos'] if attributes[:'statementPos'] raise 'You cannot provide both :statementPos and :statement_pos' if attributes.key?(:'statementPos') && attributes.key?(:'statement_pos') self.statement_pos = attributes[:'statement_pos'] if attributes[:'statement_pos'] self.batch_statement_texts = attributes[:'batchStatementTexts'] if attributes[:'batchStatementTexts'] raise 'You cannot provide both :batchStatementTexts and :batch_statement_texts' if attributes.key?(:'batchStatementTexts') && attributes.key?(:'batch_statement_texts') self.batch_statement_texts = attributes[:'batch_statement_texts'] if attributes[:'batch_statement_texts'] self.error = attributes[:'error'] if attributes[:'error'] self.dbms_output = attributes[:'dbmsOutput'] if attributes[:'dbmsOutput'] raise 'You cannot provide both :dbmsOutput and :dbms_output' if attributes.key?(:'dbmsOutput') && attributes.key?(:'dbms_output') self.dbms_output = attributes[:'dbms_output'] if attributes[:'dbms_output'] self.properties = attributes[:'properties'] if attributes[:'properties'] self.responses = attributes[:'responses'] if attributes[:'responses'] self.results = attributes[:'results'] if attributes[:'results'] end |
Instance Attribute Details
#batch_statement_texts ⇒ Array<String>
DML statements to execute in jdbc batch mode
40 41 42 |
# File 'lib/oci/database_tools_runtime/models/execute_sql_response_item_batch.rb', line 40 def batch_statement_texts @batch_statement_texts end |
#dbms_output ⇒ String
Output from DBMS_OUTPUT package. Server output must be enabled (e.g., SET SERVEROUTPUT ON).
47 48 49 |
# File 'lib/oci/database_tools_runtime/models/execute_sql_response_item_batch.rb', line 47 def dbms_output @dbms_output end |
#error ⇒ OCI::DatabaseToolsRuntime::Models::ExecuteSqlResponseItemError
43 44 45 |
# File 'lib/oci/database_tools_runtime/models/execute_sql_response_item_batch.rb', line 43 def error @error end |
#properties ⇒ OCI::DatabaseToolsRuntime::Models::ExecuteSqlResponseItemProperties
50 51 52 |
# File 'lib/oci/database_tools_runtime/models/execute_sql_response_item_batch.rb', line 50 def properties @properties end |
#responses ⇒ Array<String>
Responses generated when executing the statements.
54 55 56 |
# File 'lib/oci/database_tools_runtime/models/execute_sql_response_item_batch.rb', line 54 def responses @responses end |
#results ⇒ Array<Integer>
Results generated when executing the statements.
58 59 60 |
# File 'lib/oci/database_tools_runtime/models/execute_sql_response_item_batch.rb', line 58 def results @results end |
#statement_id ⇒ Integer
The sequence number of the statement. Sequence number of the first statement is 1.
29 30 31 |
# File 'lib/oci/database_tools_runtime/models/execute_sql_response_item_batch.rb', line 29 def statement_id @statement_id end |
#statement_pos ⇒ OCI::DatabaseToolsRuntime::Models::ExecuteSqlResponseItemStatementPos
36 37 38 |
# File 'lib/oci/database_tools_runtime/models/execute_sql_response_item_batch.rb', line 36 def statement_pos @statement_pos end |
#statement_type ⇒ String
The Statement type.
33 34 35 |
# File 'lib/oci/database_tools_runtime/models/execute_sql_response_item_batch.rb', line 33 def statement_type @statement_type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/oci/database_tools_runtime/models/execute_sql_response_item_batch.rb', line 61 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'statement_id': :'statementId', 'statement_type': :'statementType', 'statement_pos': :'statementPos', 'batch_statement_texts': :'batchStatementTexts', 'error': :'error', 'dbms_output': :'dbmsOutput', 'properties': :'properties', 'responses': :'responses', 'results': :'results' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/oci/database_tools_runtime/models/execute_sql_response_item_batch.rb', line 78 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'statement_id': :'Integer', 'statement_type': :'String', 'statement_pos': :'OCI::DatabaseToolsRuntime::Models::ExecuteSqlResponseItemStatementPos', 'batch_statement_texts': :'Array<String>', 'error': :'OCI::DatabaseToolsRuntime::Models::ExecuteSqlResponseItemError', 'dbms_output': :'String', 'properties': :'OCI::DatabaseToolsRuntime::Models::ExecuteSqlResponseItemProperties', 'responses': :'Array<String>', 'results': :'Array<Integer>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/oci/database_tools_runtime/models/execute_sql_response_item_batch.rb', line 174 def ==(other) return true if equal?(other) self.class == other.class && statement_id == other.statement_id && statement_type == other.statement_type && statement_pos == other.statement_pos && batch_statement_texts == other.batch_statement_texts && error == other.error && dbms_output == other.dbms_output && properties == other.properties && responses == other.responses && results == other.results end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/oci/database_tools_runtime/models/execute_sql_response_item_batch.rb', line 212 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
192 193 194 |
# File 'lib/oci/database_tools_runtime/models/execute_sql_response_item_batch.rb', line 192 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
201 202 203 |
# File 'lib/oci/database_tools_runtime/models/execute_sql_response_item_batch.rb', line 201 def hash [statement_id, statement_type, statement_pos, batch_statement_texts, error, dbms_output, properties, responses, results].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
245 246 247 248 249 250 251 252 253 254 |
# File 'lib/oci/database_tools_runtime/models/execute_sql_response_item_batch.rb', line 245 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
239 240 241 |
# File 'lib/oci/database_tools_runtime/models/execute_sql_response_item_batch.rb', line 239 def to_s to_hash.to_s end |