-
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
Other
What happened?
Trying to override a column to use a standard library type results in the error message:
error parsing sqlc.json: Package override `go_type` specifier "time.Time" is not the proper format, expected 'package.type', e.g. 'github.com/segmentio/ksuid.KSUID'
Workaround: instead of "go_type": "time.Time" use "go_type": {"import":"time", "type": "Time"}.
Relevant log output
No response
Database schema
CREATE TABLE authors (
birthday timestamptz not null
);SQL queries
-- name: ListAuthors :many
SELECT * FROM authors;Configuration
{
"version": "1",
"packages": [
{
"path": "db",
"engine": "postgresql",
"schema": "query.sql",
"queries": "query.sql"
}
],
"overrides": [
{
"column": "author.birthday",
"go_type": "time.Time"
}
]
}Playground URL
https://play.sqlc.dev/p/e18cc29a5239b31fd32a651118f35b7f1b038b2e921644cec196290000867266
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtriageNew issues that hasn't been reviewedNew issues that hasn't been reviewed