Class: Mysql::Protocol::FetchPacket

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

Overview

Fetch packet

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ FetchPacket

Returns a new instance of FetchPacket.



516
517
518
# File 'lib/mysql/protocol.rb', line 516

def initialize(*args)
  @statement_id, @fetch_length = args
end

Instance Attribute Details

#fetch_lengthObject

Returns the value of attribute fetch_length.



514
515
516
# File 'lib/mysql/protocol.rb', line 514

def fetch_length
  @fetch_length
end

#statement_idObject

Returns the value of attribute statement_id.



514
515
516
# File 'lib/mysql/protocol.rb', line 514

def statement_id
  @statement_id
end

Instance Method Details

#serializeObject



520
521
522
# File 'lib/mysql/protocol.rb', line 520

def serialize
  [Mysql::COM_STMT_FETCH, statement_id, fetch_length].pack("CVV")
end