delete method

Future<List<Map<String, dynamic>>> delete()

Implementation

Future<List<Map<String, dynamic>>> delete() async {
  List<Map<String, dynamic>> result = [];
  final lastQ = 'DELETE FROM $table ' + _joinQuery + ' ' + _lastQuery + ' ' + _groupBy + ' ' + _orderBy + ' ' + _limit;
  final res = database != null ? await database!.delete(query: lastQ) : await DatabaseConfig.delete(query: lastQ);
  if (res) {
    result.add({'status': 'success', 'message': 'data has been deleted'});
  }
  return result;
}