parse<T, DB> method
Reads a primitive database value DB and parses it into a custom type T.
Throws if the column is null, missing from schema, or if parsing fails.
Implementation
T parse<T, DB>(String key, T Function(DB dbValue) parser) {
final dbValue = get<DB>(key);
return parser(dbValue);
}