Class: Vertica::Protocol::BackendMessage
- Defined in:
- lib/vertica/protocol/message.rb
Direct Known Subclasses
Authentication, BackendKeyData, BindComplete, CloseComplete, CommandComplete, CopyInResponse, DataRow, EmptyQueryResponse, NoData, NoticeResponse, ParameterDescription, ParameterStatus, ParseComplete, PortalSuspended, ReadyForQuery, RowDescription, Unknown
Constant Summary collapse
- MessageIdMap =
{}
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(_data) ⇒ BackendMessage
constructor
A new instance of BackendMessage.
Constructor Details
#initialize(_data) ⇒ BackendMessage
Returns a new instance of BackendMessage.
26 27 |
# File 'lib/vertica/protocol/message.rb', line 26 def initialize(_data) end |
Class Method Details
.factory(type, data) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/vertica/protocol/message.rb', line 13 def self.factory(type, data) if klass = MessageIdMap[type] klass.new(data) else Protocol::Unknown.new(type, data) end end |
.message_id(message_id) ⇒ Object
21 22 23 24 |
# File 'lib/vertica/protocol/message.rb', line 21 def self.() super MessageIdMap[] = self end |