v1.19.0 #2410
kyleconroy
announced in
Announce
v1.19.0
#2410
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What's new
sqlc vet
sqlc vet
runs queries through a set of lint rules.Rules are defined in the
sqlc
configuration file. They consist of a name, message, and a Common Expression Language (CEL) expression. Expressions are evaluated using cel-go. If an expression evaluates totrue
, an error is reported using the given message.While these examples are simplistic, they give you a flavor of the types of rules you can write.
Database connectivity
vet
also marks the first time thatsqlc
can connect to a live, running database server. We'll expand this functionality over time, but for now it powers thesqlc/db-prepare
built-in rule.When a database is configured, the
sqlc/db-prepare
rule will attempt to prepare each of your queries against the connected database and report any failures.To see this in action, check out the authors example.
Please note that
sqlc
does not manage or migrate your database. Use your migration tool of choice to create the necessary database tables and objects before runningsqlc vet
.Omit unused structs
Added a new configuration parameter
omit_unused_structs
which, when set to true, filters out table and enum structs that aren't used in queries for a given package.Suggested CI/CD setup
With the addition of
sqlc diff
andsqlc vet
, we encourage users to run sqlc in your CI/CD pipelines. See our suggested CI/CD setup for more information.Simplified plugin development
The sqlc-gen-kotlin and sqlc-gen-python plugins have been updated use the upcoming WASI support in Go 1.21. Building these plugins no longer requires TinyGo.
What's Changed
New Contributors
Full Changelog: v1.18.0...v1.19.0
This discussion was created from the release v1.19.0.
Beta Was this translation helpful? Give feedback.
All reactions