Releases: sqlc-dev/sqlc
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:betaengine, 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)
v1.2.0
v1.1.0
v1.0.0
- Add experimental support for MySQL and Kotlin
- Fix various bugs
- Implement a new, more rigorous, testing framework
v0.1.0: Set stdout correctly (#232)
The `cmd.Do` function takes a writer to use as standard out, but doesn't use it. Instead, there's a duplicate call to `cobra.Command.SetErr`. This patch replaces one of the duplicates with `SetOut`.