sqlc
sqlc copied to clipboard
Generate type-safe code from SQL
### Version 1.29.0 ### What happened? `DROP TRIGGER` and `DROP EVENT TRIGGER` exec Postgres queries are quietly ignored and no Go code is produced. If they are the only queries...
### Version 1.25.0 ### What happened? A bug happened! ```sql -- name: TestQuery :many SELECT * FROM persons WHERE sqlc.arg('foo'); ``` correctly produces ```go const testQuery = `-- name: TestQuery...
### Version 1.27.0 ### What happened? Similarly to https://github.com/sqlc-dev/sqlc/issues/3113 The postgres generator supports variables in the ORDER BY, but sqlite does not. ```sql CREATE TABLE authors ( id int PRIMARY...
## Summary COALESCE works perfectly when your column is already nullable (no `NOT NULL`), however if your column does not accept null values then if you use COALESCE your argument...
### Version 1.28.0 ### What happened? Description: When executing a SQL query that JOINs the same table multiple times with different aliases, SQLC generates Go structs with numbered field suffixes...
### Version 1.28.0 ### What happened? When generating a query with a delete statement that uses a join, sqlc returns this error: `panic: expected range var` The code itself works...
### Version 1.28.0 ### What happened? Hello I got ### Relevant log output ```shell sqlc generate failed. # package query.sql:16:11: table alias "rc" does not exist ``` ### Database schema...
Fixes #3688 by not calling `NewIdentifier(name)` in `convertCastExpr` because this function was ending up calling `strings.ToLower` on the type name resulting in type overrides not matching because the cast type...
With this addition, it should be possible to implement codegen on pgx/v5 side to resolve #2760 . Not sure for other drivers. I intend to implement codegen as part of...
### Version 1.28.0 ### What happened? I need to include an array of subobjects as children of a parent object. So i followed this [stackoverflow answer](https://stackoverflow.com/questions/77964610/golang-sqlc-nested-data-as-array) and created a view...