<lambda>null1 import androidx.room.EntityInsertAdapter
2 import androidx.room.RoomDatabase
3 import androidx.room.util.getColumnIndexOrThrow
4 import androidx.room.util.performBlocking
5 import androidx.sqlite.SQLiteStatement
6 import javax.`annotation`.processing.Generated
7 import kotlin.Byte
8 import kotlin.Char
9 import kotlin.Double
10 import kotlin.Float
11 import kotlin.Int
12 import kotlin.Long
13 import kotlin.Short
14 import kotlin.String
15 import kotlin.Suppress
16 import kotlin.Unit
17 import kotlin.collections.List
18 import kotlin.reflect.KClass
19 
20 @Generated(value = ["androidx.room.RoomProcessor"])
21 @Suppress(names = ["UNCHECKED_CAST", "DEPRECATION", "REDUNDANT_PROJECTION", "REMOVAL"])
22 public class MyDao_Impl(
23   __db: RoomDatabase,
24 ) : MyDao {
25   private val __db: RoomDatabase
26 
27   private val __insertAdapterOfMyEntity: EntityInsertAdapter<MyEntity>
28   init {
29     this.__db = __db
30     this.__insertAdapterOfMyEntity = object : EntityInsertAdapter<MyEntity>() {
31       protected override fun createQuery(): String = "INSERT OR ABORT INTO `MyEntity` (`int`,`short`,`byte`,`long`,`char`,`float`,`double`) VALUES (?,?,?,?,?,?,?)"
32 
33       protected override fun bind(statement: SQLiteStatement, entity: MyEntity) {
34         statement.bindLong(1, entity.int.toLong())
35         statement.bindLong(2, entity.short.toLong())
36         statement.bindLong(3, entity.byte.toLong())
37         statement.bindLong(4, entity.long)
38         statement.bindLong(5, entity.char.toLong())
39         statement.bindDouble(6, entity.float.toDouble())
40         statement.bindDouble(7, entity.double)
41       }
42     }
43   }
44 
45   public override fun addEntity(item: MyEntity): Unit = performBlocking(__db, false, true) { _connection ->
46     __insertAdapterOfMyEntity.insert(_connection, item)
47   }
48 
49   public override fun getEntity(): MyEntity {
50     val _sql: String = "SELECT * FROM MyEntity"
51     return performBlocking(__db, true, false) { _connection ->
52       val _stmt: SQLiteStatement = _connection.prepare(_sql)
53       try {
54         val _columnIndexOfInt: Int = getColumnIndexOrThrow(_stmt, "int")
55         val _columnIndexOfShort: Int = getColumnIndexOrThrow(_stmt, "short")
56         val _columnIndexOfByte: Int = getColumnIndexOrThrow(_stmt, "byte")
57         val _columnIndexOfLong: Int = getColumnIndexOrThrow(_stmt, "long")
58         val _columnIndexOfChar: Int = getColumnIndexOrThrow(_stmt, "char")
59         val _columnIndexOfFloat: Int = getColumnIndexOrThrow(_stmt, "float")
60         val _columnIndexOfDouble: Int = getColumnIndexOrThrow(_stmt, "double")
61         val _result: MyEntity
62         if (_stmt.step()) {
63           val _tmpInt: Int
64           _tmpInt = _stmt.getLong(_columnIndexOfInt).toInt()
65           val _tmpShort: Short
66           _tmpShort = _stmt.getLong(_columnIndexOfShort).toShort()
67           val _tmpByte: Byte
68           _tmpByte = _stmt.getLong(_columnIndexOfByte).toByte()
69           val _tmpLong: Long
70           _tmpLong = _stmt.getLong(_columnIndexOfLong)
71           val _tmpChar: Char
72           _tmpChar = _stmt.getLong(_columnIndexOfChar).toChar()
73           val _tmpFloat: Float
74           _tmpFloat = _stmt.getDouble(_columnIndexOfFloat).toFloat()
75           val _tmpDouble: Double
76           _tmpDouble = _stmt.getDouble(_columnIndexOfDouble)
77           _result = MyEntity(_tmpInt,_tmpShort,_tmpByte,_tmpLong,_tmpChar,_tmpFloat,_tmpDouble)
78         } else {
79           error("The query result was empty, but expected a single row to return a NON-NULL object of type <MyEntity>.")
80         }
81         _result
82       } finally {
83         _stmt.close()
84       }
85     }
86   }
87 
88   public companion object {
89     public fun getRequiredConverters(): List<KClass<*>> = emptyList()
90   }
91 }
92