-- name: GetUserByID :one
SELECT * FROM users
WHERE id = sqlc.arg(id);

-- name: GetUserByEmail :one
SELECT * FROM users
WHERE email = sqlc.arg(email)
LIMIT 1;

-- name: GetUserByUsername :one
SELECT * FROM users
WHERE username = sqlc.arg(username)
LIMIT 1;

-- name: CreateUser :one
INSERT INTO users (username, email, password_hash, full_name, created_by)
VALUES (
    sqlc.arg(username), 
    sqlc.arg(email), 
    sqlc.arg(password_hash), 
    sqlc.arg(full_name), 
    sqlc.arg(created_by))
RETURNING id;
