remove method
Removes the mapping for key if present.
Returns the commit-log sequence number assigned to this
deletion, or null if no sequence number was produced.
Throws a DataStoreException if the underlying store fails.
Implementation
@override
Future<int?> remove(String key, {bool skipCommit = false}) async {
for (final hook in preRemoveHooks) {
await hook(key, skipCommit: skipCommit);
}
_db.raw.execute('DELETE FROM notifications WHERE id = ?;', [key]);
_changes.add(KeyRemoved(key));
for (final hook in postRemoveHooks) {
await hook(key, skipCommit: skipCommit);
}
return null;
}