get Notes

@Query(value = "SELECT * FROM " + NOTES_KEY + " WHERE " + AUTHOR_KEY + "=:" + AUTHOR_KEY + " AND " + UPDATE_KEY + " IS NULL ORDER BY " + CREATION_DATE_KEY + " DESC ", nativeQuery = true )
abstract fun getNotes(@Param(value = "author") authorId: String, pageable: Pageable): List<Note>

Method to execute the query to select the list of a Note

Return

the list of notes as List of Note

Parameters

authorId

The author identifier

pageable

The parameters to paginate the query


@Query(value = "SELECT * FROM " + NOTES_KEY + " WHERE " + AUTHOR_KEY + "=:" + AUTHOR_KEY + " AND " + UPDATE_KEY + " IS NULL" + " AND " + MARKED_AS_DONE_KEY + "=:" + MARKED_AS_DONE_KEY + " ORDER BY " + CREATION_DATE_KEY + " DESC ", nativeQuery = true )
abstract fun getNotes(@Param(value = "author") authorId: String, @Param(value = "marked_as_done") markedAsDone: Boolean, pageable: Pageable): List<Note>

Method to execute the query to select the list of a Note

Return

the list of notes as List of Note

Parameters

authorId

The author identifier

pageable

The parameters to paginate the query

markedAsDone

Whether retrieve the notes marked as done or the not ones