Class: TeradataCli::FetchedParcel
- Inherits:
-
Object
- Object
- TeradataCli::FetchedParcel
- Defined in:
- lib/teradata-cli/connection.rb
Instance Attribute Summary collapse
-
#flavor_name ⇒ Object
readonly
Returns the value of attribute flavor_name.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(flavor_name, cli) ⇒ FetchedParcel
constructor
A new instance of FetchedParcel.
- #message ⇒ Object
- #sql_status ⇒ Object
Constructor Details
#initialize(flavor_name, cli) ⇒ FetchedParcel
Returns a new instance of FetchedParcel.
416 417 418 419 |
# File 'lib/teradata-cli/connection.rb', line 416 def initialize(flavor_name, cli) @flavor_name = flavor_name @cli = cli end |
Instance Attribute Details
#flavor_name ⇒ Object (readonly)
Returns the value of attribute flavor_name.
421 422 423 |
# File 'lib/teradata-cli/connection.rb', line 421 def flavor_name @flavor_name end |
Instance Method Details
#data ⇒ Object
427 428 429 |
# File 'lib/teradata-cli/connection.rb', line 427 def data @cli.data end |
#message ⇒ Object
423 424 425 |
# File 'lib/teradata-cli/connection.rb', line 423 def @cli. end |
#sql_status ⇒ Object
431 432 433 434 435 436 437 438 439 |
# File 'lib/teradata-cli/connection.rb', line 431 def sql_status case @flavor_name when 'PclSUCCESS' then SuccessStatus.parse(@cli.data) when 'PclFAILURE' then FailureStatus.parse(@cli.data) when 'PclERROR' then ErrorStatus.parse(@cli.data) else raise "must not happen: \#sql_status called for flavor #{@flavor_name}" end end |