sqlc
sqlc copied to clipboard
Generate type-safe code from SQL
``` - db_type: "pg_catalog.numeric" nullable: false go_type: import: "yapi/types" type: "Decimal" - db_type: "pg_catalog.numeric" nullable: true go_type: import: "yapi/types" type: "Decimal" ``` this was generating model ok, but not the...
### Version 1.22.0 ### What happened? I have two tables like this ``` CREATE TABLE entity ( id SERIAL PRIMARY KEY, ); CREATE TABLE req ( id SERIAL PRIMARY KEY,...
### What do you want to change? I'm trying to make dynamic queries, to not update a column if given input is an empty string. The `description` field is not...
A domain is "essentially a data type with optional constraints". You can think of them as type aliases. By using a domain, you can easily create custom types. For example,...
### What do you want to change? AFAIK sqlc cannot assign types to json aggregations. For example: ```sql select ... json_build_object( 'id', s.id, 'description', s.description ) as Show from ......
### What do you want to change? In looking at the sample plugin is seems that the sample given uses two internal packages that we cannot use externally. I read...
### Version 1.26.0 ### What happened? I'm integrating sqlc into an existing golang project using Goose. When I run sqlc generate I'm getting the following error: migrations/0036_source_table_embeddings.sql:1:1: relation "global_metric" does...
### Version 1.19.1 ### What happened? It allowed query generation on columns that did not exist. ### Relevant log output ```shell None, it worked when it shouldn't ``` ### Database...
### Version 1.26.0 ### What happened? When creating WITH statements in SQL, I've noticed that if I was to use `COALESCE` within a WITH that updates data, that it would...
### Version 1.26.0 ### What happened? When generating some queries for some extracted JSON data on SQLite, the generated query row model uses `interface{}` instead of `time.Time`. I reproduced with...