DatabaseAdapter

interface DatabaseAdapter

Properties

Link copied to clipboard
abstract val isReady: Boolean

Functions

Link copied to clipboard
abstract fun activate(database: AppDatabase, databaseName: String)
Link copied to clipboard
Link copied to clipboard
abstract suspend fun checkpointWAL()

Forces a WAL checkpoint to consolidate pending changes to the main database file. This should be called before exporting the database to ensure all changes are included.

Link copied to clipboard
abstract fun close()
Link copied to clipboard
abstract fun deactivate()
Link copied to clipboard
abstract suspend fun delete(tableName: String): Int
abstract suspend fun delete(tableName: String, whereClause: String): Int
abstract suspend fun delete(tableName: String, whereClause: String?, whereArgs: Array<Any>?): Int
Link copied to clipboard
abstract fun endTransaction()
Link copied to clipboard
abstract suspend fun execSQL(sql: String)
Link copied to clipboard
abstract fun getCurrentDatabase(): AppDatabase
Link copied to clipboard
abstract fun getDatabaseName(): String
Link copied to clipboard
abstract fun getVersion(): Int
Link copied to clipboard
abstract suspend fun rawQuery(sqlQuery: String, queryArgs: Array<Any>? = null): List<Map<String, String?>>
Link copied to clipboard
abstract suspend fun rawQueryWithTypedValues(sqlQuery: String, queryArgs: Array<Any>? = null): List<Map<String, Any?>>
Link copied to clipboard
abstract fun runInTransaction(block: Runnable)
Link copied to clipboard
abstract suspend fun setForeignKeyConstraintsEnabled(enabled: Boolean)
Link copied to clipboard
Link copied to clipboard
abstract suspend fun <O : CoreObject> upsertObject(o: O, kclass: KClass<O>): HandleAction?