You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Repository "base" has some queries and migrations ("schema"), that are processed by sqlc
Repository "specific" has "base" as a submodule (and vendors) and adds few more queries/migrations
Now the problem is that whenever sqlc is compiling queries from submodule "specific", it's also re-generating half of the types from "base", just because they are referenced in queries (I have to provide references in schema: to those tables as otherwise sqlc isn't able to process queries at all). So I end up from identical "copy-pasted" types in generated code.
Quesion: how to reuse generated types from "base"?
override just does not work here, I assume it's because it's for query arguments, columns, not for actual entities ("table types")
This discussion was converted from issue #3967 on August 03, 2025 03:40.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
I have a following situation:
Now the problem is that whenever
sqlc
is compiling queries from submodule "specific", it's also re-generating half of the types from "base", just because they are referenced in queries (I have to provide references inschema:
to those tables as otherwise sqlc isn't able to process queries at all). So I end up from identical "copy-pasted" types in generated code.Quesion: how to reuse generated types from "base"?
override
just does not work here, I assume it's because it's for query arguments, columns, not for actual entities ("table types")Note: I'm using sqlc 1.29.0 and project is in Go.
Beta Was this translation helpful? Give feedback.
All reactions