<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.performBlocking
6 import androidx.sqlite.SQLiteStatement
7 import javax.`annotation`.processing.Generated
8 import kotlin.Array
9 import kotlin.Int
10 import kotlin.Long
11 import kotlin.LongArray
12 import kotlin.String
13 import kotlin.Suppress
14 import kotlin.Unit
15 import kotlin.collections.List
16 import kotlin.collections.MutableList
17 import kotlin.reflect.KClass
18 
19 @Generated(value = ["androidx.room.RoomProcessor"])
20 @Suppress(names = ["UNCHECKED_CAST", "DEPRECATION", "REDUNDANT_PROJECTION", "REMOVAL"])
21 public class MyDao_Impl(
22   __db: RoomDatabase,
23 ) : MyDao {
24   private val __db: RoomDatabase
25 
26   private val __insertAdapterOfMyEntity: EntityInsertAdapter<MyEntity>
27 
28   private val __deleteAdapterOfMyEntity: EntityDeleteOrUpdateAdapter<MyEntity>
29 
30   private val __updateAdapterOfMyEntity: EntityDeleteOrUpdateAdapter<MyEntity>
31 
32   private val __upsertAdapterOfMyEntity: EntityUpsertAdapter<MyEntity>
33   init {
34     this.__db = __db
35     this.__insertAdapterOfMyEntity = object : EntityInsertAdapter<MyEntity>() {
36       protected override fun createQuery(): String =
37           "INSERT OR ABORT INTO `MyEntity` (`pk`,`other`) VALUES (?,?)"
38 
39       protected override fun bind(statement: SQLiteStatement, entity: MyEntity) {
40         statement.bindLong(1, entity.pk.toLong())
41         statement.bindText(2, entity.other)
42       }
43     }
44     this.__deleteAdapterOfMyEntity = object : EntityDeleteOrUpdateAdapter<MyEntity>() {
45       protected override fun createQuery(): String = "DELETE FROM `MyEntity` WHERE `pk` = ?"
46 
47       protected override fun bind(statement: SQLiteStatement, entity: MyEntity) {
48         statement.bindLong(1, entity.pk.toLong())
49       }
50     }
51     this.__updateAdapterOfMyEntity = object : EntityDeleteOrUpdateAdapter<MyEntity>() {
52       protected override fun createQuery(): String =
53           "UPDATE OR ABORT `MyEntity` SET `pk` = ?,`other` = ? WHERE `pk` = ?"
54 
55       protected override fun bind(statement: SQLiteStatement, entity: MyEntity) {
56         statement.bindLong(1, entity.pk.toLong())
57         statement.bindText(2, entity.other)
58         statement.bindLong(3, entity.pk.toLong())
59       }
60     }
61     this.__upsertAdapterOfMyEntity = EntityUpsertAdapter<MyEntity>(object :
62         EntityInsertAdapter<MyEntity>() {
63       protected override fun createQuery(): String =
64           "INSERT INTO `MyEntity` (`pk`,`other`) VALUES (?,?)"
65 
66       protected override fun bind(statement: SQLiteStatement, entity: MyEntity) {
67         statement.bindLong(1, entity.pk.toLong())
68         statement.bindText(2, entity.other)
69       }
70     }, object : EntityDeleteOrUpdateAdapter<MyEntity>() {
71       protected override fun createQuery(): String =
72           "UPDATE `MyEntity` SET `pk` = ?,`other` = ? WHERE `pk` = ?"
73 
74       protected override fun bind(statement: SQLiteStatement, entity: MyEntity) {
75         statement.bindLong(1, entity.pk.toLong())
76         statement.bindText(2, entity.other)
77         statement.bindLong(3, entity.pk.toLong())
78       }
79     })
80   }
81 
82   public override fun insert(entities: Array<MyEntity?>?): MutableList<Long?>? =
83       performBlocking(__db, false, true) { _connection ->
84     val _result: MutableList<Long?>? = __insertAdapterOfMyEntity.insertAndReturnIdsList(_connection, entities)
85     _result
86   }
87 
88   public override fun insertList(entities: MutableList<MyEntity?>?): LongArray? =
89       performBlocking(__db, false, true) { _connection ->
90     val _result: LongArray? = __insertAdapterOfMyEntity.insertAndReturnIdsArray(_connection,
91         entities)
92     _result
93   }
94 
95   public override fun delete(entity: MyEntity?): Unit = performBlocking(__db, false, true) {
96       _connection ->
97     __deleteAdapterOfMyEntity.handle(_connection, entity)
98   }
99 
100   public override fun deleteList(entity: MutableList<MyEntity?>?): Int = performBlocking(__db,
101       false, true) { _connection ->
102     var _result: Int = 0
103     _result += __deleteAdapterOfMyEntity.handleMultiple(_connection, entity)
104     _result
105   }
106 
107   public override fun update(entity: MyEntity?): Unit = performBlocking(__db, false, true) {
108       _connection ->
109     __updateAdapterOfMyEntity.handle(_connection, entity)
110   }
111 
112   public override fun updateList(entity: MutableList<MyEntity?>?): Int = performBlocking(__db,
113       false, true) { _connection ->
114     var _result: Int = 0
115     _result += __updateAdapterOfMyEntity.handleMultiple(_connection, entity)
116     _result
117   }
118 
119   public override fun upsert(entities: Array<MyEntity?>?): MutableList<Long?>? =
120       performBlocking(__db, false, true) { _connection ->
121     val _result: MutableList<Long?>? = __upsertAdapterOfMyEntity.upsertAndReturnIdsList(_connection,
122         entities)
123     _result
124   }
125 
126   public override fun upsertList(entities: MutableList<MyEntity?>?): LongArray? =
127       performBlocking(__db, false, true) { _connection ->
128     val _result: LongArray? = __upsertAdapterOfMyEntity.upsertAndReturnIdsArray(_connection,
129         entities)
130     _result
131   }
132 
133   public companion object {
134     public fun getRequiredConverters(): List<KClass<*>> = emptyList()
135   }
136 }
137