Auto select identity for email

This commit is contained in:
M66B
2022-04-18 23:57:46 +02:00
parent 0431c7c27c
commit de0e9478c3
2 changed files with 100 additions and 0 deletions

View File

@@ -57,6 +57,12 @@ public interface DaoContact {
@Query("SELECT * FROM contact WHERE id = :id")
EntityContact getContact(long id);
@Query("SELECT DISTINCT identity FROM contact" +
" WHERE email = :email" +
" AND type IN (:types)" +
" AND NOT identity IS NULL")
List<Long> getIdentities(String email, List<Integer> types);
@Query("SELECT *" +
" FROM contact" +
" WHERE account = :account" +