Closed
Description
So I'm just playing around here making a random foobar repo to try out this badassery .. but I just get
> sqlc compile
Error: path ddl/queries/ contains no queries
I .. think I'm following the README but 🤔 I guess ..not?
> sqlc version
v0.0.1
> tree
.
├── ddl
│ ├── queries
│ │ └── user.sql
│ └── schema
│ └── 0001_user.sql
├── go.mod
├── go.sum
├── pkg
│ ├── db
│ └── domain
│ └── user.go
└── sqlc.json
> cat sqlc.json
{
"version": "1",
"packages": [
{
"name": "user",
"path": "pkg/db",
"queries": "ddl/queries/",
"schema": "ddl/schema/"
}
]
}
> cat ddl/queries/user.sql
-- name: GetUsers :many
SELECT *
FROM users
WHERE id IN $1;
^ I'm not crazy right? That's definitely a query inside ddl/queries/ ..?
> cat ddl/schema/0001_user.sql
CREATE TYPE status AS ENUM (
'open',
'closed'
);
CREATE TABLE users (
id varchar(225) PRIMARY KEY,
name varchar(225) NOT NULL,
age int NOT NULL DEFAULT 0,
status status NOT NULL DEFAULT 'open',
hobbies text[]
);
What am I doing wrong exactly? Err I haven't checked the Create Table query works .. but the error seems to say that there are no queries in the folder .. but .. there are?