1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Cli: Fixes #2981: Add support for retrying decryption after it has failed multiple times

This commit is contained in:
Laurent Cozic
2020-04-08 18:02:31 +01:00
parent a6459d3641
commit 7ccd19e21d
7 changed files with 54 additions and 29 deletions

View File

@@ -58,6 +58,10 @@ class KvStore extends BaseService {
await this.db().exec('DELETE FROM key_values WHERE `key` = ?', [key]);
}
async deleteByPrefix(prefix) {
await this.db().exec('DELETE FROM key_values WHERE `key` LIKE ?', [`${prefix}%`]);
}
async clear() {
await this.db().exec('DELETE FROM key_values');
}