1 import androidx.lifecycle.LiveData
2 import androidx.room.RoomDatabase
3 import androidx.room.util.appendPlaceholders
4 import androidx.room.util.getColumnIndexOrThrow
5 import androidx.sqlite.SQLiteStatement
6 import javax.`annotation`.processing.Generated
7 import kotlin.Int
8 import kotlin.String
9 import kotlin.Suppress
10 import kotlin.collections.List
11 import kotlin.reflect.KClass
12 import kotlin.text.StringBuilder
13 
14 @Generated(value = ["androidx.room.RoomProcessor"])
15 @Suppress(names = ["UNCHECKED_CAST", "DEPRECATION", "REDUNDANT_PROJECTION", "REMOVAL"])
16 public class MyDao_Impl(
17   __db: RoomDatabase,
18 ) : MyDao {
19   private val __db: RoomDatabase
<lambda>null20   init {
21     this.__db = __db
22   }
23 
getLiveDatanull24   public override fun getLiveData(vararg arg: String?): LiveData<MyEntity> {
25     val _stringBuilder: StringBuilder = StringBuilder()
26     _stringBuilder.append("SELECT * FROM MyEntity WHERE pk IN (")
27     val _inputSize: Int = arg.size
28     appendPlaceholders(_stringBuilder, _inputSize)
29     _stringBuilder.append(")")
30     val _sql: String = _stringBuilder.toString()
31     return __db.invalidationTracker.createLiveData(arrayOf("MyEntity"), false) { _connection ->
32       val _stmt: SQLiteStatement = _connection.prepare(_sql)
33       try {
34         var _argIndex: Int = 1
35         for (_item: String? in arg) {
36           if (_item == null) {
37             _stmt.bindNull(_argIndex)
38           } else {
39             _stmt.bindText(_argIndex, _item)
40           }
41           _argIndex++
42         }
43         val _columnIndexOfPk: Int = getColumnIndexOrThrow(_stmt, "pk")
44         val _columnIndexOfOther: Int = getColumnIndexOrThrow(_stmt, "other")
45         val _result: MyEntity?
46         if (_stmt.step()) {
47           val _tmpPk: Int
48           _tmpPk = _stmt.getLong(_columnIndexOfPk).toInt()
49           val _tmpOther: String
50           _tmpOther = _stmt.getText(_columnIndexOfOther)
51           _result = MyEntity(_tmpPk,_tmpOther)
52         } else {
53           _result = null
54         }
55         _result
56       } finally {
57         _stmt.close()
58       }
59     }
60   }
61 
getLiveDataNullablenull62   public override fun getLiveDataNullable(vararg arg: String?): LiveData<MyEntity?> {
63     val _stringBuilder: StringBuilder = StringBuilder()
64     _stringBuilder.append("SELECT * FROM MyEntity WHERE pk IN (")
65     val _inputSize: Int = arg.size
66     appendPlaceholders(_stringBuilder, _inputSize)
67     _stringBuilder.append(")")
68     val _sql: String = _stringBuilder.toString()
69     return __db.invalidationTracker.createLiveData(arrayOf("MyEntity"), false) { _connection ->
70       val _stmt: SQLiteStatement = _connection.prepare(_sql)
71       try {
72         var _argIndex: Int = 1
73         for (_item: String? in arg) {
74           if (_item == null) {
75             _stmt.bindNull(_argIndex)
76           } else {
77             _stmt.bindText(_argIndex, _item)
78           }
79           _argIndex++
80         }
81         val _columnIndexOfPk: Int = getColumnIndexOrThrow(_stmt, "pk")
82         val _columnIndexOfOther: Int = getColumnIndexOrThrow(_stmt, "other")
83         val _result: MyEntity?
84         if (_stmt.step()) {
85           val _tmpPk: Int
86           _tmpPk = _stmt.getLong(_columnIndexOfPk).toInt()
87           val _tmpOther: String
88           _tmpOther = _stmt.getText(_columnIndexOfOther)
89           _result = MyEntity(_tmpPk,_tmpOther)
90         } else {
91           _result = null
92         }
93         _result
94       } finally {
95         _stmt.close()
96       }
97     }
98   }
99 
100   public companion object {
getRequiredConvertersnull101     public fun getRequiredConverters(): List<KClass<*>> = emptyList()
102   }
103 }
104