27 lines
No EOL
435 B
SQL
27 lines
No EOL
435 B
SQL
-- name: CreateReset :one
|
|
INSERT INTO "password_reset" (
|
|
"identity_id",
|
|
"selector",
|
|
"verifier",
|
|
"valid_until"
|
|
) VALUES (
|
|
$1,
|
|
$2,
|
|
$3,
|
|
$4
|
|
) RETURNING *;
|
|
|
|
-- name: DestroyReset :exec
|
|
DELETE FROM "password_reset" WHERE "selector" = $1;
|
|
|
|
-- name: GetResetBySelector :one
|
|
SELECT
|
|
*
|
|
FROM "password_reset"
|
|
WHERE "selector" = $1;
|
|
|
|
-- name: GetResetByIdentityID :one
|
|
SELECT
|
|
*
|
|
FROM "password_reset"
|
|
WHERE "identity_id" = $1; |