-
Notifications
You must be signed in to change notification settings - Fork 925
-
Current Behaviour :
I have 3 .sql files and when I am compiling them using sqlc generate(keeping emit_interface flag true), a single interface is created for all the auto-generated SQL queries.
Expected Behaviour :
Wanted to have different interfaces for different table operations.
Not having separate interface for each SQL file is creating a common interface which gets bulky everytime I add a query.
Can anyone suggest any way if possible to generate separate interfaces for separate SQL files?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
Having a separate Querier
interface for each file would make test mocking easier. Querier
on its own isn't terribly useful for APIs that are treating each table as a resource. I think the only suitable workaround is to create your own interface for each table/resource/etc. which is a subset of Querier
.
Beta Was this translation helpful? Give feedback.