SafeRow<R extends Record> class
R is the Expected Record type (enables compile-time key validation via custom linters).
- Available extensions
Constructors
- SafeRow(Row _raw, ResultSchema _schema)
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
get<
T> (String key) → T - Reads a value. Throws if the database value is null. Throws if the key is missing from the schema or the type mismatches.
-
getOptional<
T> (String key) → T? - Reads a value. Allows the database value to be null. Throws if the key is missing from the schema or the type mismatches.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse<
T, DB> (String key, T parser(DB dbValue)) → T -
Reads a primitive database value
DBand parses it into a custom typeT. Throws if the column is null, missing from schema, or if parsing fails. -
parseDateTime(
String key) → DateTime -
Available on SafeRow<
Parses a SQLite integer (epoch) into a Dart DateTime.Record> , provided by the SafeRowConvenience extension -
parseDateTimeOptional(
String key) → DateTime? -
Available on SafeRow<
Parses an optional SQLite integer (epoch) into a Dart DateTime.Record> , provided by the SafeRowConvenience extension -
parseEnumByName<
T extends Enum> (String key, Iterable< T> values) → T -
Available on SafeRow<
Parses a SQLite String into a Dart Enum using its name.Record> , provided by the SafeRowConvenience extension -
parseEnumByNameOptional<
T extends Enum> (String key, Iterable< T> values) → T? -
Available on SafeRow<
Parses an optional SQLite String into a Dart Enum using its name.Record> , provided by the SafeRowConvenience extension -
parseOptional<
T, DB> (String key, T parser(DB dbValue)) → T? - Same as parse, but allows the database value to be null.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
String key) → dynamic - Unsafe, dynamic map access (bypasses schema and type checks).