KeyValueBasedVersionsRepoProxy

StandardVersionsRepoProxy implementation backed by a KeyValueRepo mapping table names to version numbers. Stores and retrieves per-table version integers using keyValueStore with table names as keys.

Parameters

keyValueStore

KeyValueRepo used to persist table-name-to-version mappings

database

The underlying database or storage object exposed via StandardVersionsRepoProxy.database

Type Parameters

T

The type of the underlying database or storage object

Constructors

Link copied to clipboard
constructor(keyValueStore: KeyValueRepo<String, Int>, database: T)

Properties

Link copied to clipboard
open override val database: T

Functions

Link copied to clipboard
open suspend override fun getTableVersion(tableName: String): Int?

Returns the current version number for the given tableName, or null if no version is stored.

Link copied to clipboard
open suspend override fun updateTableVersion(tableName: String, version: Int)

Persists the given version number for the given tableName.