Releases: sqlc-dev/sqlc
v1.10.0
Release notes coming soon!
What's Changed
- Fix typos in howto/select generated code sample by @naisuuuu in #1125
- Remove MYSQL_USER and MYSQL_PASSWORD from docker-compose.yaml by @robsonpeixoto in #1123
- build(deps): bump golang from 1.16.7 to 1.17.0 by @dependabot in #1129
- ci: Upgrade Go to 1.17 by @kyleconroy in #1130
- getting-started.md: fix typo by @LLLeon in #1133
- Add RStudio to list of sponsors by @kyleconroy in #1131
- endtoend: Run
go test
in CI by @kyleconroy in #1134 - golang: Output NullUUID when necessary by @kyleconroy in #1137
- codegen/golang: Consolidate import logic by @kyleconroy in #1139
- codgen/golang: Use p[gq]type for network address types by @kyleconroy in #1142
- When using pgx, map numeric types to pgtype.Numeric by @kyleconroy in #1143
- Handle null PostgreSQL JSON values by @kyleconroy in #1145
- codegen/golang: Add pgx support for range types by @kyleconroy in #1146
- First attempt at a template for bugs by @kyleconroy in #1151
- Re-order form, add configuration file section by @kyleconroy in #1153
- codegen/golang: Use pgtype for hstore when using pgx by @kyleconroy in #1156
- build(deps): bump github.com/lib/pq from 1.10.2 to 1.10.3 by @dependabot in #1160
- docs: Fix invalid language support table by @kyleconroy in #1161
- engine/mysql: Add support for LIKE by @kyleconroy in #1162
- docs: Add a getting started guide for MySQL by @kyleconroy in #1163
- cmd/sqlc: Bump version to v1.10.0 by @kyleconroy in #1165
New Contributors
- @naisuuuu made their first contribution in #1125
- @robsonpeixoto made their first contribution in #1123
- @LLLeon made their first contribution in #1133
Full Changelog: v1.9.0...v1.10.0
v1.9.0
v1.9.0-beta1
Beta release of v1.9.0. Please report any issues in the linked discussion.
v1.8.0
Core
- cmd: Fix sqlc init (#959)
MySQL
- Generate correct code for booleans
- Calling mysql LAST_INSERT_ID(expr) function (#977)
PostgreSQL
- Support PostgreSQL 12 and 13 features by upgrading to pg_query_go/v2 (#949)
- Fix ALTER TYPE to update column types (#973)
Python
- Add experimental Python support behind the
--experimental
flag
v1.7.0
Changelog
Core
- Initial Windows Support (#886)
- UNION support (#896)
- Publish documentation at https://docs.sqlc.dev
- cmd: Allow config file location to be specified (#863)
- Exit with non-zero error code when parsing fails (#870)
MySQL
v1.6.0
Notes
The new MySQL engine, code-named Dolphin, is now default. The old engine has been removed. Your generated code will be different, but should be easy to adapt. Please open an issue if your code is now broken. If you were using the mysql:beta
engine, you'll need to change that to mysql
.
Changelog
Core
- Add option to return emit
db
tags for struct fields (#656) - Add support for variadic stored procedures and functions (#798)
- Fix issue installing sqlc via
go get
(#744) - Add support for nontrivial import paths for overrides (#785)
Go
- You can now specify the
go_type
import path of an override using an object instead of a string.
overrides:
- db_type: "uuid"
go_type:
import: "gopkg.in/guregu/null.v3"
package: "null"
type: "Bool"
MySQL
v1.5.0
Notes
The new MySQL engine, code-named Dolphin, has finally landed. To try it out, use mysql:beta
for the engine value in sqlc.json
. This uses the same compiler infrastructure as the PostgreSQL engine, giving it feature parity and making it easier to maintain.
The old engine is official deprecated and will be placed behind the mysql:deprecated
name in v1.6.0. The engine will be completely removed in v1.7.0. For more information, see the MySQL roadmap.
On the PostgreSQL side of things, I've used some magic to generate function signatures for all built-in functions. This also includes many of the most popular PostgreSQL extensions. You will need to make sure to have CREATE EXTENSION ...
in your schema to get this functionality.
Changelog
Core
- Add option to return empty slices (instead of nil slices) in :many queries
- Use "nullable" instead of "null" in configuration file (#571)
- Add debugging support via SQLCDEBUG (#573)
- Support calling functions with defaults (#635)
PostgreSQL
- Add support for the money type (#552)
- Add support for 'cidr' and 'interval' types (#601)
- Generate all functions in pg_catalog (#550)
MySQL
- Add the
mysql:beta
engine, which will be the default next release
v1.4.0
Notes
This release includes a complete refactor of the compiler internals. The compiler now uses a database-agnostic SQL AST. The PostgreSQL backend uses this new code path by default. I've tested the new path extensively, but you still may run into bugs. If you do, you can use the old code path by setting the the following environment variable: SQLC_EXPERIMENTAL_PARSER=off
. The old code path will be removed in v1.5.0, so please report any bugs you run into.
A new :execresult
query command has been added. The generated methods will return (sql.Result, error)
, the same as DB.ExecContext.
Changelog
Core
- Post the compiler to the new, database-agnostic SQL AST
- Add support for dbmate migrations (#511)
- Apply rename rules to enum constants (#523)
- Add the :execresult query annotation (#542)
PostgreSQL
v1.3.0
Core
- Exclude golang-migrate .down.sql files in dirs + single files (#445)
- Add EmitExactTableNames config option (#474)
PostgreSQL
- Add PostgreSQL support for TRUNCATE (#448)
- Emit json.RawMessage for JSON columns (#461)
- Fix panic walking CreateTableAsStmt (https://github.com/kyleconroy/sqlc/475)