mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
Dao修正
This commit is contained in:
parent
b87b635d2b
commit
253c77d6f5
|
@ -29,8 +29,8 @@ public interface DocumentDao {
|
||||||
@Query("SELECT * FROM Document WHERE id IN (:ids)")
|
@Query("SELECT * FROM Document WHERE id IN (:ids)")
|
||||||
List<DocumentEntity> findByIds(List<String> ids);
|
List<DocumentEntity> findByIds(List<String> ids);
|
||||||
|
|
||||||
@Query("SELECT * FROM Document WHERE public_path = :publicPath LIMIT :limit")
|
@Query("SELECT * FROM Document WHERE parent_id = :parentId")
|
||||||
List<DocumentEntity> findByPublicPathWithLimit(String publicPath, int limit);
|
List<DocumentEntity> findByParentId(String parentId);
|
||||||
|
|
||||||
@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);
|
||||||
|
|
|
@ -15,11 +15,8 @@ public interface FolderDao {
|
||||||
@Query("SELECT * FROM Folder WHERE id = :id")
|
@Query("SELECT * FROM Folder WHERE id = :id")
|
||||||
FolderEntity findById(String id);
|
FolderEntity findById(String id);
|
||||||
|
|
||||||
@Query("SELECT * FROM Folder WHERE public_path = :publicPath")
|
@Query("SELECT * FROM Folder WHERE parent_id = :parentId")
|
||||||
FolderEntity findByPublicPath(String publicPath);
|
List<FolderEntity> findByParentId(String parentId);
|
||||||
|
|
||||||
@Query("SELECT * FROM Folder WHERE public_path = :publicPath LIMIT :limit")
|
|
||||||
List<FolderEntity> findByPublicPathWithLimit(String publicPath, int limit);
|
|
||||||
|
|
||||||
@Insert
|
@Insert
|
||||||
void insert(FolderEntity folderEntity);
|
void insert(FolderEntity folderEntity);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user