<lambda>null1 import androidx.room.RoomDatabase
2 import androidx.room.util.performBlocking
3 import androidx.sqlite.SQLiteStatement
4 import javax.`annotation`.processing.Generated
5 import kotlin.Int
6 import kotlin.String
7 import kotlin.Suppress
8 import kotlin.collections.List
9 import kotlin.reflect.KClass
10 
11 @Generated(value = ["androidx.room.RoomProcessor"])
12 @Suppress(names = ["UNCHECKED_CAST", "DEPRECATION", "REDUNDANT_PROJECTION", "REMOVAL"])
13 public class MyDao_Impl(
14   __db: RoomDatabase,
15 ) : MyDao {
16   private val __db: RoomDatabase
17   init {
18     this.__db = __db
19   }
20 
21   public override fun count(): Int {
22     val _sql: String = "SELECT count(*) FROM MyEntity"
23     return performBlocking(__db, true, false) { _connection ->
24       val _stmt: SQLiteStatement = _connection.prepare(_sql)
25       try {
26         val _result: Int
27         if (_stmt.step()) {
28           _result = _stmt.getLong(0).toInt()
29         } else {
30           _result = 0
31         }
32         _result
33       } finally {
34         _stmt.close()
35       }
36     }
37   }
38 
39   public override fun text(): String {
40     val _sql: String = "SELECT 'Tom' FROM MyEntity LIMIT 1"
41     return performBlocking(__db, true, false) { _connection ->
42       val _stmt: SQLiteStatement = _connection.prepare(_sql)
43       try {
44         val _result: String
45         if (_stmt.step()) {
46           val _tmp: String
47           _tmp = _stmt.getText(0)
48           _result = _tmp
49         } else {
50           error("The query result was empty, but expected a single row to return a NON-NULL object of type <kotlin.String>.")
51         }
52         _result
53       } finally {
54         _stmt.close()
55       }
56     }
57   }
58 
59   public override fun nullableText(): String? {
60     val _sql: String = "SELECT 'Tom' FROM MyEntity LIMIT 1"
61     return performBlocking(__db, true, false) { _connection ->
62       val _stmt: SQLiteStatement = _connection.prepare(_sql)
63       try {
64         val _result: String?
65         if (_stmt.step()) {
66           val _tmp: String?
67           if (_stmt.isNull(0)) {
68             _tmp = null
69           } else {
70             _tmp = _stmt.getText(0)
71           }
72           _result = _tmp
73         } else {
74           _result = null
75         }
76         _result
77       } finally {
78         _stmt.close()
79       }
80     }
81   }
82 
83   public companion object {
84     public fun getRequiredConverters(): List<KClass<*>> = emptyList()
85   }
86 }
87