From 1c3fdf921d2545c5ac312b5333eafba01995dd03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Wed, 17 Jan 2024 12:52:05 +0900 Subject: [PATCH] =?UTF-8?q?Dao=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/one/nem/lacerta/source/database/dao/DocumentDao.java | 3 +++ 1 file changed, 3 insertions(+) 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);