Coverage Summary for Class: NoteRoomDatabase_Impl (com.stslex93.notes.core.database.database)
Class |
Method, %
|
Branch, %
|
Line, %
|
Instruction, %
|
NoteRoomDatabase_Impl |
90.9%
(10/11)
|
|
95.2%
(20/21)
|
NoteRoomDatabase_Impl$createOpenDelegate$_openDelegate$1 |
50%
(4/8)
|
0%
(0/4)
|
16.3%
(8/49)
|
9.7%
(21/216)
|
Total |
73.7%
(14/19)
|
0%
(0/4)
|
40%
(28/70)
|
9.7%
(21/216)
|
package com.stslex93.notes.core.database.database
import androidx.room.InvalidationTracker
import androidx.room.RoomOpenDelegate
import androidx.room.migration.AutoMigrationSpec
import androidx.room.migration.Migration
import androidx.room.util.TableInfo
import androidx.room.util.TableInfo.Companion.read
import androidx.room.util.dropFtsSyncTriggers
import androidx.sqlite.SQLiteConnection
import androidx.sqlite.execSQL
import com.stslex93.notes.core.database.label.LabelDao
import com.stslex93.notes.core.database.label.LabelDao_Impl
import com.stslex93.notes.core.database.note.NoteDao
import com.stslex93.notes.core.database.note.NoteDao_Impl
import javax.`annotation`.processing.Generated
import kotlin.Lazy
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.collections.MutableList
import kotlin.collections.MutableMap
import kotlin.collections.MutableSet
import kotlin.collections.Set
import kotlin.collections.mutableListOf
import kotlin.collections.mutableMapOf
import kotlin.collections.mutableSetOf
import kotlin.reflect.KClass
@Generated(value = ["androidx.room.RoomProcessor"])
@Suppress(names = ["UNCHECKED_CAST", "DEPRECATION", "REDUNDANT_PROJECTION", "REMOVAL"])
public class NoteRoomDatabase_Impl : NoteRoomDatabase() {
private val _noteDao: Lazy<NoteDao> = lazy {
NoteDao_Impl(this)
}
public override val noteDao: NoteDao
get() = _noteDao.value
private val _labelDao: Lazy<LabelDao> = lazy {
LabelDao_Impl(this)
}
public override val labelDao: LabelDao
get() = _labelDao.value
protected override fun createOpenDelegate(): RoomOpenDelegate {
val _openDelegate: RoomOpenDelegate = object : RoomOpenDelegate(1,
"b3bde1daf05e319c00abbbbdffb31382", "1d2997d19ed2b80705fa11ce4974fdb4") {
public override fun createAllTables(connection: SQLiteConnection) {
connection.execSQL("CREATE TABLE IF NOT EXISTS `note_table` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `title` TEXT NOT NULL, `content` TEXT NOT NULL, `timestamp` INTEGER NOT NULL, `labels` TEXT NOT NULL)")
connection.execSQL("CREATE TABLE IF NOT EXISTS `label_table` (`uuid` TEXT NOT NULL, `title` TEXT NOT NULL, `timestamp` TEXT NOT NULL, PRIMARY KEY(`uuid`))")
connection.execSQL("CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)")
connection.execSQL("INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'b3bde1daf05e319c00abbbbdffb31382')")
}
public override fun dropAllTables(connection: SQLiteConnection) {
connection.execSQL("DROP TABLE IF EXISTS `note_table`")
connection.execSQL("DROP TABLE IF EXISTS `label_table`")
}
public override fun onCreate(connection: SQLiteConnection) {
}
public override fun onOpen(connection: SQLiteConnection) {
internalInitInvalidationTracker(connection)
}
public override fun onPreMigrate(connection: SQLiteConnection) {
dropFtsSyncTriggers(connection)
}
public override fun onPostMigrate(connection: SQLiteConnection) {
}
public override fun onValidateSchema(connection: SQLiteConnection):
RoomOpenDelegate.ValidationResult {
val _columnsNoteTable: MutableMap<String, TableInfo.Column> = mutableMapOf()
_columnsNoteTable.put("id", TableInfo.Column("id", "INTEGER", true, 1, null,
TableInfo.CREATED_FROM_ENTITY))
_columnsNoteTable.put("title", TableInfo.Column("title", "TEXT", true, 0, null,
TableInfo.CREATED_FROM_ENTITY))
_columnsNoteTable.put("content", TableInfo.Column("content", "TEXT", true, 0, null,
TableInfo.CREATED_FROM_ENTITY))
_columnsNoteTable.put("timestamp", TableInfo.Column("timestamp", "INTEGER", true, 0, null,
TableInfo.CREATED_FROM_ENTITY))
_columnsNoteTable.put("labels", TableInfo.Column("labels", "TEXT", true, 0, null,
TableInfo.CREATED_FROM_ENTITY))
val _foreignKeysNoteTable: MutableSet<TableInfo.ForeignKey> = mutableSetOf()
val _indicesNoteTable: MutableSet<TableInfo.Index> = mutableSetOf()
val _infoNoteTable: TableInfo = TableInfo("note_table", _columnsNoteTable,
_foreignKeysNoteTable, _indicesNoteTable)
val _existingNoteTable: TableInfo = read(connection, "note_table")
if (!_infoNoteTable.equals(_existingNoteTable)) {
return RoomOpenDelegate.ValidationResult(false, """
|note_table(com.stslex93.notes.core.database.note.NoteEntity).
| Expected:
|""".trimMargin() + _infoNoteTable + """
|
| Found:
|""".trimMargin() + _existingNoteTable)
}
val _columnsLabelTable: MutableMap<String, TableInfo.Column> = mutableMapOf()
_columnsLabelTable.put("uuid", TableInfo.Column("uuid", "TEXT", true, 1, null,
TableInfo.CREATED_FROM_ENTITY))
_columnsLabelTable.put("title", TableInfo.Column("title", "TEXT", true, 0, null,
TableInfo.CREATED_FROM_ENTITY))
_columnsLabelTable.put("timestamp", TableInfo.Column("timestamp", "TEXT", true, 0, null,
TableInfo.CREATED_FROM_ENTITY))
val _foreignKeysLabelTable: MutableSet<TableInfo.ForeignKey> = mutableSetOf()
val _indicesLabelTable: MutableSet<TableInfo.Index> = mutableSetOf()
val _infoLabelTable: TableInfo = TableInfo("label_table", _columnsLabelTable,
_foreignKeysLabelTable, _indicesLabelTable)
val _existingLabelTable: TableInfo = read(connection, "label_table")
if (!_infoLabelTable.equals(_existingLabelTable)) {
return RoomOpenDelegate.ValidationResult(false, """
|label_table(com.stslex93.notes.core.database.label.LabelEntity).
| Expected:
|""".trimMargin() + _infoLabelTable + """
|
| Found:
|""".trimMargin() + _existingLabelTable)
}
return RoomOpenDelegate.ValidationResult(true, null)
}
}
return _openDelegate
}
protected override fun createInvalidationTracker(): InvalidationTracker {
val _shadowTablesMap: MutableMap<String, String> = mutableMapOf()
val _viewTables: MutableMap<String, Set<String>> = mutableMapOf()
return InvalidationTracker(this, _shadowTablesMap, _viewTables, "note_table", "label_table")
}
public override fun clearAllTables() {
super.performClear(false, "note_table", "label_table")
}
protected override fun getRequiredTypeConverterClasses(): Map<KClass<*>, List<KClass<*>>> {
val _typeConvertersMap: MutableMap<KClass<*>, List<KClass<*>>> = mutableMapOf()
_typeConvertersMap.put(NoteDao::class, NoteDao_Impl.getRequiredConverters())
_typeConvertersMap.put(LabelDao::class, LabelDao_Impl.getRequiredConverters())
return _typeConvertersMap
}
public override fun getRequiredAutoMigrationSpecClasses(): Set<KClass<out AutoMigrationSpec>> {
val _autoMigrationSpecsSet: MutableSet<KClass<out AutoMigrationSpec>> = mutableSetOf()
return _autoMigrationSpecsSet
}
public override
fun createAutoMigrations(autoMigrationSpecs: Map<KClass<out AutoMigrationSpec>, AutoMigrationSpec>):
List<Migration> {
val _autoMigrations: MutableList<Migration> = mutableListOf()
return _autoMigrations
}
}