From 9cb35dc4a1fd5676073641f80364d5728f896238 Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Tue, 30 Dec 2025 18:45:28 +0100 Subject: [PATCH] Updated comments --- lib/data/dao/match_dao.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/data/dao/match_dao.dart b/lib/data/dao/match_dao.dart index 76c3709..b56a38b 100644 --- a/lib/data/dao/match_dao.dart +++ b/lib/data/dao/match_dao.dart @@ -65,8 +65,9 @@ class MatchDao extends DatabaseAccessor 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 addMatch({required Match match}) async { await db.transaction(() async { await into(matchTable).insert( @@ -100,6 +101,7 @@ class MatchDao extends DatabaseAccessor 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 addMatchAsList({required List matches}) async { if (matches.isEmpty) return; await db.transaction(() async {