Class: Mysql::Protocol::QueryPacket

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

Overview

Query packet

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ QueryPacket

Returns a new instance of QueryPacket.



398
399
400
# File 'lib/mysql/protocol.rb', line 398

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

Instance Attribute Details

#queryObject

Returns the value of attribute query.



396
397
398
# File 'lib/mysql/protocol.rb', line 396

def query
  @query
end

Instance Method Details

#serializeObject



402
403
404
# File 'lib/mysql/protocol.rb', line 402

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