readTable<T extends HasResultSet, D> method Null safety

D readTable<T extends HasResultSet, D>(
  1. ResultSetImplementation<T, D> table
)

Reads all data that belongs to the given table from this row.

If this row does not contain non-null columns of the table, this method will throw an ArgumentError. Use readTableOrNull for nullable tables.

Implementation

D readTable<T extends HasResultSet, D>(ResultSetImplementation<T, D> table) {
  if (!_parsedData.containsKey(table)) {
    throw ArgumentError(
        'Invalid table passed to readTable: ${table.aliasedName}. This row '
        'does not contain values for that table. \n'
        'Please use readTableOrNull for outer joins.');
  }

  return _parsedData[table] as D;
}