Field constructor
Field(
- Buffer buffer
Implementation
factory Field(Buffer buffer) {
final catalog = buffer.readLengthCodedString();
final db = buffer.readLengthCodedString();
final table = buffer.readLengthCodedString();
final orgTable = buffer.readLengthCodedString();
final name = buffer.readLengthCodedString();
final orgName = buffer.readLengthCodedString();
buffer.skip(1);
final characterSet = buffer.readUint16();
final length = buffer.readUint32();
final type = buffer.readByte();
final flags = buffer.readUint16();
final decimals = buffer.readByte();
buffer.skip(2);
int? defaultValue;
if (buffer.canReadMore()) {
defaultValue = buffer.readLengthCodedBinary();
}
return Field._internal(catalog, db, table, orgTable, name, orgName,
characterSet, length, type, flags, decimals, defaultValue);
}