Closed
Description
Version
Other
What happened?
generate gives the following error on v1.17.2
:
$ tools/sqlc generate
# package db
src/query.sql:20:1: column "CustomerName" does not exist
Relevant log output
No response
Database schema
CREATE TABLE IF NOT EXISTS contacts (
pid TEXT PRIMARY KEY,
CustomerName TEXT,
CustomerGuid TEXT,
ProjectName TEXT,
ProjectGuid TEXT,
FirstName TEXT,
LastName TEXT,
Position TEXT,
Mobile TEXT,
Mobile2 TEXT,
Phone TEXT,
Email TEXT,
Fax TEXT,
Comment TEXT,
isDeleted INTEGER DEFAULT 0
);
SQL queries
-- name: InsertContact :one
INSERT INTO contacts (
pid,
CustomerName,
CustomerGuid,
ProjectName,
ProjectGuid,
FirstName,
LastName,
Position,
Mobile,
Mobile2,
Phone,
Email,
Fax,
Comment
)
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)
RETURNING *;
-- name: GetContacts :many
select * from contacts
Configuration
{
"version": "1",
"packages": [
{
"path": "db",
"engine": "sqlite",
"schema": "src/query.sql",
"queries": "src/query.sql"
}
]
}
Playground URL
https://play.sqlc.dev/p/1f226b2bec6aa236e58bd8acd704e3fb73f32da225f9fa1e677faf760f80030f
What operating system are you using?
Linux
What database engines are you using?
No response
What type of code are you generating?
Go