read method
Reads the TObject from the given input protocol.
Implementation
read(TProtocol iprot) {
TField field;
iprot.readStructBegin();
while (true) {
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case COLUMN_NAMES:
if (field.type == TType.LIST) {
{
TList _list18 = iprot.readListBegin();
this.column_names = <Int8List>[];
for (int _i19 = 0; _i19 < _list18.length; ++_i19) {
Int8List _elem20;
_elem20 = iprot.readBinary();
this.column_names?.add(_elem20);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case ROWS:
if (field.type == TType.LIST) {
{
TList _list21 = iprot.readListBegin();
this.rows = <Row>[];
for (int _i22 = 0; _i22 < _list21.length; ++_i22) {
Row _elem23;
_elem23 = new Row();
_elem23.read(iprot);
this.rows?.add(_elem23);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}