-- name: GetAllAliases :many
SELECT * FROM virtual_aliases;

-- name: GetAliasesByDomain :many
SELECT * FROM virtual_aliases WHERE domain_id = ?;

-- name: GetAliasByID :one
SELECT * FROM virtual_aliases WHERE id = ?;

-- name: GetAliasBySource :one
SELECT * FROM virtual_aliases WHERE source = ?;

-- name: CreateAlias :exec
INSERT INTO virtual_aliases (domain_id, source, destination) VALUES (?, ?, ?);

-- name: DeleteAlias :exec
DELETE FROM virtual_aliases WHERE id = ?;

-- name: CountAliasesByDomain :one
SELECT COUNT(*) as count FROM virtual_aliases WHERE domain_id = ?;
