Releases: sqlc-dev/sqlc
v1.13.0
What's Changed
- Define code generation interface via Protocol Buffers by @kyleconroy in #1406
- Refactor Kotlin codegen package to use plugin types by @kyleconroy in #1416
- fix(postgresql): Remove extra newline with db argument by @rliebz in #1417
- build(deps): bump github.com/jackc/pgx/v4 from 4.14.1 to 4.15.0 by @dependabot in #1421
- docs: Specify which db_type should be used in overrides by @egtann in #1427
- fix copyfrom methods on interface not matching generated methods by @alexdulin in #1424
- build(deps): bump golang from 1.17.6 to 1.17.7 by @dependabot in #1431
- docs: Add more documentation for go_type by @kyleconroy in #1432
- Start filling out SQLite support by @PadraigK in #1410
- Support codespace development by @kyleconroy in #1434
- chore: fix extra newline in comments for copyfrom by @alexdulin in #1438
- feat(pgx): Add support for batch operations by @jrperritt in #1437
- SQLite: Adds a few more tests, fixes DROP TABLE by @PadraigK in #1443
- Add support for delete statements by @PadraigK in #1447
- feat(sqlite) Adds support for column aliases and function arguments by @PadraigK in #1455
- feat(codegen): Insert comments in interfaces by @kyleconroy in #1458
- build(deps): bump actions/setup-python from 2 to 3 by @dependabot in #1461
- Refactor go codegen to plugin types by @stephen in #1460
- feat(sdk): Add the plugin SDK package by @kyleconroy in #1463
- build(deps): bump actions/checkout from 2.4.0 to 3 by @dependabot in #1464
- refactor(cmd): Simplify codegen selection logic by @kyleconroy in #1466
- chore: Generate marshal/unmarshal with vtprotobuf by @kyleconroy in #1467
- Remove data_type from column proto by @stephen in #1468
- docs: Add new logo by @kyleconroy in #1471
- docs: Add hosted services to privacy / data guide by @kyleconroy in #1475
- build(deps): bump golang from 1.17.7 to 1.17.8 by @dependabot in #1476
- docs: Add Plausible analytics by @kyleconroy in #1477
- build(deps): bump github.com/spf13/cobra from 1.3.0 to 1.4.0 by @dependabot in #1483
- fix(compiler): Fix left join nullability with table aliases by @timstudd in #1491
- build(endtoend): Don't run tests in testdata by @kyleconroy in #1492
- build(deps): bump golang from 1.17.8 to 1.18.0 by @dependabot in #1493
- feat: Upload projects by @kyleconroy in #1436
- Add a new issue template by @kyleconroy in #1497
- docs: Add more examples to updating rows by @kyleconroy in #1499
- config: Add basic fuzzing for config / overrides by @kyleconroy in #1500
- build(deps): bump google.golang.org/protobuf from 1.27.1 to 1.28.0 by @dependabot in #1504
- Added postgres CALL support by @terrycain in #1495
- Add version number to Python code comments by @kyleconroy in #1511
- feat: Add sqlc version to generated Kotlin code by @kyleconroy in #1512
- feat: Add sqlc version to generated Go code by @kyleconroy in #1513
- feat: Pass sqlc version in codegen request by @kyleconroy in #1514
- add materialized view support by @ludusrusso in #1509
- fix: Regenerate testdata for CREATE TABLE AS by @kyleconroy in #1516
- feat(python): Graduate Python support to beta by @kyleconroy in #1520
- docs: Include scope in changelog format by @kyleconroy in #1521
- release(cmd/sqlc): Bump to v1.13.0 by @kyleconroy in #1523
New Contributors
- @rliebz made their first contribution in #1417
- @alexdulin made their first contribution in #1424
- @jrperritt made their first contribution in #1437
- @stephen made their first contribution in #1460
- @terrycain made their first contribution in #1495
- @ludusrusso made their first contribution in #1509
Full Changelog: v1.12.0...v1.13.0
v1.12.0
What's Changed
- fix(sqlite): Update ANTLR v4 go.mod entry by @kyleconroy in #1336
- fix(compiler): Check delete statements for CTEs by @wabain in #1329
- First pass at AST-based codegen by @kyleconroy in #1333
- Postgres Inherits by @timwmillard in #1339
- chore(python): Add tests for :exec{result,rows} by @kyleconroy in #1344
- Generate queries class by @kyleconroy in #1338
- chore(python): Delete template-based codegen by @kyleconroy in #1345
- fix(compiler): Fix validation of GROUP BY on field aliases by @timstudd in #1348
- handling of dollar signs in function names by @Nlossae in #1359
- Add support for CREATE TABLE a ( LIKE b ) for Postgres by @Jille in #1355
- Update error message by @Threpio in #1366
- feat(postgres): Add support for sql.NullInt16 by @egtann in #1376
- Implement support for pgx's CopyFrom by @Jille in #1352
- Fixed typo in select.md by @Hirochon in #1378
- fix(copyfrom): Fix imports when non-copyfrom queries needed imports that copyfrom queries didn't by @Jille in #1386
- build: Format all Go code by @kyleconroy in #1387
- fix(postgresql): Remove extra comment newline by @kyleconroy in #1395
- Migrate SQLite Grammar to maintained version by @PadraigK in #1397
- Fix return type for subqueries in MySQL (#1383) by @dansimau in #1404
- fix: Enable strict function checking by @kyleconroy in #1405
- Bug: ALTER TABLE SET SCHEMA by @timwmillard in #1409
- cmd/sqlc: Bump version to v1.12.0 by @kyleconroy in #1415
New Contributors
- @Nlossae made their first contribution in #1359
- @Jille made their first contribution in #1355
- @Threpio made their first contribution in #1366
- @egtann made their first contribution in #1376
- @Hirochon made their first contribution in #1378
- @PadraigK made their first contribution in #1397
- @dansimau made their first contribution in #1404
Full Changelog: v1.11.0...v1.12.0
v1.11.0
Bug Fixes
- Update incorrect signatures (#1180)
- Correct aggregate func sig (#1182)
- Jsonb_build_object (#1211)
- Case-insensitive identifiers (#1216)
- Incorrect handling of meta (#1228)
- Detect invalid INSERT expression (#1231)
- Respect alias name for coalesce (#1232)
- Mark nullable when casting NULL (#1233)
- Support nullable fields in joins for MySQL engine (#1249)
- Fix between expression handling of table references (#1268)
- Support nullable fields in joins on same table (#1270)
- Fix missing binds in ORDER BY (#1273)
- Set RV for TargetList items on updates (#1252)
- Fix MySQL parser for query without trailing semicolon (#1282)
- Validate table alias references (#1283)
- Add support for MySQL ON DUPLICATE KEY UPDATE (#1286)
- Support references to columns in joined tables in UPDATE statements (#1289)
- Add validation for GROUP BY clause column references (#1285)
- Prevent variable redeclaration in single param conflict (#1298)
- Use common params struct field for same named params (#1296)
Documentation
- Replace deprecated go get with go install (#1181)
- Fix package name referenced in tutorial (#1202)
- Add environment variables (#1264)
- Add go.17+ install instructions (#1280)
- Warn about golang-migrate file order (#1302)
Features
Refactor
- Move from io/ioutil to io and os package (#1164)
Styling
- Apply gofmt to sample code (#1261)
New Contributors
- @Juneezee made their first contribution in #1164
- @ovadbar made their first contribution in #1072
- @l4u made their first contribution in #1199
- @oliverpool made their first contribution in #1204
- @cqsd made their first contribution in #1209
- @snakeclown made their first contribution in #1248
- @timstudd made their first contribution in #1249
- @orisano made their first contribution in #1261
- @andreasgan made their first contribution in #1252
- @lopezator made their first contribution in #1280
- @danielmmetz made their first contribution in #1279
- @wabain made their first contribution in #1301
- @remLse made their first contribution in #1302
Full Changelog: v1.10.0...v1.11.0
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