Skip to content

Commit

Permalink
fix: fix queries used by earning_per_ship
Browse files Browse the repository at this point in the history
  • Loading branch information
eseidel committed Feb 24, 2024
1 parent 248cca0 commit a9227a0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/db/lib/db.dart
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ class Database {
final query = marketsWithImportInSystemQuery(system, tradeSymbol);
return queryMany(
query,
(map) => WaypointSymbol.fromString(map['waypoint_symbol'] as String),
(map) => WaypointSymbol.fromString(map['symbol'] as String),
).then((list) => list.toList());
}

Expand Down Expand Up @@ -363,8 +363,8 @@ class Database {
AccountingType accountingType,
) async {
final result = await connection.execute(
'SELECT * FROM transaction_ WHERE '
'accounting = @accounting',
pg.Sql.named('SELECT * FROM transaction_ WHERE '
'accounting = @accounting'),
parameters: {'accounting': accountingType.name},
);
return result.map((r) => r.toColumnMap()).map(transactionFromColumnMap);
Expand All @@ -375,8 +375,8 @@ class Database {
DateTime timestamp,
) async {
final result = await connection.execute(
'SELECT * FROM transaction_ WHERE timestamp > @timestamp '
'ORDER BY timestamp',
pg.Sql.named('SELECT * FROM transaction_ WHERE timestamp > @timestamp '
'ORDER BY timestamp'),
parameters: {'timestamp': timestamp},
);
return result.map((r) => r.toColumnMap()).map(transactionFromColumnMap);
Expand Down

0 comments on commit a9227a0

Please sign in to comment.