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.
418 419 420 421 |
# File 'lib/teradata-cli/connection.rb', line 418 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.
423 424 425 |
# File 'lib/teradata-cli/connection.rb', line 423 def flavor_name @flavor_name end |
Instance Method Details
#data ⇒ Object
429 430 431 |
# File 'lib/teradata-cli/connection.rb', line 429 def data @cli.data end |
#message ⇒ Object
425 426 427 |
# File 'lib/teradata-cli/connection.rb', line 425 def @cli. end |
#sql_status ⇒ Object
433 434 435 436 437 438 439 440 441 |
# File 'lib/teradata-cli/connection.rb', line 433 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 |