Class: Vertica::Messages::CommandComplete
- Inherits:
-
BackendMessage
- Object
- Message
- BackendMessage
- Vertica::Messages::CommandComplete
- Defined in:
- lib/vertica/messages/backend_messages/command_complete.rb
Constant Summary
Constants inherited from BackendMessage
Instance Attribute Summary collapse
-
#oid ⇒ Object
readonly
Returns the value of attribute oid.
-
#rows ⇒ Object
readonly
Returns the value of attribute rows.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
-
#initialize(data) ⇒ CommandComplete
constructor
A new instance of CommandComplete.
Methods inherited from BackendMessage
Methods inherited from Message
Constructor Details
#initialize(data) ⇒ CommandComplete
Returns a new instance of CommandComplete.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/vertica/messages/backend_messages/command_complete.rb', line 8 def initialize(data) case data = data.unpack('Z*').first when /^INSERT / @tag, oid, rows = data.split(' ', 3) @oid, @rows = oid.to_i, rows.to_i when /^DELETE /, /^UPDATE /, /^MOVE /, /^FETCH /, /^COPY / @tag, @rows = data.split(' ', 2) @rows = rows.to_i else @tag = data end end |
Instance Attribute Details
#oid ⇒ Object (readonly)
Returns the value of attribute oid.
6 7 8 |
# File 'lib/vertica/messages/backend_messages/command_complete.rb', line 6 def oid @oid end |
#rows ⇒ Object (readonly)
Returns the value of attribute rows.
6 7 8 |
# File 'lib/vertica/messages/backend_messages/command_complete.rb', line 6 def rows @rows end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
6 7 8 |
# File 'lib/vertica/messages/backend_messages/command_complete.rb', line 6 def tag @tag end |