Class: Mysql::Protocol::PreparePacket

Inherits:
TxPacket
  • Object
show all
Defined in:
lib/mysql/protocol.rb

Overview

Prepare packet

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ PreparePacket

Returns a new instance of PreparePacket.



454
455
456
# File 'lib/mysql/protocol.rb', line 454

def initialize(*args)
  @query, = args
end

Instance Attribute Details

#queryObject

Returns the value of attribute query.



452
453
454
# File 'lib/mysql/protocol.rb', line 452

def query
  @query
end

Instance Method Details

#serializeObject



458
459
460
# File 'lib/mysql/protocol.rb', line 458

def serialize
  [COM_STMT_PREPARE, query].pack("Ca*")
end