let AI comment everything because well... yeah...

This commit is contained in:
Nico
2025-06-06 21:00:32 +02:00
parent 9c84d0c375
commit cc110ac104
44 changed files with 1230 additions and 646 deletions

View File

@@ -1,10 +1,19 @@
// * Shared methods for deleting main entries from the database
// * Provides functionality for:
// * - Deleting all entries of a specific type
// * - Deleting a single entry by ID
import 'package:fforte/enums/databases.dart';
import 'package:fforte/interfaces/i_db.dart';
import 'package:fforte/methods/excursion_db_helper.dart';
import 'package:fforte/methods/place_db_helper.dart';
/// Helper class for deleting main entries from the database
class DeleteMainEntries {
/// Delete all main entries of a specific type
/// @param dbType The type of database (place/excursion)
static Future<void> deleteAll(DatabasesEnum dbType) async {
// Select appropriate database helper
IDb? db;
if (dbType == DatabasesEnum.place) {
@@ -15,7 +24,11 @@ class DeleteMainEntries {
await db!.deleteAllMainEntries();
}
/// Delete a single main entry by ID
/// @param dbType The type of database (place/excursion)
/// @param id ID of the entry to delete
static Future<void> deleteSingle(DatabasesEnum dbType, int id) async {
// Select appropriate database helper
IDb? db;
if (dbType == DatabasesEnum.place) {