Class: Vertica::Protocol::Startup
- Inherits:
-
FrontendMessage
- Object
- Message
- FrontendMessage
- Vertica::Protocol::Startup
- Defined in:
- lib/vertica/protocol/frontend/startup.rb
Instance Method Summary collapse
-
#initialize(user, database, options = nil) ⇒ Startup
constructor
A new instance of Startup.
- #message_body ⇒ Object
Methods inherited from FrontendMessage
Methods inherited from Message
Constructor Details
#initialize(user, database, options = nil) ⇒ Startup
Returns a new instance of Startup.
7 8 9 10 11 |
# File 'lib/vertica/protocol/frontend/startup.rb', line 7 def initialize(user, database, = nil) @user = user @database = database @options = end |
Instance Method Details
#message_body ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/vertica/protocol/frontend/startup.rb', line 13 def str = [Vertica::PROTOCOL_VERSION].pack('N') str << ["user", @user].pack('Z*Z*') if @user str << ["database", @database].pack('Z*Z*') if @database str << ["options", @options].pack('Z*Z*') if @options str << [].pack('x') end |