PersistentDatabase

internal abstract class PersistentDatabase : RoomDatabase(source)

Main Room database containing generated images, downloaded models, and app statistics.

Schema version 12 adds NetworkUsageEntity so traffic counters survive process restarts and can be observed by the standalone network usage screen.

Author

Dmitriy Moroz

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Provides the companion object singleton used by the SDAI storage layer.

Properties

Link copied to clipboard
internal expect val closeBarrier: CloseBarrier
Link copied to clipboard
Link copied to clipboard
internal expect val requiredTypeConverterClassesMap: Map<KClass<*>, List<KClass<*>>>

Functions

Link copied to clipboard
internal expect fun addTypeConverter(kclass: KClass<*>, converter: Any)
Link copied to clipboard

Executes the benchmarkResultDao step in the SDAI storage layer.

Link copied to clipboard
expect fun close()
Link copied to clipboard
Link copied to clipboard
protected expect abstract fun createInvalidationTracker(): InvalidationTracker
Link copied to clipboard
Link copied to clipboard

Executes the generationResultDao step in the SDAI storage layer.

Link copied to clipboard
expect fun getCoroutineScope(): CoroutineScope
Link copied to clipboard
Link copied to clipboard

Executes the huggingFaceModelDao step in the SDAI storage layer.

Link copied to clipboard
internal expect fun init(configuration: DatabaseConfiguration)
Link copied to clipboard

Executes the localModelDao step in the SDAI storage layer.

Link copied to clipboard

Returns the DAO used to persist and observe network traffic counters.

Link copied to clipboard
abstract fun supporterDao(): SupporterDao

Executes the supporterDao step in the SDAI storage layer.

Link copied to clipboard
expect suspend fun <R> useConnection(isReadOnly: Boolean, block: suspend (Transactor) -> R): R