<lambda>null1 import androidx.room.EntityDeleteOrUpdateAdapter
2 import androidx.room.EntityInsertAdapter
3 import androidx.room.EntityUpsertAdapter
4 import androidx.room.RoomDatabase
5 import androidx.room.util.performSuspending
6 import androidx.sqlite.SQLiteStatement
7 import javax.`annotation`.processing.Generated
8 import kotlin.Int
9 import kotlin.Long
10 import kotlin.String
11 import kotlin.Suppress
12 import kotlin.collections.List
13 import kotlin.reflect.KClass
14 
15 @Generated(value = ["androidx.room.RoomProcessor"])
16 @Suppress(names = ["UNCHECKED_CAST", "DEPRECATION", "REDUNDANT_PROJECTION", "REMOVAL"])
17 public class MyDao_Impl(
18   __db: RoomDatabase,
19 ) : MyDao {
20   private val __db: RoomDatabase
21 
22   private val __insertAdapterOfMyEntity: EntityInsertAdapter<MyEntity>
23 
24   private val __deleteAdapterOfMyEntity: EntityDeleteOrUpdateAdapter<MyEntity>
25 
26   private val __updateAdapterOfMyEntity: EntityDeleteOrUpdateAdapter<MyEntity>
27 
28   private val __upsertAdapterOfMyEntity: EntityUpsertAdapter<MyEntity>
29   init {
30     this.__db = __db
31     this.__insertAdapterOfMyEntity = object : EntityInsertAdapter<MyEntity>() {
32       protected override fun createQuery(): String = "INSERT OR ABORT INTO `MyEntity` (`pk`,`other`) VALUES (?,?)"
33 
34       protected override fun bind(statement: SQLiteStatement, entity: MyEntity) {
35         statement.bindLong(1, entity.pk.toLong())
36         statement.bindText(2, entity.other)
37       }
38     }
39     this.__deleteAdapterOfMyEntity = object : EntityDeleteOrUpdateAdapter<MyEntity>() {
40       protected override fun createQuery(): String = "DELETE FROM `MyEntity` WHERE `pk` = ?"
41 
42       protected override fun bind(statement: SQLiteStatement, entity: MyEntity) {
43         statement.bindLong(1, entity.pk.toLong())
44       }
45     }
46     this.__updateAdapterOfMyEntity = object : EntityDeleteOrUpdateAdapter<MyEntity>() {
47       protected override fun createQuery(): String = "UPDATE OR ABORT `MyEntity` SET `pk` = ?,`other` = ? WHERE `pk` = ?"
48 
49       protected override fun bind(statement: SQLiteStatement, entity: MyEntity) {
50         statement.bindLong(1, entity.pk.toLong())
51         statement.bindText(2, entity.other)
52         statement.bindLong(3, entity.pk.toLong())
53       }
54     }
55     this.__upsertAdapterOfMyEntity = EntityUpsertAdapter<MyEntity>(object : EntityInsertAdapter<MyEntity>() {
56       protected override fun createQuery(): String = "INSERT INTO `MyEntity` (`pk`,`other`) VALUES (?,?)"
57 
58       protected override fun bind(statement: SQLiteStatement, entity: MyEntity) {
59         statement.bindLong(1, entity.pk.toLong())
60         statement.bindText(2, entity.other)
61       }
62     }, object : EntityDeleteOrUpdateAdapter<MyEntity>() {
63       protected override fun createQuery(): String = "UPDATE `MyEntity` SET `pk` = ?,`other` = ? WHERE `pk` = ?"
64 
65       protected override fun bind(statement: SQLiteStatement, entity: MyEntity) {
66         statement.bindLong(1, entity.pk.toLong())
67         statement.bindText(2, entity.other)
68         statement.bindLong(3, entity.pk.toLong())
69       }
70     })
71   }
72 
73   public override suspend fun insert(vararg entities: MyEntity): List<Long> = performSuspending(__db, false, true) { _connection ->
74     val _result: List<Long> = __insertAdapterOfMyEntity.insertAndReturnIdsList(_connection, entities)
75     _result
76   }
77 
78   public override suspend fun delete(entity: MyEntity): Int = performSuspending(__db, false, true) { _connection ->
79     var _result: Int = 0
80     _result += __deleteAdapterOfMyEntity.handle(_connection, entity)
81     _result
82   }
83 
84   public override suspend fun update(entity: MyEntity): Int = performSuspending(__db, false, true) { _connection ->
85     var _result: Int = 0
86     _result += __updateAdapterOfMyEntity.handle(_connection, entity)
87     _result
88   }
89 
90   public override suspend fun upsert(vararg entities: MyEntity): List<Long> = performSuspending(__db, false, true) { _connection ->
91     val _result: List<Long> = __upsertAdapterOfMyEntity.upsertAndReturnIdsList(_connection, entities)
92     _result
93   }
94 
95   public companion object {
96     public fun getRequiredConverters(): List<KClass<*>> = emptyList()
97   }
98 }
99