Class: Mysql::Protocol::FieldListPacket

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ FieldListPacket

Returns a new instance of FieldListPacket.



541
542
543
# File 'lib/mysql/protocol.rb', line 541

def initialize(*args)
  @table, @field = args
end

Instance Attribute Details

#fieldObject

Returns the value of attribute field.



539
540
541
# File 'lib/mysql/protocol.rb', line 539

def field
  @field
end

#tableObject

Returns the value of attribute table.



539
540
541
# File 'lib/mysql/protocol.rb', line 539

def table
  @table
end

Instance Method Details

#serializeObject



545
546
547
# File 'lib/mysql/protocol.rb', line 545

def serialize
  [Mysql::COM_FIELD_LIST, "#{@table}\0#{@field}"].pack("Ca*")
end