-- name: GetUserByNickname :one
SELECT *
FROM users
WHERE nickname = sqlc.arg('nickname');

-- name: CreateNewUser :one
INSERT 
INTO users (passhash, nickname) 
VALUES (sqlc.arg(passhash), sqlc.arg(nickname))
RETURNING id;

-- name: GetExternalServiceByToken :one
SELECT *
FROM external_services
WHERE auth_token = sqlc.arg('auth_token');