-
Notifications
You must be signed in to change notification settings - Fork 978
Closed
Labels
bugSomething isn't workingSomething isn't workingtriageNew issues that hasn't been reviewedNew issues that hasn't been reviewed
Description
Version
1.17.2
What happened?
In version 1.17.x, when using type overrides with something like that:
"go_type": {
"import": "test",
"type": "Test",
"package": "t",
"pointer": true // <- here is the problem
}
The output does not contain the import
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.17.2
package db
// missing import
import ()
type Author struct {
ID int64
Name string
Test *t.Test
}Note: It works if I remove pointer: true
Relevant log output
N/ADatabase schema
CREATE TABLE authors (
id BIGSERIAL PRIMARY KEY,
name text NOT NULL,
test jsonb
);SQL queries
-- name: GetAuthor :one
SELECT * FROM authors
WHERE id = $1 LIMIT 1;Configuration
{
"version": "1",
"packages": [
{
"path": "db",
"engine": "postgresql",
"schema": "query.sql",
"queries": "query.sql",
"overrides": [
{
"column": "authors.test",
"go_type": {
"import": "test",
"type": "Test",
"package": "t",
"pointer": true
}
}
]
}
]
}Playground URL
https://play.sqlc.dev/p/0e968f5100c6326cf6a4b10baf3d45db7ebe0997f09d7bf03f2897f5e2553966
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
balogal
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtriageNew issues that hasn't been reviewedNew issues that hasn't been reviewed