Solved

What Is Demonstrated by the Code Below

Question 48

Multiple Choice

What is demonstrated by the code below?
// RawDao.kt @Dao interface RawDao {
   @RawQuery   
fun getUserViaQuery(query: SupportSQLiteQuery?) : User?
}
// Usage of RawDao
...
val query =    
 SimpleSQLiteQuery("SELECT * FROM User WHERE id = ? LIMIT 1",       
arrayOf<Any>(sortBy) )
val user = rawDao.getUserViaQuery(query)
...


A) A method in a Dao annotated class as a raw query method where you can pass the query as a SupportSQLiteQuery . A method in a Dao annotated class as a raw query method where you can pass the query as a SupportSQLiteQuery .
B) A method in a Dao annotated class as a query method.
C) A method in a RoomDatabase class as a query method. A method in a RoomDatabase class as a query method.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents