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.
B. A method in a Dao annotated class as a query method.
C. A method in a RoomDatabase class as a query method.
What is demonstrated by the code below? // RawDao.kt @Dao interface RawDao { @RawQuery fun getUserViaQuery(query: Suppor
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
What is demonstrated by the code below? // RawDao.kt @Dao interface RawDao { @RawQuery fun getUserViaQuery(query: Suppor
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!