diff options
Diffstat (limited to 'crates/secd/store/pg/sql/find_identity.sql')
| -rw-r--r-- | crates/secd/store/pg/sql/find_identity.sql | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/secd/store/pg/sql/find_identity.sql b/crates/secd/store/pg/sql/find_identity.sql new file mode 100644 index 0000000..3a86a83 --- /dev/null +++ b/crates/secd/store/pg/sql/find_identity.sql @@ -0,0 +1,9 @@ +select + identity_public_id, + data, + i.created_at +from auth.identity i +join auth.identity_email ie using (identity_id) +join auth.email e using (email_id) +where (($1 is null) or (i.identity_public_id = $1)) +and (($2 is null) or (e.address = $2)) |
