Conditional contact cleanup

This commit is contained in:
M66B
2022-06-13 18:03:27 +02:00
parent 06af2bab49
commit 9fbc7ee94e
2 changed files with 11 additions and 3 deletions

View File

@@ -94,6 +94,11 @@ public interface DaoContact {
" GROUP BY name, email")
List<EntityContact> searchContacts(Long account, Integer type, String query);
@Query("SELECT COUNT(*) FROM contact" +
" WHERE (type = " + EntityContact.TYPE_TO +
" OR type = " + EntityContact.TYPE_FROM + ")")
int countContacts();
@Insert
long insertContact(EntityContact contact);