-- name: CreateUser :one
INSERT INTO users (username, password_hash, api_token, is_admin)
VALUES ($1, $2, $3, $4)
RETURNING *;

-- name: GetUserByUsername :one
SELECT * FROM users WHERE username = $1;

-- name: GetUserByAPIToken :one
SELECT * FROM users WHERE api_token = $1;

-- name: CountUsers :one
SELECT count(*) FROM users;
