-- name: CreateEmpresa :one
INSERT INTO empresas (nome) VALUES ($1) RETURNING *;

-- name: ListEmpresas :many
SELECT * FROM empresas ORDER BY nome;

-- name: GetEmpresaByID :one
SELECT * FROM empresas WHERE id = $1;

-- name: UpdateEmpresa :one
UPDATE empresas SET nome = $2 WHERE id = $1 RETURNING *;

-- name: DeleteEmpresa :exec
DELETE FROM empresas WHERE id = $1;
