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
The Go version of sqlc generates the models.go file which includes structs for all tables, which later get referenced in specific queries.
Would it be possible to generate a type per table also in TS?
My use case: I'm in a codebase which is using raw SQL via mysql2. I didn't decide yet if I'll move everything to sqlc, but I'd really like to at least use correct values from the DB schema (currently, there may be some lies about fields being/not being nullable all over the code).
Generated sqlc queries could then also reference the model if possible, just like it's done in Go.
For now, I'm generating types like this for all tables which works, but I'd appreciate if it was auto-generated (as I may forget to add a new query when creating a new table).
-- name: User :oneSELECT*FROM user LIMIT1;
-- name: SomeOtherTable :oneSELECT*FROM some_other_table LIMIT1;
The text was updated successfully, but these errors were encountered:
The Go version of sqlc generates the models.go file which includes structs for all tables, which later get referenced in specific queries.
Would it be possible to generate a type per table also in TS?
My use case: I'm in a codebase which is using raw SQL via mysql2. I didn't decide yet if I'll move everything to sqlc, but I'd really like to at least use correct values from the DB schema (currently, there may be some lies about fields being/not being nullable all over the code).
Generated sqlc queries could then also reference the model if possible, just like it's done in Go.
For now, I'm generating types like this for all tables which works, but I'd appreciate if it was auto-generated (as I may forget to add a new query when creating a new table).
The text was updated successfully, but these errors were encountered: