- Notifications
You must be signed in to change notification settings - Fork976
Feat: Allow Fixing Go Type in queries.sql#3346
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
I love sqlc, and can't say how much I appreciate the developers for creating it. Thank you. However, I am starting to run an area where it is causing maintenance problems. Specifically with sqlc changing Go type names when I need to change a single table query into a multiple table query. Consider if I have a query such as this: -- name: LoadLink :oneSELECT*FROM link; That will cause the However, if I later need to add a JOIN to get field from a related table, that changes all related code to Is there any appetite to consider adding configuration to allow for more comments as sql-c specific directives to allow developer to specify the type name for a given query inside -- name: LoadLink :one-- type: EnhancedLinkSELECT link.*,content.titleFROM linkJOIN contentONlink.id=content.link_id; or this if you prefer(I like the former, but the latter would work too): -- name: LoadLink :one, type: EnhancedLinkSELECT link.*,content.titleFROM linkJOIN contentONlink.id=content.link_id; Would the sqlc team be open to a PR of this nature? BTW, I really would not want this kind of info to be added to (Actually, I would prefer to see all DDL and DML-related settings to be in |
BetaWas this translation helpful?Give feedback.