We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd1f0ec commit 16c791aCopy full SHA for 16c791a
app/src/main/java/com/hackware/mormont/notebook/db/dao/NotesDataDao.kt
@@ -7,13 +7,13 @@ import com.hackware.mormont.notebook.db.entity.NotesData
7
@Dao
8
interface NotesDataDao{
9
10
- @Query("SELECT * from NotesData")
+ @Query("SELECT * from NotesData Order by created_date DESC ")
11
fun getAll() : List<NotesData>
12
13
@Query ("SELECT * from NotesData WHERE note_id= :id LIMIT 1")
14
fun loadNoteWithId(id: Long): NotesData
15
16
- @Query("SELECT * FROM NotesData WHERE content LIKE :query")
+ @Query("SELECT * FROM NotesData WHERE (content LIKE :query) or (title Like :query)")
17
fun getNotesForQuery(query: String): LiveData<List<NotesData>>
18
19
@Insert(onConflict = OnConflictStrategy.REPLACE)
0 commit comments