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:
Verified
Q43: As an example. Our MutableLiveData<Long> object, named
Q44: About queries in DAO classes. Room verifies
Q45: Relative positioning is one of the basic
Q46: In application theme style, flag windowNoTitle (<item
Q47: @Query is the main annotation used in
Q49: For example, we have a BufferedReader reader,
Q50: LiveData.postValue() and LiveData.setValue() methods have some differences.
Q51: Each time your test invokes onView() ,
Q52: A class that you create for managing
Q53: To run a debuggable build variant you
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents