delete method

  1. @override
Future<int> delete(
  1. Map<String, dynamic> map,
  2. String table, {
  3. required List<String> keys,
  4. String? dbName = defaultDBName,
  5. dynamic tryToLogOperation = true,
})
override

DELETE the item building the SQL query using the table and the id passed

Implementation

@override
Future<int> delete(Map<String, dynamic> map, String table,
    {required List<String> keys,
    String? dbName = defaultDBName,
    tryToLogOperation = true}) async {
  final res = await super.delete(map, table, keys: keys, dbName: dbName);
  if (tryToLogOperation && !_isSystemTable(table)) {
    await logOperation(table, Operation.delete, map[_getKeyField(table)],
        dbName: dbName!);
  }
  return res;
}