aboutsummaryrefslogtreecommitdiff
path: root/crates/secd/store/pg/sql/write_identity.sql
diff options
context:
space:
mode:
authorbenj <benj@rse8.com>2022-12-24 00:43:38 -0800
committerbenj <benj@rse8.com>2022-12-24 00:43:38 -0800
commitc2268c285648ef02ece04de0d9df0813c6d70ff8 (patch)
treef84ec7ee42f97d78245f26d0c5a0c559cd35e89d /crates/secd/store/pg/sql/write_identity.sql
parentde6339da72af1d61ca5908b780977e2b037ce014 (diff)
downloadsecdiam-c2268c285648ef02ece04de0d9df0813c6d70ff8.tar
secdiam-c2268c285648ef02ece04de0d9df0813c6d70ff8.tar.gz
secdiam-c2268c285648ef02ece04de0d9df0813c6d70ff8.tar.bz2
secdiam-c2268c285648ef02ece04de0d9df0813c6d70ff8.tar.lz
secdiam-c2268c285648ef02ece04de0d9df0813c6d70ff8.tar.xz
secdiam-c2268c285648ef02ece04de0d9df0813c6d70ff8.tar.zst
secdiam-c2268c285648ef02ece04de0d9df0813c6d70ff8.zip
refactor everything with more abstraction and a nicer interface
Diffstat (limited to '')
-rw-r--r--crates/secd/store/pg/sql/write_identity.sql15
1 files changed, 8 insertions, 7 deletions
diff --git a/crates/secd/store/pg/sql/write_identity.sql b/crates/secd/store/pg/sql/write_identity.sql
index 94a51fe..67662a6 100644
--- a/crates/secd/store/pg/sql/write_identity.sql
+++ b/crates/secd/store/pg/sql/write_identity.sql
@@ -1,11 +1,12 @@
insert into secd.identity (
- identity_public_id,
- data,
- created_at
+ identity_public_id
+ , data
+ , created_at
+ , updated_at
+ , deleted_at
) values (
- $1,
- $2,
- $3
-) on conflict(identity_public_id) do update
+ $1, $2::jsonb, $3, $4, $5
+) on conflict (identity_public_id) do update
set data = excluded.data
+ , updated_at = excluded.updated_at
, deleted_at = excluded.deleted_at;