mirror of https://github.com/readrops/Readrops.git
Fix folder and feed check queries returning bad results
This commit is contained in:
parent
c4d00fe2e1
commit
a12dfa6f13
|
@ -29,7 +29,7 @@ public interface FeedDao {
|
|||
@Query("Select case When :feedUrl In (Select url from Feed) Then 'true' else 'false' end")
|
||||
String feedExists(String feedUrl);
|
||||
|
||||
@Query("Select case When remoteId = :remoteId And account_id = :accountId Then 1 else 0 end From Feed")
|
||||
@Query("Select case When :remoteId In (Select remoteId from Feed) And :accountId In (Select account_id From Feed) Then 1 else 0 end")
|
||||
boolean remoteFeedExists(int remoteId, int accountId);
|
||||
|
||||
@Query("Select count(*) from Feed")
|
||||
|
|
|
@ -31,6 +31,6 @@ public interface FolderDao {
|
|||
@Query("Select id From Folder Where remoteId = :remoteId And account_id = :accountId")
|
||||
int getRemoteFolderLocalId(int remoteId, int accountId);
|
||||
|
||||
@Query("Select case When remoteId = :remoteId And account_id = :accountId Then 1 else 0 end From Folder")
|
||||
@Query("Select case When :remoteId In (Select remoteId From Folder) And :accountId In (Select account_id From Folder)Then 1 else 0 end")
|
||||
boolean remoteFolderExists(int remoteId, int accountId);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue