mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-02 11:37:37 +00:00
Daoクエリ追加
This commit is contained in:
2 files changed
+6
No files matched your search
@@ -32,6 +32,9 @@ public interface DocumentDao {
|
|||||||
@Query("SELECT * FROM Document WHERE parent_id = :parentId")
|
@Query("SELECT * FROM Document WHERE parent_id = :parentId")
|
||||||
List<DocumentEntity> findByParentId(String parentId);
|
List<DocumentEntity> findByParentId(String parentId);
|
||||||
|
|
||||||
|
@Query("SELECT * FROM Document WHERE parent_id IS NULL")
|
||||||
|
List<DocumentEntity> findRootDocuments();
|
||||||
|
|
||||||
@Query("SELECT * FROM Document ORDER BY created_at DESC LIMIT :limit")
|
@Query("SELECT * FROM Document ORDER BY created_at DESC LIMIT :limit")
|
||||||
List<DocumentEntity> getRecentDocument(int limit);
|
List<DocumentEntity> getRecentDocument(int limit);
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ public interface FolderDao {
|
|||||||
@Query("SELECT * FROM Folder WHERE parent_id = :parentId")
|
@Query("SELECT * FROM Folder WHERE parent_id = :parentId")
|
||||||
List<FolderEntity> findByParentId(String parentId);
|
List<FolderEntity> findByParentId(String parentId);
|
||||||
|
|
||||||
|
@Query("SELECT * FROM Folder WHERE parent_id IS NULL")
|
||||||
|
List<FolderEntity> findRootFolders();
|
||||||
|
|
||||||
@Insert
|
@Insert
|
||||||
void insert(FolderEntity folderEntity);
|
void insert(FolderEntity folderEntity);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user