moving more db related functions to Room

This commit is contained in:
tibbi
2018-11-07 20:12:07 +01:00
parent 95ab889045
commit 43896a964a
5 changed files with 26 additions and 27 deletions

View File

@ -11,6 +11,9 @@ interface NotesDao {
@Query("SELECT * FROM notes WHERE id = :id")
fun getNoteWithId(id: Int): Note?
@Query("SELECT id FROM notes WHERE path = :path")
fun getNoteIdWithPath(path: String): Long?
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun insertOrUpdate(note: Note): Long