mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 00:05:16 +00:00
Fix issue on conversation update
This commit is contained in:
@ -46,6 +46,17 @@ abstract class ModelDatabaseHelper<T extends CacheModel> {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Delete an entry from the database with a specified [id]
|
||||
///
|
||||
/// Return true if at least one entry was deleted / false else
|
||||
Future<bool> delete(int id) async {
|
||||
return await (await DatabaseHelper.get()).delete(
|
||||
tableName(),
|
||||
where: '${BaseTableContract.C_ID} = ?',
|
||||
whereArgs: [id],
|
||||
) > 0;
|
||||
}
|
||||
|
||||
/// Get all the entries from the table
|
||||
Future<List<T>> getAll() async {
|
||||
List<Map> maps = await (await DatabaseHelper.get()).query(tableName());
|
||||
|
Reference in New Issue
Block a user