What do you want from Room when you create a DAO method and annotate it with @Delete? Example: @Dao interface MyDao { @D

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

What do you want from Room when you create a DAO method and annotate it with @Delete? Example: @Dao interface MyDao { @D

Post by answerhappygod »

What do you want from Room when you create a DAO method and annotate it with @Delete?
Example:
@Dao
interface MyDao {
@Delete
fun deleteUsers(vararg users: User)
}

A. Room generates an implementation that inserts all parameters into the database in a single transaction.
B. Room modifies a set of entities, given as parameters, in the database. It uses a query that matches against the primary key of each entity.
C. Room removes a set of entities, given as parameters, from the database. It uses the primary keys to find the entities to delete.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!

This topic has 1 reply

You must be a registered member and logged in to view the replies in this topic.


Register Login
 
Post Reply