From 2c4eb2d311919ad9fb70738199ecf99bf20c9fce Mon Sep 17 00:00:00 2001
From: benj <benj@rse8.com>
Date: Thu, 1 Dec 2022 10:30:34 -0800
Subject: - basic functionality with psql and sqlite - cli helper tool

---
 crates/secd/store/sqlite/sql/find_identity_by_code.sql | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 crates/secd/store/sqlite/sql/find_identity_by_code.sql

(limited to 'crates/secd/store/sqlite/sql/find_identity_by_code.sql')

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;
-- 
cgit v1.2.3

