@@ -66,7 +66,7 @@ class DatabaseTransactionBase<TABLES extends TablesBase> {
66
66
final setArgs = setContainsOptional ? flattenOptionals (set ) : set ;
67
67
final setStatement =
68
68
setArgs.entries.map ((e) => '${e .key } = @s${e .key }' ).join (',' );
69
- final whereStatement = where.entries.map ((e) {
69
+ final whereStatement = where.entries.toList (growable : false ). map ((e) {
70
70
if (identical (e.value, whereIsNull)) {
71
71
where.remove (e.key);
72
72
return '${e .key } IS NULL' ;
@@ -140,10 +140,17 @@ class DatabaseTransactionBase<TABLES extends TablesBase> {
140
140
bool allowReuse = true ,
141
141
int ? timeoutInSeconds}) async {
142
142
assert (_assertCorrectValues (values));
143
- return _conn.query (fmtString,
144
- substitutionValues: values,
145
- allowReuse: allowReuse,
146
- timeoutInSeconds: timeoutInSeconds);
143
+ try {
144
+ // _logger.finest('QUERY: $fmtString');
145
+ return _conn.query (fmtString,
146
+ substitutionValues: values,
147
+ allowReuse: allowReuse,
148
+ timeoutInSeconds: timeoutInSeconds);
149
+ } catch (e, stackTrace) {
150
+ _logger.warning (
151
+ 'Error while running statement $fmtString ' , e, stackTrace);
152
+ rethrow ;
153
+ }
147
154
}
148
155
}
149
156
0 commit comments