Improved read only folder support

This commit is contained in:
M66B
2019-07-07 09:25:52 +02:00
parent beba3b3815
commit 9e5ccb28b9
12 changed files with 63 additions and 45 deletions

View File

@@ -30,8 +30,9 @@ import java.util.List;
public interface DaoFolder {
@Query("SELECT * FROM folder" +
" WHERE account = :account" +
" AND (NOT :writable OR NOT read_only)" +
" AND (NOT :selectable OR selectable)")
List<EntityFolder> getFolders(long account, boolean selectable);
List<EntityFolder> getFolders(long account, boolean writable, boolean selectable);
@Query("SELECT folder.*" +
", account.id AS accountId, account.`order` AS accountOrder, account.name AS accountName, account.color AS accountColor, account.state AS accountState" +