-
Notifications
You must be signed in to change notification settings - Fork 987
v1.21.0 #2706
-
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' sql: - schema: schema.sql queries: query.sql engine: postgresql codegen: - out: gen plugin: test plugins: - name: test env: - PATH wasm: url: https://github.com/sqlc-dev/sqlc-gen-test/releases/download/v0.1.0/sqlc-gen-test.wasm 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
CASTtests and rearranged postgres tests for same by @andrewmbenton in feat(endtoend/testdata): added two sqliteCASTtests and rearranged postgres tests for same #2551 - build(deps): Bump wasmtime from v8.0.0 to v11.0.0 by @kyleconroy in build(deps): Bump wasmtime from v8.0.0 to v11.0.0 #2553
- feat(docs): add a reference to type overriding in datatypes.md by @andrewmbenton in feat(docs): add a reference to type overriding in datatypes.md #2557
- docs: Update Docker installation instructions by @kyleconroy in docs: Update Docker installation instructions #2552
- docs: Modify config file version of mysql tutorial by @ken2403 in docs: Modify config file version of mysql tutorial #2555
- myriad formatting changes by @verygoodsoftwarenotvirus in myriad formatting changes #2558
- build(deps): bump golang from 1.20.6 to 1.20.7 by @dependabot in build(deps): bump golang from 1.20.6 to 1.20.7 #2563
- build(deps): bump chardet from 5.1.0 to 5.2.0 in /docs by @dependabot in build(deps): bump chardet from 5.1.0 to 5.2.0 in /docs #2562
- fix(engine/sqlite): support quoted identifier by @orisano in fix(engine/sqlite): support quoted identifier #2556
- feat(engine/sqlite): support COLLATE for sqlite WHERE clause by @orisano in feat(engine/sqlite): support COLLATE for sqlite WHERE clause #2554
- fix(engine/sqlite): fix compile error by @orisano in fix(engine/sqlite): fix compile error #2564
- fix(engine/sqlite): fixed detection of column alias without AS by @orisano in fix(engine/sqlite): fixed detection of column alias without AS #2560
- fix(ci): bump go version for govulncheck in ci.yml by @andrewmbenton in fix(ci): bump go version for govulncheck in ci.yml #2568
- fix: remove references to deprecated
--experimentalflag by @andrewmbenton in fix: remove references to deprecated--experimentalflag #2567 - fix(postgres): Fixed a problem with array dimensions disappearing when using "ALTER TABLE ADD COLUMN" by @orisano in fix(postgres): Fixed a problem with array dimensions disappearing when using "ALTER TABLE ADD COLUMN" #2572
- fix: remove GitHub sponsor integration by @andrewmbenton in fix: remove GitHub sponsor integration #2574
- fix(docs): improve discussion of prepared statements support by @andrewmbenton in fix(docs): improve discussion of prepared statements support #2604
- build(deps): bump github.com/pganalyze/pg_query_go/v4 from 4.2.1 to 4.2.3 by @dependabot in build(deps): bump github.com/pganalyze/pg_query_go/v4 from 4.2.1 to 4.2.3 #2583
- docs: Reword phrase about pgx and multidimensional arrays by @rollulus in docs: Reword phrase about pgx and multidimensional arrays #2619
- Gitignore Vim swap files by @Jille in Gitignore Vim swap files #2616
- build(deps): bump golang from 1.20.7 to 1.21.0 by @dependabot in build(deps): bump golang from 1.20.7 to 1.21.0 #2596
- build(deps): bump github.com/jackc/pgx/v5 from 5.4.2 to 5.4.3 by @dependabot in build(deps): bump github.com/jackc/pgx/v5 from 5.4.2 to 5.4.3 #2582
- build(deps): bump pygments from 2.15.1 to 2.16.1 in /docs by @dependabot in build(deps): bump pygments from 2.15.1 to 2.16.1 in /docs #2584
- build(deps): bump sphinxcontrib-applehelp from 1.0.4 to 1.0.7 in /docs by @dependabot in build(deps): bump sphinxcontrib-applehelp from 1.0.4 to 1.0.7 in /docs #2620
- build(deps): bump sphinxcontrib-qthelp from 1.0.3 to 1.0.6 in /docs by @dependabot in build(deps): bump sphinxcontrib-qthelp from 1.0.3 to 1.0.6 in /docs #2622
- build(deps): bump github.com/google/cel-go from 0.17.1 to 0.17.6 by @dependabot in build(deps): bump github.com/google/cel-go from 0.17.1 to 0.17.6 #2650
- fix Go struct tag parsing by @josharian in fix Go struct tag parsing #2606
- build(deps): bump sphinxcontrib-serializinghtml from 1.1.5 to 1.1.9 in /docs by @dependabot in build(deps): bump sphinxcontrib-serializinghtml from 1.1.5 to 1.1.9 in /docs #2641
- build: Upgrade from Go 1.20 to Go 1.21 by @kyleconroy in build: Upgrade from Go 1.20 to Go 1.21 #2665
- refactor(astutils): remove redundant nil check in
Walkby @Juneezee in refactor(astutils): remove redundant nil check inWalk#2660 - build(deps): bump sphinxcontrib-devhelp from 1.0.2 to 1.0.5 in /docs by @dependabot in build(deps): bump sphinxcontrib-devhelp from 1.0.2 to 1.0.5 in /docs #2621
- build(deps): Bump github.com/bytecodealliance/wasmtime-go from v11.0.0 to v12.0.0 by @kyleconroy in build(deps): Bump github.com/bytecodealliance/wasmtime-go from v11.0.0 to v12.0.0 #2666
- fix(compiler): Fix to not scan children under ast.RangeSubselect when retrieving table listing by @orisano in fix(compiler): Fix to not scan children under ast.RangeSubselect when retrieving table listing #2573
- feat(mysql): Add parser support for IS [NOT] NULL by @Jille in feat(mysql): Add parser support for IS [NOT] NULL #2651
- fix(engine/sqlite): support NOT IN by @orisano in fix(engine/sqlite): support NOT IN #2587
- fix(codegen/golang): Fixed detection of the used package by @orisano in fix(codegen/golang): Fixed detection of the used package #2597
- fix(engine/dolphin): Fixed problem that LIMIT OFFSET cannot be used with
UNION ALLby @orisano in fix(engine/dolphin): Fixed problem that LIMIT OFFSET cannot be used withUNION ALL#2613 - fix(compiler): support identifiers with schema by @orisano in fix(compiler): support identifiers with schema #2579
- fix(compiler): Fix column expansion to work with quoted non-keyword identifiers by @orisano in fix(compiler): Fix column expansion to work with quoted non-keyword identifiers #2576
- feat(engine/dolphin): support CALL statement by @orisano in feat(engine/dolphin): support CALL statement #2614
- fix(codegen): Compare define type in codegen by @tychy in fix(codegen): Compare define type in codegen #2578
- build(deps): bump sphinx-rtd-theme from 1.2.2 to 1.3.0 in /docs by @dependabot in build(deps): bump sphinx-rtd-theme from 1.2.2 to 1.3.0 in /docs #2670
- build(deps): bump sphinxcontrib-htmlhelp from 2.0.1 to 2.0.4 in /docs by @dependabot in build(deps): bump sphinxcontrib-htmlhelp from 2.0.1 to 2.0.4 in /docs #2671
- feat(codegen): Allow plugins to access environment variables by @kyleconroy in feat(codegen): Allow plugins to access environment variables #2669
- fix(engine/sqlite): Fix ast when using compound operator by @orisano in fix(engine/sqlite): Fix ast when using compound operator #2673
- fix(engine/sqlite): Fix to handle join clauses correctly by @orisano in fix(engine/sqlite): Fix to handle join clauses correctly #2674
- fix(codegen): use correct Go types for bit strings and cid/oid/tid/xid with pgx/v4 by @andrewmbenton in fix(codegen): use correct Go types for bit strings and cid/oid/tid/xid with pgx/v4 #2668
- build(deps): bump github.com/google/cel-go from 0.17.6 to 0.18.0 by @dependabot in build(deps): bump github.com/google/cel-go from 0.17.6 to 0.18.0 #2691
- docs: Missing emit_pointers_for_null_types configuration option in version 2 (Missing
emit_pointers_for_null_typesconfiguration option in version 2 #2682 ) by @topazur in docs: Missing emit_pointers_for_null_types configuration option in version 2 (#2682) #2683 - fix(endtoend): Ensure all SQL works against PostgreSQL by @kyleconroy in fix(endtoend): Ensure all SQL works against PostgreSQL #2684
- build(deps): bump actions/checkout from 3 to 4 by @dependabot in build(deps): bump actions/checkout from 3 to 4 #2694
- build(deps): bump pytz from 2023.3 to 2023.3.post1 in /docs by @dependabot in build(deps): bump pytz from 2023.3 to 2023.3.post1 in /docs #2695
- chore: fix typo by @remyleone in chore: fix typo #2696
- chore: fix typo by @remyleone in chore: fix typo #2697
- docs: Document sqlc.* macros by @kyleconroy in docs: Document sqlc.* macros #2698
- docs(mysql): Document parseTime=true requirement by @kyleconroy in docs(mysql): Document parseTime=true requirement #2699
- docs: add atlas to the list of supported migration frameworks by @andrewmbenton in docs: add atlas to the list of supported migration frameworks #2700
- docs: minor updates to insert howto by @andrewmbenton in docs: minor updates to insert howto #2701
- build(devenv): bump go from 1.20.7 to 1.21.0 by @kyleconroy in build(devenv): bump go from 1.20.7 to 1.21.0 #2702
- feat(config): Add JSON schema files for configs by @kyleconroy in feat(config): Add JSON schema files for configs #2703
- feat(cmd/sqlc): Bump version to 1.21.0 by @andrewmbenton in feat(cmd/sqlc): Bump version to 1.21.0 #2704
- cmd/sqlc: Bump version to v1.21.0 by @kyleconroy in cmd/sqlc: Bump version to v1.21.0 #2705
New Contributors
- @ken2403 made their first contribution in docs: Modify config file version of mysql tutorial #2555
- @verygoodsoftwarenotvirus made their first contribution in myriad formatting changes #2558
- @rollulus made their first contribution in docs: Reword phrase about pgx and multidimensional arrays #2619
- @tychy made their first contribution in fix(codegen): Compare define type in codegen #2578
- @topazur made their first contribution in docs: Missing emit_pointers_for_null_types configuration option in version 2 (#2682) #2683
- @remyleone made their first contribution in chore: fix typo #2696
Full Changelog: v1.20.0...v1.21.0
This discussion was created from the release v1.21.0.
Beta Was this translation helpful? Give feedback.
All reactions
-
🎉 4
Replies: 1 comment 2 replies
-
With this release, I am getting validation errors due to generating extra imports:
go run github.com/sqlc-dev/sqlc/cmd/sqlc generate
go run github.com/tmthrgd/go-bindata/go-bindata -pkg sqlgen -ignore bindata -nometadata -prefix migrations/ -o ./generated/sqlgen/bindata.go ./migrations
% go test ./services/progress-reports/queries/teacher
# github.com/Khan/webapp/services/progress-reports/generated/teachersql
services/progress-reports/generated/teachersql/querier.go:9:2: imported and not used: "database/sql"
services/progress-reports/generated/teachersql/querier.go:10:2: imported and not used: "time"
Beta Was this translation helpful? Give feedback.
All reactions
-
Looks like an instance of this issue, just reported: #2707
Beta Was this translation helpful? Give feedback.
All reactions
-
Yep, that's my co-worker!
Beta Was this translation helpful? Give feedback.