import () in "Code generated by sqlc" #1402
Unanswered
zoranembroker
asked this question in
Q&A
Replies: 3 comments
|
try to use https://github.com/tkcrm/pgxgen pgxgen sqlc generate |
0 replies
|
sqlc should determine the imports for you, but there might be a bug. Can you show a more concrete example on https://play.sqlc.dev/? |
0 replies
|
I am able to duplicate this behavior by providing a RETURNING clause on a query marked It's pretty nonsensical to have a RETURNING clause there, but it would be nice to get a warning from sqlc instead of an un-compilable file. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
It is not clear how "import" is generated in sqlc.
E.g.
import (
"context"
"encoding/json"
"time"
)
I have a query that is using a column which is 'timestamp' postgres type.
Sqlc generate makes the proper struct with 'time.Time' type.
E.g.
StartedAt *time.Time
However, in the import "time" is missing :
import (
"context"
"encoding/json"
)
Not sure what to do to make it inserted there?
All reactions