Structure
MySQLProtocol.NullBitmap
14.7.2.1 NULL-Bitmap
struct NullBitmap
Overview
The binary protocol sends NULL values as bits inside a bitmap instead of a full byte as the ProtocolText::ResultsetRow does. If many NULL values are sent, it is more efficient than the old way.
https://dev.mysql.com/doc/internals/en/null-bitmap.html
Topics
Instance Properties
var bytes: [UInt8]the raw bitmap bytes.var description: StringSeeCustomStringConvertible.descriptionlet offset: IntThis bitmap’s static offset. This varies depending on which packet the bitmap is being used in.
Instance Methods
func isNull(at: Int) -> BoolReturnstrueif the bitmap is null at the supplied position.func setNull(at: Int)Sets the position to null.
Type Methods
static func binaryResultSetBitmap(bytes: [UInt8]) -> MySQLProtocol.NullBitmapCreates a newMySQLNullBitmapsuitable for binary result set packets.static func comExecuteBitmap(count: Int) -> MySQLProtocol.NullBitmapCreates a newMySQLNullBitmapsuitable for com statement execute packets.static func readResultSetNullBitmap(count: Int, from: inout ByteBuffer) -> MySQLProtocol.NullBitmap?Reads aMySQLNullBitmapfor binary result sets from theByteBuffer.
Relationships
Conforms To
Swift.CustomStringConvertible