sqlc icon indicating copy to clipboard operation
sqlc copied to clipboard

Generate type-safe code from SQL

Results 584 sqlc issues
Sort by recently updated
recently updated
newest added

### What do you want to change? Ability to override selected columns from postgres function to Go structs. ## Current implementation Let's say we have the following table: ```sql create...

enhancement
:books: postgresql
:wrench: golang

### Version 1.27.0 ### What happened? SQLC fails to generate a query where I try to use a column from a subquery in a WHERE clause to compare against a...

bug
:books: sqlite

### What do you want to change? Hi, I've been writing a plugin and want to get access to foreign key info ```sql CREATE TABLE articles( id INTEGER PRIMARY KEY,...

enhancement
:books: sqlite

Adds `q` to the reserve keywords. Although not a golang keyword per se, it works as one since `q` is reserved as a shorthand for `Queries` in the generated code...

I hope this helps with adoption.

while I can put `SET ROLE` in the queries, I cannot do `SET variable TO value` before queries, which is useful if I have row based security policies that utilize...

question

### Version 1.27.0 ### What happened? I've defined a new query like this: ``` -- name: BulkInsertAnalyseResult :copyfrom INSERT INTO AnalyseResults (Id, StoreId, ProductId, AmountDelivery, AmountRemission, AmountBel, AmountGsr, AmountDifference) VALUES...

bug
:books: mysql
:wrench: golang
:computer: linux

### Version 1.27.0 ### What happened? When no database is set in `sqlc.json`, this generates valid code that works: ``` INSERT INTO t (location) VALUES (ST_GeomFromEWKB(@location)); ``` This produces the...

bug
:books: postgresql
:wrench: golang
:computer: linux

### Version 1.27.0 ### What happened? It looks like sqlc doesn't understand parameters in the ON clause of a LEFT JOIN for a DELETE query. It does work for a...

bug
:books: mysql
:wrench: golang
:computer: linux

### Version 1.27.0 ### What happened? Querying `SELECT SUM(val) FROM authors` will return `interface{}` instead if `int` ### Relevant log output _No response_ ### Database schema ```sql CREATE TABLE authors...

bug
:books: mysql
:wrench: golang