Class: Vertica::Messages::Startup
- Inherits:
-
FrontendMessage
- Object
- Message
- FrontendMessage
- Vertica::Messages::Startup
- Defined in:
- lib/vertica/messages/frontend_messages/startup.rb
Instance Method Summary collapse
-
#initialize(user, database, options = nil) ⇒ Startup
constructor
A new instance of Startup.
- #to_bytes ⇒ Object
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/messages/frontend_messages/startup.rb', line 7 def initialize(user, database, = nil) @user = user @database = database @options = end |
Instance Method Details
#to_bytes ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/vertica/messages/frontend_messages/startup.rb', line 13 def to_bytes 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') str end |