aboutsummaryrefslogtreecommitdiff
path: root/crates/secd/store/pg/sql/find_identity.sql
blob: f4c9cbf03653d5f5155cc3eda298ff7b63b60fda (plain)
1
2
3
4
5
6
7
8
9
select
        identity_public_id,
        data,
        i.created_at
from secd.identity       i
join secd.identity_email ie using (identity_id)
join secd.email          e  using (email_id)
where (($1 is null) or (i.identity_public_id = $1))
and   (($2 is null) or (e.address = $2))