mysql-native v2.2.0

API Reference Home: [This Version] [Latest Version] [Other Versions]


Module mysql.protocol.packet_helpers

Internal - Helper functions for the communication protocol.

Functions

NameDescription
consume(conn)
consume(packet)
consume(packet, N)
consume(packet, N) Returns N number of bytes from the packet and advances the array
consume(packet, n)
consume(packet)
consume(packet)
consume(packet)
consume(packet)
consume(packet)
consume(packet) Parse Length Coded String
consumeBinaryValueIfComplete(packet, unsigned)
consumeIfComplete(packet, binary, unsigned)
consumeIfComplete(packet, sqlType, binary, unsigned, charSet)
consumeIfComplete(packet) Decodes a Length Coded Binary from a packet
consumeNonBinaryValueIfComplete(packet, unsigned)
decode(packet, n)
decode(packet)
decode(packet)
decode(packet) Decodes a Length Coded Binary from a packet
decodeLCBHeader(packet)
getNumLCBBytes(lcbHeader) Extract number of bytes used for this LCB
hasEnoughBytes(packet)
myto(value)
pack(tod) Function to pack a TimeOfDay into a binary encoding for transmission to the server.
pack(dt) Function to pack a Date into a binary encoding for transmission to the server.
pack(dt) Function to pack a DateTime into a binary encoding for transmission to the server.
packInto(value, array) Converts a value into a sequence of bytes and fills the supplied array.
packLCS(a)
packLength(l, offset)
setPacketHeader(packet, packetNumber) Set packet length and number. It's important that the length of packet has already been set to the final state as its length is used.
setPacketHeader(packet, packetNumber, dataLength)
(array, n) Skips over n items, advances the array, and return the newly advanced array to allow method chaining.
toDate(a) Function to extract a Date from a binary encoded row.
toDate(s) Function to extract a Date from a text encoded column value.
toDateTime(a) Function to extract a DateTime from a binary encoded row.
toDateTime(s) Function to extract a DateTime from a text encoded column value.
toDateTime(x) Function to extract a DateTime from a ulong.
toTimeDiff(a) Function to extract a time difference from a binary encoded row.
toTimeDiff(s) Function to extract a time difference from a text encoded column value.
toTimeOfDay(a) Function to extract a TimeOfDay from a binary encoded row.
toTimeOfDay(s) Function to extract a TimeOfDay from a text encoded column value.