Skip to content


Choose a tag to compare
@kyleconroy kyleconroy released this 06 Sep 18:51
· 15 commits to main since this release

What's new

MySQL engine improvements

sqlc previously didn't know how to parse a CALL statement when using the MySQL engine,
which meant it was impossible to use sqlc with stored procedures in MySQL databases.

Additionally, sqlc now supports IS [NOT] NULL in queries. And LIMIT and OFFSET clauses
now work with UNION.

SQLite engine improvements

GitHub user @orisano continues to bring bugfixes and
improvements to sqlc's SQLite engine. See the "Changes" section below for the
full list.

Plugin access to environment variables

If you're authoring a sqlc plugin, you can now configure
sqlc to pass your plugin the values of specific environment variables.

For example, if your plugin
needs the PATH environment variable, add PATH to the env list in the
plugins collection.

version: '2'
- schema: schema.sql
  queries: query.sql
  engine: postgresql
  - out: gen
    plugin: test
- name: test
  - PATH
    sha256: 138220eae508d4b65a5a8cea555edd155eb2290daf576b7a8b96949acfeb3790

A variable named SQLC_VERSION is always included in the plugin's
environment, set to the version of the sqlc executable invoking it.

What's Changed

  • feat(endtoend/testdata): added two sqlite CAST tests and rearranged postgres tests for same by @andrewmbenton in #2551
  • build(deps): Bump wasmtime from v8.0.0 to v11.0.0 by @kyleconroy in #2553
  • feat(docs): add a reference to type overriding in by @andrewmbenton in #2557
  • docs: Update Docker installation instructions by @kyleconroy in #2552
  • docs: Modify config file version of mysql tutorial by @ken2403 in #2555
  • myriad formatting changes by @verygoodsoftwarenotvirus in #2558
  • build(deps): bump golang from 1.20.6 to 1.20.7 by @dependabot in #2563
  • build(deps): bump chardet from 5.1.0 to 5.2.0 in /docs by @dependabot in #2562
  • fix(engine/sqlite): support quoted identifier by @orisano in #2556
  • feat(engine/sqlite): support COLLATE for sqlite WHERE clause by @orisano in #2554
  • fix(engine/sqlite): fix compile error by @orisano in #2564
  • fix(engine/sqlite): fixed detection of column alias without AS by @orisano in #2560
  • fix(ci): bump go version for govulncheck in ci.yml by @andrewmbenton in #2568
  • fix: remove references to deprecated --experimental flag by @andrewmbenton in #2567
  • fix(postgres): Fixed a problem with array dimensions disappearing when using "ALTER TABLE ADD COLUMN" by @orisano in #2572
  • fix: remove GitHub sponsor integration by @andrewmbenton in #2574
  • fix(docs): improve discussion of prepared statements support by @andrewmbenton in #2604
  • build(deps): bump from 4.2.1 to 4.2.3 by @dependabot in #2583
  • docs: Reword phrase about pgx and multidimensional arrays by @rollulus in #2619
  • Gitignore Vim swap files by @Jille in #2616
  • build(deps): bump golang from 1.20.7 to 1.21.0 by @dependabot in #2596
  • build(deps): bump from 5.4.2 to 5.4.3 by @dependabot in #2582
  • build(deps): bump pygments from 2.15.1 to 2.16.1 in /docs by @dependabot in #2584
  • build(deps): bump sphinxcontrib-applehelp from 1.0.4 to 1.0.7 in /docs by @dependabot in #2620
  • build(deps): bump sphinxcontrib-qthelp from 1.0.3 to 1.0.6 in /docs by @dependabot in #2622
  • build(deps): bump from 0.17.1 to 0.17.6 by @dependabot in #2650
  • fix Go struct tag parsing by @josharian in #2606
  • build(deps): bump sphinxcontrib-serializinghtml from 1.1.5 to 1.1.9 in /docs by @dependabot in #2641
  • build: Upgrade from Go 1.20 to Go 1.21 by @kyleconroy in #2665
  • refactor(astutils): remove redundant nil check in Walk by @Juneezee in #2660
  • build(deps): bump sphinxcontrib-devhelp from 1.0.2 to 1.0.5 in /docs by @dependabot in #2621
  • build(deps): Bump from v11.0.0 to v12.0.0 by @kyleconroy in #2666
  • fix(compiler): Fix to not scan children under ast.RangeSubselect when retrieving table listing by @orisano in #2573
  • feat(mysql): Add parser support for IS [NOT] NULL by @Jille in #2651
  • fix(engine/sqlite): support NOT IN by @orisano in #2587
  • fix(codegen/golang): Fixed detection of the used package by @orisano in #2597
  • fix(engine/dolphin): Fixed problem that LIMIT OFFSET cannot be used with UNION ALL by @orisano in #2613
  • fix(compiler): support identifiers with schema by @orisano in #2579
  • fix(compiler): Fix column expansion to work with quoted non-keyword identifiers by @orisano in #2576
  • feat(engine/dolphin): support CALL statement by @orisano in #2614
  • fix(codegen): Compare define type in codegen by @tychy in #2578
  • build(deps): bump sphinx-rtd-theme from 1.2.2 to 1.3.0 in /docs by @dependabot in #2670
  • build(deps): bump sphinxcontrib-htmlhelp from 2.0.1 to 2.0.4 in /docs by @dependabot in #2671
  • feat(codegen): Allow plugins to access environment variables by @kyleconroy in #2669
  • fix(engine/sqlite): Fix ast when using compound operator by @orisano in #2673
  • fix(engine/sqlite): Fix to handle join clauses correctly by @orisano in #2674
  • fix(codegen): use correct Go types for bit strings and cid/oid/tid/xid with pgx/v4 by @andrewmbenton in #2668
  • build(deps): bump from 0.17.6 to 0.18.0 by @dependabot in #2691
  • docs: Missing emit_pointers_for_null_types configuration option in version 2 (#2682) by @topazur in #2683
  • fix(endtoend): Ensure all SQL works against PostgreSQL by @kyleconroy in #2684
  • build(deps): bump actions/checkout from 3 to 4 by @dependabot in #2694
  • build(deps): bump pytz from 2023.3 to 2023.3.post1 in /docs by @dependabot in #2695
  • chore: fix typo by @remyleone in #2696
  • chore: fix typo by @remyleone in #2697
  • docs: Document sqlc.* macros by @kyleconroy in #2698
  • docs(mysql): Document parseTime=true requirement by @kyleconroy in #2699
  • docs: add atlas to the list of supported migration frameworks by @andrewmbenton in #2700
  • docs: minor updates to insert howto by @andrewmbenton in #2701
  • build(devenv): bump go from 1.20.7 to 1.21.0 by @kyleconroy in #2702
  • feat(config): Add JSON schema files for configs by @kyleconroy in #2703
  • feat(cmd/sqlc): Bump version to 1.21.0 by @andrewmbenton in #2704
  • cmd/sqlc: Bump version to v1.21.0 by @kyleconroy in #2705

New Contributors

Full Changelog: v1.20.0...v1.21.0