class Mysql::Protocol::FieldPacket
Field packet
Attributes
Public Class Methods
Source
# File lib/mysql/protocol.rb, line 757 def initialize(*args) @db, @table, @org_table, @name, @org_name, @charsetnr, @length, @type, @flags, @decimals, @default = args end
Source
# File lib/mysql/protocol.rb, line 735 def self.parse(pkt) _first = pkt.lcs db = pkt.lcs table = pkt.lcs org_table = pkt.lcs name = pkt.lcs org_name = pkt.lcs _f0 = pkt.utiny charsetnr = pkt.ushort length = pkt.ulong type = pkt.utiny flags = pkt.ushort decimals = pkt.utiny f1 = pkt.ushort raise ProtocolError, "invalid packet: f1=#{f1}" unless f1 == 0 default = pkt.lcs return self.new(db, table, org_table, name, org_name, charsetnr, length, type, flags, decimals, default) end