-- name: FindAllUsers :many
SELECT * FROM users;

-- name: InsertUser :one
INSERT INTO users (
    email, full_name, password_hash, is_admin
) VALUES (
    $1, $2, $3, $4
)
RETURNING id;

-- name: FindUserEmail :one
SELECT * FROM users WHERE email = $1 LIMIT 1;

-- name: FindUserId :one
SELECT * FROM users WHERE id = $1 LIMIT 1;

-- name: UpdateProfilePicture :exec
UPDATE users
SET profile_picture = $1
WHERE id = $2;
