<lambda>null1 import androidx.room.AmbiguousColumnResolver
2 import androidx.room.RoomDatabase
3 import androidx.room.util.performBlocking
4 import androidx.sqlite.SQLiteStatement
5 import java.nio.ByteBuffer
6 import javax.`annotation`.processing.Generated
7 import kotlin.Array
8 import kotlin.Int
9 import kotlin.IntArray
10 import kotlin.String
11 import kotlin.Suppress
12 import kotlin.collections.LinkedHashMap
13 import kotlin.collections.List
14 import kotlin.collections.Map
15 import kotlin.collections.MutableList
16 import kotlin.collections.MutableMap
17 import kotlin.collections.mutableListOf
18 import kotlin.reflect.KClass
19 
20 @Generated(value = ["androidx.room.RoomProcessor"])
21 @Suppress(names = ["UNCHECKED_CAST", "DEPRECATION", "REDUNDANT_PROJECTION", "REMOVAL"])
22 public class MyDao_Impl(
23   __db: RoomDatabase,
24 ) : MyDao {
25   private val __db: RoomDatabase
26   init {
27     this.__db = __db
28   }
29 
30   public override fun getLeftJoinUserNestedMap(): Map<User, Map<Avatar, List<Comment>>> {
31     val _sql: String = "SELECT * FROM User JOIN Avatar ON User.id = Avatar.userId JOIN Comment ON Avatar.userId = Comment.userId"
32     return performBlocking(__db, true, false) { _connection ->
33       val _stmt: SQLiteStatement = _connection.prepare(_sql)
34       try {
35         val _statementIndices: Array<IntArray> = AmbiguousColumnResolver.resolve(_stmt.getColumnNames(), arrayOf(arrayOf("id", "name"), arrayOf("userId", "url", "data"), arrayOf("id", "userId", "text")))
36         val _result: MutableMap<User, MutableMap<Avatar, MutableList<Comment>>> = LinkedHashMap<User, MutableMap<Avatar, MutableList<Comment>>>()
37         while (_stmt.step()) {
38           val _key: User
39           val _tmpId: Int
40           _tmpId = _stmt.getLong(_statementIndices[0][0]).toInt()
41           val _tmpName: String
42           _tmpName = _stmt.getText(_statementIndices[0][1])
43           _key = User(_tmpId,_tmpName)
44           val _values: MutableMap<Avatar, MutableList<Comment>>
45           if (_result.containsKey(_key)) {
46             _values = _result.getValue(_key)
47           } else {
48             _values = LinkedHashMap<Avatar, MutableList<Comment>>()
49             _result.put(_key, _values)
50           }
51           if (_stmt.isNull(_statementIndices[1][0]) && _stmt.isNull(_statementIndices[1][1]) && _stmt.isNull(_statementIndices[1][2])) {
52             continue
53           }
54           val _key_1: Avatar
55           val _tmpUserId: Int
56           _tmpUserId = _stmt.getLong(_statementIndices[1][0]).toInt()
57           val _tmpUrl: String
58           _tmpUrl = _stmt.getText(_statementIndices[1][1])
59           val _tmpData: ByteBuffer
60           _tmpData = ByteBuffer.wrap(_stmt.getBlob(_statementIndices[1][2]))
61           _key_1 = Avatar(_tmpUserId,_tmpUrl,_tmpData)
62           val _values_1: MutableList<Comment>
63           if (_values.containsKey(_key_1)) {
64             _values_1 = _values.getValue(_key_1)
65           } else {
66             _values_1 = mutableListOf()
67             _values.put(_key_1, _values_1)
68           }
69           if (_stmt.isNull(_statementIndices[2][0]) && _stmt.isNull(_statementIndices[2][1]) && _stmt.isNull(_statementIndices[2][2])) {
70             continue
71           }
72           val _value: Comment
73           val _tmpId_1: Int
74           _tmpId_1 = _stmt.getLong(_statementIndices[2][0]).toInt()
75           val _tmpUserId_1: Int
76           _tmpUserId_1 = _stmt.getLong(_statementIndices[2][1]).toInt()
77           val _tmpText: String
78           _tmpText = _stmt.getText(_statementIndices[2][2])
79           _value = Comment(_tmpId_1,_tmpUserId_1,_tmpText)
80           _values_1.add(_value)
81         }
82         _result
83       } finally {
84         _stmt.close()
85       }
86     }
87   }
88 
89   public companion object {
90     public fun getRequiredConverters(): List<KClass<*>> = emptyList()
91   }
92 }
93