21 lines
No EOL
460 B
SQL
21 lines
No EOL
460 B
SQL
-- name: CreateReset :one
|
|
INSERT INTO "reset" (
|
|
"user_id", "selector", "verifier", "expires_at"
|
|
) VALUES (
|
|
$1, $2, $3, $4
|
|
) RETURNING *;
|
|
|
|
-- name: DestroyReset :exec
|
|
DELETE FROM "reset" WHERE "selector" = $1;
|
|
|
|
-- name: GetResetBySelector :one
|
|
SELECT
|
|
"user_id", "selector", "verifier", "expires_at"
|
|
FROM "reset"
|
|
WHERE "selector" = $1;
|
|
|
|
-- name: GetResetByUserID :one
|
|
SELECT
|
|
"user_id", "selector", "verifier", "expires_at"
|
|
FROM "reset"
|
|
WHERE "user_id" = $1; |