Add clarification parenthesis in `getEventOrTaskWithId` logic

This commit is contained in:
Naveen 2022-06-26 19:28:48 +05:30
parent 575913cc35
commit 60740456a7
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ interface EventsDao {
@Query("SELECT * FROM events WHERE id = :id AND type = $TYPE_TASK")
fun getTaskWithId(id: Long): Event?
@Query("SELECT * FROM events WHERE id = :id AND type = $TYPE_EVENT OR type = $TYPE_TASK")
@Query("SELECT * FROM events WHERE id = :id AND (type = $TYPE_EVENT OR type = $TYPE_TASK)")
fun getEventOrTaskWithId(id: Long): Event?
@Query("SELECT * FROM events WHERE import_id = :importId AND type = $TYPE_EVENT")