chore(deps): update dependency sqlc to v1 #28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
@latest→1.30.0Release Notes
sqlc-dev/sqlc (sqlc)
v1.30.0What's Changed
pcast.ChangeStmtby @andrewmbenton in #4057go_struct_tagfordb_typeoverrides by @andrewmbenton in #4055New Contributors
Full Changelog: sqlc-dev/sqlc@v1.29.0...v1.30.0
v1.29.0What's Changed
New Contributors
Full Changelog: sqlc-dev/sqlc@v1.28.0...v1.29.0
v1.28.0What's Changed
Fixes
Features
Documentation
Misc
New Contributors
Full Changelog: sqlc-dev/sqlc@v1.27.0...v1.28.0
v1.27.0Release notes
Sunsetting hosted ephemeral databases
On September 4th, 2024, we'll be turning off support for hosted ephemeral databases in sqlc Cloud. If you use managed databases or query verification with sqlc Cloud, you'll need to update to 1.27.0 to avoid any issues. I've already emailed you if you're using this feature. It's more than likely that you are not!
https://redirect.github.com/sqlc-dev/sqlc/discussions/3422
Bug Fixes
Features
Documentation
Testing
v1.26.0Release notes
This release is mainly a bug fix release. It also includes an important security fix for users using output plugins.
Changes
Bug Fixes
int16for MySQLSMALLINTandYEAR(#3106)int8for MySQL TINYINT (#3298)Documentation
Features
Build
v1.25.0What's new
Add tags to push and verify
You can add tags when pushing schema and queries to sqlc Cloud. Tags operate like git tags, meaning you can overwrite previously-pushed tag values. We suggest tagging pushes to associate them with something relevant from your environment, e.g. a git tag or branch name.
Once you've created a tag, you can refer to it when verifying changes, allowing you
to compare the existing schema against a known set of previous queries.
C-ya,
cgoOver the last month, we've switched out a few different modules to remove our reliance on cgo. Previously, we needed cgo for three separate functions:
With the help of the community, we found cgo-free alternatives for each module:
For the first time, Windows users can enjoy full PostgreSQL support without using WSL. It's a Christmas miracle!
If you run into any issues with the updated dependencies, please open an issue.
Bug Fixes
nameannotation (#3072)"strings"forsqlc.slice()with pgx (#3073)Documentation
push, add Go plugin link (#3023)Features
emit_sql_as_commentoption to Go code plugin (#2735)Testing
Build
New Contributors
Full Changelog: sqlc-dev/sqlc@v1.24.0...v1.25.0
v1.24.0What's new
Verifying database schema changes
Schema updates and poorly-written queries often bring down production databases. That’s bad.
Out of the box,
sqlc generatecatches some of these issues. Runningsqlc vetwith thesqlc/db-preparerule catches more subtle problems. But there is a large class of issues that sqlc can’t prevent by looking at current schema and queries alone.For instance, when a schema change is proposed, existing queries and code running in production might fail when the schema change is applied. Enter
sqlc verify, which analyzes existing queries against new schema changes and errors if there are any issues.Let's look at an example. Assume you have these two tables in production.
Your application contains the following query to join user actions against the users table.
So far, so good. Then assume you propose this schema change:
Running
sqlc generatefails with this change, returning acolumn reference "created_at" is ambiguouserror. You update your query to fix the issue.While that change fixes the issue, there's a production outage waiting to happen. When the schema change is applied, the existing
GetUserActionsquery will begin to fail. The correct way to fix this is to deploy the updated query before applying the schema migration.It ensures migrations are safe to deploy by sending your current schema and queries to sqlc cloud. There, we run the queries for your latest push against your new schema changes. This check catches backwards incompatible schema changes for existing queries.
Here
sqlc verifyalerts you to the fact that ORDER BY "created_at" is ambiguous.$ sqlc verify FAIL: app query.sql === Failed === FAIL: app query.sql GetUserActions ERROR: column reference "created_at" is ambiguous (SQLSTATE 42702)By the way, this scenario isn't made up! It happened to us a few weeks ago. We've been happily testing early versions of
verifyfor the last two weeks and haven't had any issues since.This type of verification is only the start. If your application is deployed on-prem by your customers,
verifycould tell you if it's safe for your customers to rollback to an older version of your app, even after schema migrations have been run.Rename
uploadcommand topushWe've renamed the
uploadsub-command topush. We changed the data sent along in a push request. Upload used to include the configuration file, migrations, queries, and all generated code. Push drops the generated code in favor of including the plugin.GenerateRequest, which is the protocol buffer message we pass to codegen plugins.We also add annotations to each push. By default, we include these environment variables if they are present:
Like upload,
pushshould be run when you tag a release of your application. We run it on every push to main, as we continuously deploy those commits.MySQL support in
createdbThe
createdbcommand, added in the last release, now supports MySQL. If you have a cloud project configured, you can usesqlc createdbto spin up a new ephemeral database with your schema and print its connection string to standard output. This is useful for integrating with other tools. Read more in the managed databases documentation.Plugin interface refactor
This release includes a refactored plugin interface to better support future functionality. Plugins now support different methods via a gRPC service interface, allowing plugins to support different functionality in a backwards-compatible way.
By using gRPC interfaces, we can even (theoretically) support remote plugins, but that's something for another day.
New Contributors
Full Changelog: sqlc-dev/sqlc@v1.23.0...v1.24.0
v1.23.0What's new
Database-backed query analysis
With a database connection configured,
sqlc generatewill gather metadata from that database to support its query analysis. Turning this on resolves a large number of issues in the backlog related to type inference and more complex queries. The easiest way to try it out is with managed databases.The database-backed analyzer currently supports PostgreSQL, with MySQL and SQLite support planned in the future.
New
createdbcommandWhen you have a cloud project configured, you can use the new
sqlc createdbcommand to spin up a new ephemeral database with your schema and print its connection string to standard output. This is useful for integrating with other tools. Read more in the managed databases documentation.Support for pgvector
If you're using pgvector, say goodbye to custom overrides! sqlc now generates code using pgvector-go as long as you're using
pgx. The pgvector extension is also available in managed databases.Go build tags
With the new
emit_build_tagsconfiguration parameter you can set build tags for sqlc to add at the top of generated source files.What's Changed
databaseconfig in all cases by @andrewmbenton in #2856CommentSyntaxon windows by @andrewmbenton in #2867Configuration
📅 Schedule: Branch creation - "after 10pm every weekday,before 6am every weekday,every weekend" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.