21 lines
608 B
MySQL
21 lines
608 B
MySQL
|
-- name: CreateConfirmation :one
|
||
|
INSERT INTO "public"."confirmation" (
|
||
|
"email_address", "user_id", "selector", "verifier", "expires_at"
|
||
|
) VALUES (
|
||
|
$1, $2, $3, $4, $5
|
||
|
) RETURNING *;
|
||
|
|
||
|
-- name: DestroyConfirmation :exec
|
||
|
DELETE FROM "public"."confirmation" WHERE "selector" = $1;
|
||
|
|
||
|
-- name: GetConfirmationBySelector :one
|
||
|
SELECT
|
||
|
"email_address", "user_id", "selector", "verifier", "expires_at"
|
||
|
FROM "public"."confirmation"
|
||
|
WHERE "selector" = $1;
|
||
|
|
||
|
-- name: GetConfirmationByUserID :one
|
||
|
SELECT
|
||
|
"email_address", "user_id", "selector", "verifier", "expires_at"
|
||
|
FROM "public"."confirmation"
|
||
|
WHERE "user_id" = $1;
|