-- name: CreateCurso :one
INSERT INTO cursos (nome) VALUES ($1) RETURNING *;

-- name: ListCursos :many
SELECT * FROM cursos ORDER BY nome;

-- name: GetCursoByID :one
SELECT * FROM cursos WHERE id = $1;

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

-- name: DeleteCurso :exec
DELETE FROM cursos WHERE id = $1;
