# Package-level declarations

## Types

AndroidSQLStandardVersionsRepoProxy
Link copied to clipboard
class AndroidSQLStandardVersionsRepoProxy (val database: SQLiteOpenHelper ) : StandardVersionsRepoProxy < SQLiteOpenHelper >
KeyValueBasedVersionsRepoProxy
Link copied to clipboard
class KeyValueBasedVersionsRepoProxy < T >(keyValueStore: KeyValueRepo < String , Int >, val database: T ) : StandardVersionsRepoProxy < T >

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.

StandardVersionsRepo
Link copied to clipboard
class StandardVersionsRepo < T >(proxy: StandardVersionsRepoProxy < T >) : VersionsRepo < T >

Standard implementation of VersionsRepo that delegates version storage to a StandardVersionsRepoProxy. On setTableVersion: calls StandardVersionsRepoProxy.database.onCreate if the table has no version yet, then iterates onUpdate for each version step until the target version is reached.

StandardVersionsRepoProxy
Link copied to clipboard
interface StandardVersionsRepoProxy < T > : Repo

Proxy interface providing low-level access to a versioned database T. Implementations store and retrieve per-table version numbers using a backing storage.

VersionsRepo
Link copied to clipboard
interface VersionsRepo < T > : Repo

This interface has been created due to requirement to work with different versions of databases and make some migrations between versions

## Functions

versionsKeyValueRepo
Link copied to clipboard
inline fun < T > Context . versionsKeyValueRepo (database: T ): VersionsRepo < T >

Will create VersionsRepo based on T, but versions will be stored in KeyValueRepo

versionsKeyValueRepoForSQL
Link copied to clipboard
inline fun Context . versionsKeyValueRepoForSQL (database: SQLiteOpenHelper ): VersionsRepo < SQLiteOpenHelper >

Will create VersionsRepo based on SQLiteOpenHelper, but versions will be stored in KeyValueRepo

versionsRepo
Link copied to clipboard
inline fun versionsRepo (database: SQLiteOpenHelper ): VersionsRepo < SQLiteOpenHelper >

Will create VersionsRepo based on SQLiteOpenHelper with table inside of database

inline fun versionsRepo (context: Context , database: SQLiteOpenHelper ): VersionsRepo < SQLiteOpenHelper >

Will create VersionsRepo based on SQLiteOpenHelper, but versions will be stored in KeyValueRepo