-- name: AddUser :one
INSERT INTO users (
    email,
    password
) VALUES ($1, $2)
ON CONFLICT (email) DO UPDATE SET password = $2
RETURNING id;

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

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