Updated comments
Some checks failed
Pull Request Pipeline / test (pull_request) Failing after 2m9s
Pull Request Pipeline / lint (pull_request) Successful in 2m9s

This commit is contained in:
2025-12-30 18:45:28 +01:00
parent b8b65c4ca1
commit 9cb35dc4a1

View File

@@ -65,8 +65,9 @@ class MatchDao extends DatabaseAccessor<AppDatabase> with _$MatchDaoMixin {
);
}
/// Adds a new [Match] to the database.
/// Also adds associated players and group if they exist.
/// Adds a new [Match] to the database. Also adds players and group
/// associations. This method assumes that the players and groups added to
/// this match are already present in the database.
Future<void> addMatch({required Match match}) async {
await db.transaction(() async {
await into(matchTable).insert(
@@ -100,6 +101,7 @@ class MatchDao extends DatabaseAccessor<AppDatabase> with _$MatchDaoMixin {
/// Adds multiple [Match]s to the database in a batch operation.
/// Also adds associated players and groups if they exist.
/// If the [matches] list is empty, the method returns immediately.
/// This Method should only be used to import matches from a different device.
Future<void> addMatchAsList({required List<Match> matches}) async {
if (matches.isEmpty) return;
await db.transaction(() async {