From 9f9f24c6249913357ae92e85df11bd1faaf35965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Wed, 17 Jun 2020 17:12:13 +0200 Subject: [PATCH] BaseEventIndexManager: Add support to read/write user versions. --- src/indexing/BaseEventIndexManager.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/indexing/BaseEventIndexManager.ts b/src/indexing/BaseEventIndexManager.ts index c40d1300ea..c59ed9b20e 100644 --- a/src/indexing/BaseEventIndexManager.ts +++ b/src/indexing/BaseEventIndexManager.ts @@ -144,6 +144,29 @@ export default abstract class BaseEventIndexManager { throw new Error("Unimplemented"); } + + /** + * Get the user version of the database. + * @return {Promise} A promise that will resolve to the user stored + * version number. + */ + async getUserVersion(): Promise { + throw new Error("Unimplemented"); + } + + /** + * Set the user stored version to the given version number. + * + * @param {number} version The new version that should be stored in the + * database. + * + * @return {Promise} A promise that will resolve once the new version + * is stored. + */ + async setUserVersion(version: number): Promise { + throw new Error("Unimplemented"); + } + /** * Commit the previously queued up events to the index. *