mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 09:43:15 +00:00
Daoクエリ追加
This commit is contained in:
parent
2a7e329ad7
commit
c7f2a3eebe
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user