aboutsummaryrefslogtreecommitdiff
path: root/crates/secd/store/sqlite/sql/find_identity_by_code.sql
diff options
context:
space:
mode:
Diffstat (limited to 'crates/secd/store/sqlite/sql/find_identity_by_code.sql')
-rw-r--r--crates/secd/store/sqlite/sql/find_identity_by_code.sql11
1 files changed, 11 insertions, 0 deletions
diff --git a/crates/secd/store/sqlite/sql/find_identity_by_code.sql b/crates/secd/store/sqlite/sql/find_identity_by_code.sql
new file mode 100644
index 0000000..e1a6050
--- /dev/null
+++ b/crates/secd/store/sqlite/sql/find_identity_by_code.sql
@@ -0,0 +1,11 @@
+select identity_email_id
+from auth.email_validation
+where email_validation_public_id = ?1;
+--
+select
+ identity_public_id
+ , data
+ , i.created_at
+from auth.identity i
+left join auth.identity_email ie using (identity_id)
+where ie.identity_email_id = ?1;