Reputation: 874
In Android Room database, e.g. to find all users from table, we can:
@Query(“SELECT * FROM Users”)
fun getUsers(): List<User>
But can we get smthing without plain SQL code SELECT * FROM Users
?
In Spring Framework we can, e.g.:
fun findAllUsers(): List<User>
And then we got all necessary users, without SQL code in annotation, but with annotation also can.
The question is: can we get something WITHOUT @Query
annotation?
Upvotes: 1
Views: 543
Reputation: 1007534
But can we get smthing without plain SQL code SELECT * FROM Users ?
No.
can we get something WITHOUT @Query annotation?
Also no.
Upvotes: 2