aboutsummaryrefslogtreecommitdiff
path: root/crates/secd/store/sqlite/sql/find_credential.sql
blob: 0590dee980f1cd8f0f5e016acede0e8c7be4ef70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
select c.credential_public_id
       , i.identity_public_id
       , c.data
       , c.created_at
       , c.revoked_at
       , c.deleted_at
from credential c
join identity   i using (identity_id)
where (($1 is null) or (c.credential_public_id = $1))
and (($2 is null) or (i.identity_public_id = $2))
and (($3 is null) or (c.type = $3))
and (($3 is null or $4 is null) or (c.partial_key = $4))