Skip to content

Commit e44a0c9

Browse files
committed
fix cast bugs
1 parent 34fd4d6 commit e44a0c9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/src/database_access.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class DatabaseTransactionBase<TABLES extends TablesBase> {
124124
}
125125

126126
Future<PostgreSQLResult> query(String fmtString,
127-
{Map<String, Object>? values,
127+
{Map<String, Object?>? values,
128128
bool allowReuse = true,
129129
int? timeoutInSeconds}) async {
130130
assert(_assertCorrectValues(values));

lib/src/tables/base_tables.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ abstract class TableConstants {
2222
}
2323

2424
extension FuturePostgreSQL on Future<PostgreSQLResult> {
25-
Future<T?> singleOrNull<T>(FutureOr<T> Function(PostgreSQLResultRow row) cb) =>
26-
then((value) => value.singleOrNull(cb as T Function(PostgreSQLResultRow)));
25+
Future<T?> singleOrNull<T>(
26+
FutureOr<T?> Function(PostgreSQLResultRow row) cb) =>
27+
then((value) => value.singleOrNull<FutureOr<T?>>(cb));
2728
Future<PostgreSQLResultRow> get single => then((value) => value.single);
2829
}
2930

0 commit comments

Comments
 (0)