Removed unnecessary function
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 46s
Pull Request Pipeline / lint (pull_request) Successful in 48s

This commit is contained in:
2026-04-21 23:39:44 +02:00
parent db554557fe
commit a7e234cf10

View File

@@ -45,25 +45,6 @@ class GameDao extends DatabaseAccessor<AppDatabase> with _$GameDaoMixin {
); );
} }
Future<Game> getGameByMatchId({required String matchId}) async {
final query = select(gameTable).join([
innerJoin(matchTable, matchTable.gameId.equalsExp(gameTable.id)),
])..where(matchTable.id.equals(matchId));
final result = await query.getSingle();
final gameRow = result.readTable(gameTable);
return Game(
id: gameRow.id,
name: gameRow.name,
ruleset: Ruleset.values.firstWhere((e) => e.name == gameRow.ruleset),
description: gameRow.description,
color: GameColor.values.firstWhere((e) => e.name == gameRow.color),
icon: gameRow.icon,
createdAt: gameRow.createdAt,
);
}
/// Adds a new [game] to the database. /// Adds a new [game] to the database.
/// If a game with the same ID already exists, no action is taken. /// If a game with the same ID already exists, no action is taken.
/// Returns `true` if the game was added, `false` otherwise. /// Returns `true` if the game was added, `false` otherwise.