Module mysql.protocol.packet_helpers
Internal - Helper functions for the communication protocol.
Functions
Name | Description |
---|---|
consume(packet, N)
|
Returns N number of bytes from the packet and advances the array |
consume(packet)
|
Parse Length Coded String |
consumeIfComplete(packet)
|
Decodes a Length Coded Binary from a packet |
decode(packet)
|
Decodes a Length Coded Binary from a packet |
getNumLCBBytes(lcbHeader)
|
Extract number of bytes used for this LCB |
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. |
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. |
skip(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. |