feat: impl traits to add, get and mark read notifications for sqlx

postgres
This commit is contained in:
realaravinth
2022-05-26 19:32:16 +05:30
parent e9921db55b
commit 44740535c2
5 changed files with 143 additions and 24 deletions

View File

@@ -0,0 +1,14 @@
-- mark a notification as read
UPDATE mcaptcha_notifications
SET read = TRUE
WHERE
mcaptcha_notifications.id = $1
AND
mcaptcha_notifications.rx = (
SELECT
id
FROM
mcaptcha_users
WHERE
name = $2
);