New Year Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

Google Developers Certification - Associate Android Developer (Kotlin and Java Exam) Associate-Android-Developer Question # 11 Topic 2 Discussion

Google Developers Certification - Associate Android Developer (Kotlin and Java Exam) Associate-Android-Developer Question # 11 Topic 2 Discussion

Associate-Android-Developer Exam Topic 2 Question 11 Discussion:
Question #: 11
Topic #: 2

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(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.


Get Premium Associate-Android-Developer Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.