deleteUnprocessedRequest method

Future<bool> deleteUnprocessedRequest(
  1. int id
)

Delete job in queue. This is a destructive action and cannot be undone. id is retrieved from the primaryKeyColumn.

Returns false if id could not be found; returns true if the request was deleted.

Implementation

Future<bool> deleteUnprocessedRequest(int id) async {
  final db = await getDb();

  final result = await db.delete(
    tableName,
    where: '$primaryKeyColumn = ?',
    whereArgs: [id],
  );

  return result > 0;
}