Class: Presto::Client::QueryError
- Inherits:
-
Object
- Object
- Presto::Client::QueryError
- Defined in:
- lib/presto/client/models.rb
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#error_location ⇒ Object
readonly
Returns the value of attribute error_location.
-
#failure_info ⇒ Object
readonly
Returns the value of attribute failure_info.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#sql_state ⇒ Object
readonly
Returns the value of attribute sql_state.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ QueryError
constructor
A new instance of QueryError.
Constructor Details
#initialize(options = {}) ⇒ QueryError
Returns a new instance of QueryError.
191 192 193 194 195 196 197 |
# File 'lib/presto/client/models.rb', line 191 def initialize(={}) = [:message] @sql_state = [:sql_state] @error_code = [:error_code] @error_location = [:error_location] @failure_info = [:failure_info] end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
187 188 189 |
# File 'lib/presto/client/models.rb', line 187 def error_code @error_code end |
#error_location ⇒ Object (readonly)
Returns the value of attribute error_location.
188 189 190 |
# File 'lib/presto/client/models.rb', line 188 def error_location @error_location end |
#failure_info ⇒ Object (readonly)
Returns the value of attribute failure_info.
189 190 191 |
# File 'lib/presto/client/models.rb', line 189 def failure_info @failure_info end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
185 186 187 |
# File 'lib/presto/client/models.rb', line 185 def end |
#sql_state ⇒ Object (readonly)
Returns the value of attribute sql_state.
186 187 188 |
# File 'lib/presto/client/models.rb', line 186 def sql_state @sql_state end |
Class Method Details
.decode_hash(hash) ⇒ Object
199 200 201 202 203 204 205 206 207 |
# File 'lib/presto/client/models.rb', line 199 def self.decode_hash(hash) new( message: hash["message"], sql_state: hash["sqlState"], error_code: hash["errorCode"], error_location: hash["errorLocation"] && ErrorLocation.decode_hash(hash["errorLocation"]), failure_info: hash["failureInfo"] && FailureInfo.decode_hash(hash["failureInfo"]), ) end |