|
|
|
@ -29,20 +29,16 @@ import java.util.List;
|
|
|
|
|
@Dao
|
|
|
|
|
public interface DaoCertificate {
|
|
|
|
|
@Query("SELECT * FROM certificate" +
|
|
|
|
|
" ORDER BY (email = :email) DESC, email, subject")
|
|
|
|
|
LiveData<List<EntityCertificate>> liveCertificates(String email);
|
|
|
|
|
|
|
|
|
|
@Query("SELECT * FROM certificate" +
|
|
|
|
|
" WHERE id = :id")
|
|
|
|
|
EntityCertificate getCertificate(long id);
|
|
|
|
|
" ORDER BY email, subject")
|
|
|
|
|
LiveData<List<EntityCertificate>> liveCertificates();
|
|
|
|
|
|
|
|
|
|
@Query("SELECT * FROM certificate" +
|
|
|
|
|
" WHERE fingerprint = :fingerprint" +
|
|
|
|
|
" AND email = :email")
|
|
|
|
|
" AND email = :email COLLATE NOCASE")
|
|
|
|
|
EntityCertificate getCertificate(String fingerprint, String email);
|
|
|
|
|
|
|
|
|
|
@Query("SELECT * FROM certificate" +
|
|
|
|
|
" WHERE email = :email")
|
|
|
|
|
" WHERE email = :email COLLATE NOCASE")
|
|
|
|
|
List<EntityCertificate> getCertificateByEmail(String email);
|
|
|
|
|
|
|
|
|
|
@Insert
|
|
|
|
|