diff --git a/source/src/main/java/one/nem/lacerta/source/database/dao/DocumentDao.java b/source/src/main/java/one/nem/lacerta/source/database/dao/DocumentDao.java index b4d53202..802afb7f 100644 --- a/source/src/main/java/one/nem/lacerta/source/database/dao/DocumentDao.java +++ b/source/src/main/java/one/nem/lacerta/source/database/dao/DocumentDao.java @@ -31,6 +31,9 @@ public interface DocumentDao { @Query("SELECT * FROM Document WHERE public_path = :publicPath LIMIT :limit") List findByPublicPathWithLimit(String publicPath, int limit); + @Query("SELECT * FROM Document ORDER BY created_at DESC LIMIT :limit") + List getRecentDocument(int limit); + // Insert @Insert void insert(DocumentEntity document);