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