mirror of
https://github.com/1f349/tulip.git
synced 2024-11-09 22:42:53 +00:00
28 lines
522 B
SQL
28 lines
522 B
SQL
-- name: GetUserList :many
|
|
SELECT subject,
|
|
name,
|
|
username,
|
|
picture,
|
|
website,
|
|
email,
|
|
email_verified,
|
|
role,
|
|
updated_at,
|
|
active
|
|
FROM users
|
|
LIMIT 25 OFFSET ?;
|
|
|
|
-- name: UpdateUserRole :exec
|
|
UPDATE users
|
|
SET active = ?,
|
|
role=?
|
|
WHERE subject = ?;
|
|
|
|
-- name: VerifyUserEmail :exec
|
|
UPDATE users
|
|
SET email_verified = 1
|
|
WHERE subject = ?;
|
|
|
|
-- name: UserEmailExists :one
|
|
SELECT EXISTS(SELECT 1 FROM users WHERE email = ? AND email_verified = 1) == 1 AS email_exists;
|