sqlc
sqlc copied to clipboard
Generate type-safe code from SQL
### Version 1.25.0 ### What happened? NOT NULL is ignored in DOMAIN ### Relevant log output _No response_ ### Database schema ```sql CREATE DOMAIN title AS varchar NOT NULL DEFAULT...
### What do you want to change? At the moment, the [documentation](https://docs.sqlc.dev/en/stable/howto/insert.html#postgresql) states: > PostgreSQL supports the [COPY protocol](https://www.postgresql.org/docs/current/sql-copy.html) that can insert rows a lot faster than sequential inserts. >...
### Version 1.25.0 ### What happened? Trying to generate a query where there is a table alias with capital letters causes the generation to fail with the error `column "id"...
### What do you want to change? See prior #1442 #930 #1076 #2207 [ngrok/sqlmw](https://github.com/ngrok/sqlmw) provides `database/sql` interface interceptors (middleware), but does not work with the pgx / pgxpool interface. In...
### Version 1.27.0 ### What happened? I understand that slice can't be used with prepared queries, but it seems that if you enable prepared queries with `emit_prepared_queries: true` it will...
### What do you want to change? Today `catalog.Catalog` has a field called `SearchPath`. The only place it is configured is hardcoded and is part of catalog initialization [here](https://github.com/sqlc-dev/sqlc/blob/main/internal/engine/postgresql/catalog.go#L16). It's...
Example of generated query: ```go const iterCities = `-- name: IterCities :iter SELECT slug, name FROM city ORDER BY name ` func (q *Queries) IterCities(ctx context.Context) IterCitiesRows { rows, err...
### Version 1.27.0 ### What happened? Postgres [docs](https://www.postgresql.org/docs/current/queries-table-expressions.html#QUERIES-FROM) says `USING` clause makes redundant column suppressions. > Furthermore, the output of JOIN USING suppresses redundant columns: there is no need to...
fixes https://github.com/sqlc-dev/sqlc/issues/3660
### Version 1.27.0 ### What happened? I have Postgresql schema where I define overloaded function to handle many column types. ``` CREATE FUNCTION foo(text) CREATE FUNCTION foo(text[]) ``` Unfortunately during...