<lambda>null1 import androidx.room.RoomDatabase
2 import androidx.room.util.getColumnIndexOrThrow
3 import androidx.room.util.getLastInsertedRowId
4 import androidx.room.util.performBlocking
5 import androidx.sqlite.SQLiteStatement
6 import javax.`annotation`.processing.Generated
7 import kotlin.Int
8 import kotlin.Long
9 import kotlin.String
10 import kotlin.Suppress
11 import kotlin.collections.List
12 import kotlin.reflect.KClass
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
20   init {
21     this.__db = __db
22   }
23 
24   public override fun getEntity(id: Long): MyEntity {
25     val _sql: String = "SELECT * FROM MyEntity WHERE pk = ?"
26     return performBlocking(__db, true, false) { _connection ->
27       val _stmt: SQLiteStatement = _connection.prepare(_sql)
28       try {
29         var _argIndex: Int = 1
30         _stmt.bindLong(_argIndex, id)
31         val _columnIndexOfPk: Int = getColumnIndexOrThrow(_stmt, "pk")
32         val _result: MyEntity
33         if (_stmt.step()) {
34           val _tmpPk: Long
35           _tmpPk = _stmt.getLong(_columnIndexOfPk)
36           _result = MyEntity(_tmpPk)
37         } else {
38           error("The query result was empty, but expected a single row to return a NON-NULL object of type <MyEntity>.")
39         }
40         _result
41       } finally {
42         _stmt.close()
43       }
44     }
45   }
46 
47   public override fun insertEntity(id: Long): Long {
48     val _sql: String = "INSERT INTO MyEntity (pk) VALUES (?)"
49     return performBlocking(__db, false, true) { _connection ->
50       val _stmt: SQLiteStatement = _connection.prepare(_sql)
51       try {
52         var _argIndex: Int = 1
53         _stmt.bindLong(_argIndex, id)
54         _stmt.step()
55         getLastInsertedRowId(_connection)
56       } finally {
57         _stmt.close()
58       }
59     }
60   }
61 
62   public companion object {
63     public fun getRequiredConverters(): List<KClass<*>> = emptyList()
64   }
65 }
66