<lambda>null1 import androidx.room.RoomDatabase
2 import androidx.room.util.getColumnIndexOrThrow
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.collections.List
10 import kotlin.reflect.KClass
11 
12 @Generated(value = ["androidx.room.RoomProcessor"])
13 @Suppress(names = ["UNCHECKED_CAST", "DEPRECATION", "REDUNDANT_PROJECTION", "REMOVAL"])
14 public class MyDao_Impl(
15   __db: RoomDatabase,
16 ) : MyDao {
17   private val __db: RoomDatabase
18   init {
19     this.__db = __db
20   }
21 
22   public override fun stringParam(arg: String): MyEntity {
23     val _sql: String = "SELECT * FROM MyEntity WHERE string = ?"
24     return performBlocking(__db, true, false) { _connection ->
25       val _stmt: SQLiteStatement = _connection.prepare(_sql)
26       try {
27         var _argIndex: Int = 1
28         _stmt.bindText(_argIndex, arg)
29         val _columnIndexOfString: Int = getColumnIndexOrThrow(_stmt, "string")
30         val _result: MyEntity
31         if (_stmt.step()) {
32           val _tmpString: String
33           _tmpString = _stmt.getText(_columnIndexOfString)
34           _result = MyEntity(_tmpString)
35         } else {
36           error("The query result was empty, but expected a single row to return a NON-NULL object of type <MyEntity>.")
37         }
38         _result
39       } finally {
40         _stmt.close()
41       }
42     }
43   }
44 
45   public override fun nullableStringParam(arg: String?): MyEntity {
46     val _sql: String = "SELECT * FROM MyEntity WHERE string = ?"
47     return performBlocking(__db, true, false) { _connection ->
48       val _stmt: SQLiteStatement = _connection.prepare(_sql)
49       try {
50         var _argIndex: Int = 1
51         if (arg == null) {
52           _stmt.bindNull(_argIndex)
53         } else {
54           _stmt.bindText(_argIndex, arg)
55         }
56         val _columnIndexOfString: Int = getColumnIndexOrThrow(_stmt, "string")
57         val _result: MyEntity
58         if (_stmt.step()) {
59           val _tmpString: String
60           _tmpString = _stmt.getText(_columnIndexOfString)
61           _result = MyEntity(_tmpString)
62         } else {
63           error("The query result was empty, but expected a single row to return a NON-NULL object of type <MyEntity>.")
64         }
65         _result
66       } finally {
67         _stmt.close()
68       }
69     }
70   }
71 
72   public companion object {
73     public fun getRequiredConverters(): List<KClass<*>> = emptyList()
74   }
75 }
76