sqlc for Hexagonal architecture? #944
Unanswered
idirall22
asked this question in
Feature Requests & Ideas
Replies: 2 comments
|
Yeah I would also like to be able to change the output location for each generated file. Below is what I think would be the most logical fit for an existing hexagonal architecture. Also be able to specify different package for each.
|
0 replies
|
I suggest you consider the sqlc gen code as an adapter only and do the mapping with your domain structs instead of directly use the sqlc models as your domain |
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.
Hey there, awesome library!
Currently, I'm building a service based on hexagonal architecture, and I use sqlc to generate Golang code.
The issue for me is that the querier interface, the parameters, and models are generated with the implementation.
As we want to keep things open, we are wondering if there is a solution to move the querier interface, the parameters, and models outside of the output folder?
Also is there a way to convert the sql.NullString to a *string so the data type could be generic, not specific to SQL?
All reactions