Class: Vertica::Messages::ReadyForQuery
- Inherits:
-
BackendMessage
- Object
- Message
- BackendMessage
- Vertica::Messages::ReadyForQuery
- Defined in:
- lib/vertica/messages/backend_messages/ready_for_query.rb
Constant Summary collapse
- STATUSES =
{ 'I' => :no_transaction, 'T' => :in_transaction, 'E' => :failed_transaction }
Constants inherited from BackendMessage
Instance Attribute Summary collapse
-
#transaction_status ⇒ Object
readonly
Returns the value of attribute transaction_status.
Instance Method Summary collapse
-
#initialize(data) ⇒ ReadyForQuery
constructor
A new instance of ReadyForQuery.
Methods inherited from BackendMessage
Methods inherited from Message
Constructor Details
#initialize(data) ⇒ ReadyForQuery
Returns a new instance of ReadyForQuery.
15 16 17 |
# File 'lib/vertica/messages/backend_messages/ready_for_query.rb', line 15 def initialize(data) @transaction_status = STATUSES[data.unpack('a').first] end |
Instance Attribute Details
#transaction_status ⇒ Object (readonly)
Returns the value of attribute transaction_status.
13 14 15 |
# File 'lib/vertica/messages/backend_messages/ready_for_query.rb', line 13 def transaction_status @transaction_status end |