I\'m trying to make a @Query function in my @Dao interface which has a boolean parameter, isAsc to determine the order:
@Query
@Dao
isAsc
@Q
Create two queries, one with ASC and one with DESC.
@Query("SELECT * FROM Persons ORDER BY last_name ASC") List getPersonsSortByAscLastName(); @Query("SELECT * FROM Persons ORDER BY last_name DESC") List getPersonsSortByDescLastName();