The IPatch interface represents patches of the local storage. Each such patch somehow changes the layout of local storage persistence so that only compliant & corresponding versions of libquentier can be used to work with it.
More...
#include <IPatch.h>
The IPatch interface represents patches of the local storage. Each such patch somehow changes the layout of local storage persistence so that only compliant & corresponding versions of libquentier can be used to work with it.
◆ apply()
| virtual QFuture< void > quentier::local_storage::IPatch::apply |
( |
| ) |
|
|
nodiscardpure virtual |
Apply the patch to local storage
- Returns
- Future which can be awaited for patch application. Contains exception if patch application fails.
◆ backupLocalStorage()
| virtual QFuture< void > quentier::local_storage::IPatch::backupLocalStorage |
( |
| ) |
|
|
nodiscardpure virtual |
Backup either the entire local storage or its parts affected by the particular patch, should be called before applying the patch (but can be skipped if not desired).
- Returns
- Future which can be awaited for the backup completion. Contains exception if backup fails.
◆ fromVersion()
| virtual int quentier::local_storage::IPatch::fromVersion |
( |
| ) |
const |
|
nodiscardpure virtualnoexcept |
- Returns
- Version of local storage to which the patch needs to be applied
◆ patchLongDescription()
| virtual QString quentier::local_storage::IPatch::patchLongDescription |
( |
| ) |
const |
|
nodiscardpure virtual |
- Returns
- Long i.e. detailed description of the patch
◆ patchShortDescription()
| virtual QString quentier::local_storage::IPatch::patchShortDescription |
( |
| ) |
const |
|
nodiscardpure virtual |
- Returns
- Short description of the patch
◆ removeLocalStorageBackup()
| virtual QFuture< void > quentier::local_storage::IPatch::removeLocalStorageBackup |
( |
| ) |
|
|
nodiscardpure virtual |
Remove the previously made backup of local storage, presumably after successful application of the patch so the backup is no longer needed. It won't work if no backup was made before applying a patch, obviously.
- Returns
- Future which can be awaited for local storage backup removal. Contains exception if backup removal fails.
◆ restoreLocalStorageFromBackup()
| virtual QFuture< void > quentier::local_storage::IPatch::restoreLocalStorageFromBackup |
( |
| ) |
|
|
nodiscardpure virtual |
Restore local storage from previously made backup, presumably after the failed attempt to apply a patch. Won't work if no backup was made before applying a patch, obviously.
- Returns
- Future which can be awaited for the backup restoration completion. Contains exception if backup restoration fails.
◆ toVersion()
| virtual int quentier::local_storage::IPatch::toVersion |
( |
| ) |
const |
|
nodiscardpure virtualnoexcept |
- Returns
- Version of local storage to which the patch would upgrade the local storage