deleteOutOfDate method
Deletes all data that is out of date.
Implementation
@override
Future<void> deleteOutOfDate() async {
await _db.transaction<void>((transaction) async {
await transaction.execute('''
CREATE TABLE IF NOT EXISTS $_tableName(
key TEXT PRIMARY KEY NOT NULL,
json TEXT,
expireAt INTEGER,
destroyKey TEXT
) WITHOUT ROWID''');
await transaction.delete(
_tableName,
where: 'expireAt < ?',
whereArgs: [_currentTimestamp()],
);
});
}