Skip to content
Snippets Groups Projects
Commit c94e2ba7 authored by Rinaldy Adin's avatar Rinaldy Adin
Browse files

fix: sort by timestamp descending

parent b063e043
Branches
Tags
1 merge request!19Feat/twibbon
...@@ -22,10 +22,10 @@ interface TransactionDAO { ...@@ -22,10 +22,10 @@ interface TransactionDAO {
@Query("DELETE FROM transactions") @Query("DELETE FROM transactions")
suspend fun deleteAll() suspend fun deleteAll()
@Query("SELECT * FROM transactions WHERE email = :email") @Query("SELECT * FROM transactions WHERE email = :email ORDER BY timestamp DESC")
fun getAllObservable(vararg email: String): LiveData<List<Transaction>> fun getAllObservable(vararg email: String): LiveData<List<Transaction>>
@Query("SELECT * FROM transactions WHERE email = :email") @Query("SELECT * FROM transactions WHERE email = :email ORDER BY timestamp DESC")
suspend fun getAll(vararg email: String): List<Transaction> suspend fun getAll(vararg email: String): List<Transaction>
@Query("SELECT * FROM transactions WHERE id = :id") @Query("SELECT * FROM transactions WHERE id = :id")
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment