From 2c4eb2d311919ad9fb70738199ecf99bf20c9fce Mon Sep 17 00:00:00 2001 From: benj Date: Thu, 1 Dec 2022 10:30:34 -0800 Subject: - basic functionality with psql and sqlite - cli helper tool --- crates/secd/store/pg/sql/write_email.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 crates/secd/store/pg/sql/write_email.sql (limited to 'crates/secd/store/pg/sql/write_email.sql') diff --git a/crates/secd/store/pg/sql/write_email.sql b/crates/secd/store/pg/sql/write_email.sql new file mode 100644 index 0000000..75fc494 --- /dev/null +++ b/crates/secd/store/pg/sql/write_email.sql @@ -0,0 +1,11 @@ +insert into auth.email ( + address +) values ( + $1 +) on conflict (address) do nothing +returning email_id; +-- +select email_id from auth.email where address = $1; +-- +insert into auth.identity_email (identity_id, email_id, created_at) values ($1, $2, $3); +-- -- cgit v1.2.3