Dao追加

This commit is contained in:
ろむねこ 2024-01-17 12:52:05 +09:00
parent 3be6185c21
commit 1c3fdf921d
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168

View File

@ -31,6 +31,9 @@ public interface DocumentDao {
@Query("SELECT * FROM Document WHERE public_path = :publicPath LIMIT :limit")
List<DocumentEntity> findByPublicPathWithLimit(String publicPath, int limit);
@Query("SELECT * FROM Document ORDER BY created_at DESC LIMIT :limit")
List<DocumentEntity> getRecentDocument(int limit);
// Insert
@Insert
void insert(DocumentEntity document);