<lambda>null1 import androidx.room.EntityDeleteOrUpdateAdapter
2 import androidx.room.RoomDatabase
3 import androidx.room.util.performBlocking
4 import androidx.sqlite.SQLiteStatement
5 import javax.`annotation`.processing.Generated
6 import kotlin.Int
7 import kotlin.String
8 import kotlin.Suppress
9 import kotlin.Unit
10 import kotlin.collections.List
11 import kotlin.reflect.KClass
12 
13 @Generated(value = ["androidx.room.RoomProcessor"])
14 @Suppress(names = ["UNCHECKED_CAST", "DEPRECATION", "REDUNDANT_PROJECTION", "REMOVAL"])
15 public class MyDao_Impl(
16   __db: RoomDatabase,
17 ) : MyDao {
18   private val __db: RoomDatabase
19 
20   private val __deleteAdapterOfMyEntity: EntityDeleteOrUpdateAdapter<MyEntity>
21 
22   private val __updateAdapterOfMyEntity: EntityDeleteOrUpdateAdapter<MyEntity>
23   init {
24     this.__db = __db
25     this.__deleteAdapterOfMyEntity = object : EntityDeleteOrUpdateAdapter<MyEntity>() {
26       protected override fun createQuery(): String = "DELETE FROM `MyEntity` WHERE `pk` = ?"
27 
28       protected override fun bind(statement: SQLiteStatement, entity: MyEntity) {
29         statement.bindLong(1, entity.pk)
30       }
31     }
32     this.__updateAdapterOfMyEntity = object : EntityDeleteOrUpdateAdapter<MyEntity>() {
33       protected override fun createQuery(): String = "UPDATE OR ABORT `MyEntity` SET `pk` = ?,`data` = ? WHERE `pk` = ?"
34 
35       protected override fun bind(statement: SQLiteStatement, entity: MyEntity) {
36         statement.bindLong(1, entity.pk)
37         statement.bindText(2, entity.data)
38         statement.bindLong(3, entity.pk)
39       }
40     }
41   }
42 
43   public override fun deleteEntity(item: MyEntity): Unit = performBlocking(__db, false, true) { _connection ->
44     __deleteAdapterOfMyEntity.handle(_connection, item)
45   }
46 
47   public override fun deleteEntityAndReturnCount(item: MyEntity): Int = performBlocking(__db, false, true) { _connection ->
48     var _result: Int = 0
49     _result += __deleteAdapterOfMyEntity.handle(_connection, item)
50     _result
51   }
52 
53   public override fun updateEntity(item: MyEntity): Unit = performBlocking(__db, false, true) { _connection ->
54     __updateAdapterOfMyEntity.handle(_connection, item)
55   }
56 
57   public override fun updateEntityAndReturnCount(item: MyEntity): Int = performBlocking(__db, false, true) { _connection ->
58     var _result: Int = 0
59     _result += __updateAdapterOfMyEntity.handle(_connection, item)
60     _result
61   }
62 
63   public companion object {
64     public fun getRequiredConverters(): List<KClass<*>> = emptyList()
65   }
66 }
67