mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 13:47:05 +02:00
Allow converting to OAuth
This commit is contained in:
@@ -150,8 +150,8 @@ public interface DaoAccount {
|
||||
|
||||
@Query("SELECT * FROM account" +
|
||||
" WHERE user = :user" +
|
||||
" AND auth_type = :auth_type")
|
||||
List<EntityAccount> getAccounts(String user, int auth_type);
|
||||
" AND auth_type IN (:auth_type)")
|
||||
List<EntityAccount> getAccounts(String user, int[] auth_type);
|
||||
|
||||
@Query("SELECT * FROM account WHERE `primary`")
|
||||
EntityAccount getPrimaryAccount();
|
||||
@@ -204,8 +204,11 @@ public interface DaoAccount {
|
||||
@Query("UPDATE account SET name = :name WHERE id = :id AND NOT (name IS :name)")
|
||||
int setAccountName(long id, String name);
|
||||
|
||||
@Query("UPDATE account SET password = :password WHERE id = :id AND NOT (password IS :password)")
|
||||
int setAccountPassword(long id, String password);
|
||||
@Query("UPDATE account" +
|
||||
" SET password = :password, auth_type = :auth_type" +
|
||||
" WHERE id = :id" +
|
||||
" AND NOT (password IS :password AND auth_type = :auth_type)")
|
||||
int setAccountPassword(long id, String password, int auth_type);
|
||||
|
||||
@Query("UPDATE account SET last_connected = :last_connected WHERE id = :id AND NOT (last_connected IS :last_connected)")
|
||||
int setAccountConnected(long id, Long last_connected);
|
||||
|
||||
Reference in New Issue
Block a user