Skip to content

Instantly share code, notes, and snippets.

@markchristopherng
Created November 19, 2019 05:48
Show Gist options
  • Save markchristopherng/955a07b665bfcdb6afa127a808c70050 to your computer and use it in GitHub Desktop.
Save markchristopherng/955a07b665bfcdb6afa127a808c70050 to your computer and use it in GitHub Desktop.
@Dao
interface PayBillDao {
@Query("SELECT * from saved_bills ORDER BY biller_name")
suspend fun getAll(): List<SavedBill>
@Insert(onConflict = OnConflictStrategy.REPLACE)
suspend fun insert(savedBill: SavedBill)
@Query("DELETE from saved_bills where _id = :id")
suspend fun delete(id: Int)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment