aboutsummaryrefslogtreecommitdiff
path: root/crates/secd/store/sqlite/sql/find_email_validation.sql
blob: d7f311c28424a1fb2b1c58722a3eb4cbcf25ff1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
select
        ev.email_validation_public_id
        , i.identity_public_id
        , e.address
        , ev.code
        , ev.is_oauth_derived
        , ev.created_at
        , ev.expired_at
        , ev.validated_at
        , iev.revoked_at
        , iev.deleted_at
from email_validation               ev
join email                          e   using (email_id)
left join identity_email_validation iev using (email_validation_id)
left join identity                  i   using (identity_id)
where ((?1 is null) or (email_validation_public_id = ?1))
and   ((?2 is null) or (code = ?2));
--