Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

v1.21.0 #2706

Closed
v1.21.0 #2706
Sep 6, 2023 · 1 comments · 2 replies
Discussion options

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

New Contributors

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


This discussion was created from the release v1.21.0.
You must be logged in to vote

Replies: 1 comment 2 replies

Comment options

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"
You must be logged in to vote
2 replies
Comment options

Looks like an instance of this issue, just reported: #2707

Comment options

Yep, that's my co-worker!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /