I wanted to use sqlc compile to check sql syntax errors, but I didn't get what I expected.
The following schema and queries were copied from sqlc document to used for testing.
Could you please help me figure out where the problem was? thanks.
Relevant log output
nothing
Database schema
CREATE TABLE authors (
id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name text NOT NULL,
bio text
);
SQL queries
-- name: GetAuthor :one
SELECT * FROM authors
WHERE id = ? LIMIT 1;
-- name: ListAuthors :many
SELECT * FROM authors
ORDER BY name;
-- name: CreateAuthor :execresult
INSERT INTO authors (
name, bio
) VALUES (
?, ?
);
-- name: DeleteAuthor :exec
DELETE FROM authors
WHERE id = ?;
Version
1.27.0
What happened?
I wanted to use
sqlc compile
to check sql syntax errors, but I didn't get what I expected.The following schema and queries were copied from sqlc document to used for testing.
Could you please help me figure out where the problem was? thanks.
Relevant log output
Database schema
SQL queries
Configuration
Playground URL
No response
What operating system are you using?
Linux
What database engines are you using?
PostgreSQL
What type of code are you generating?
No response