colByName method
Get column data by column name
Implementation
String? colByName(String columnName) {
final colIndex = _colDefs.indexWhere(
(element) => element.name.toLowerCase() == columnName.toLowerCase(),
);
if (colIndex == -1) {
throw MySQLClientException("There is no column with name: $columnName");
}
if (colIndex >= _values.length) {
throw MySQLClientException("Column index is out of range");
}
final value = _values[colIndex];
return value;
}