Refactoring
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 45s
Pull Request Pipeline / lint (pull_request) Successful in 47s

This commit is contained in:
2026-05-02 01:31:49 +02:00
parent 9e4f44491c
commit 5789650c97
16 changed files with 83 additions and 83 deletions

View File

@@ -213,28 +213,28 @@ class GroupDao extends DatabaseAccessor<AppDatabase> with _$GroupDaoMixin {
/* Update */
/// Updates the name of the group with the given [id] to [newName].
/// Updates the name of the group with the given [id] to [name].
/// Returns `true` if more than 0 rows were affected, otherwise `false`.
Future<bool> updateGroupName({
required String groupId,
required String newName,
required String name,
}) async {
final rowsAffected =
await (update(groupTable)..where((g) => g.id.equals(groupId))).write(
GroupTableCompanion(name: Value(newName)),
GroupTableCompanion(name: Value(name)),
);
return rowsAffected > 0;
}
/// Updates the description of the group with the given [groupId] to [newDescription].
/// Updates the description of the group with the given [groupId] to [description].
/// Returns `true` if more than 0 rows were affected, otherwise `false`.
Future<bool> updateGroupDescription({
required String groupId,
required String newDescription,
required String description,
}) async {
final rowsAffected =
await (update(groupTable)..where((g) => g.id.equals(groupId))).write(
GroupTableCompanion(description: Value(newDescription)),
GroupTableCompanion(description: Value(description)),
);
return rowsAffected > 0;
}