At least 70 pull requests were merged this release cycle! (The exact count is muddied with pull requests for alpha
releases and such.) And we gained 43 new contributors! Thank you to everyone who helped make this release a reality.
Breaking
Many revisions were made to query analysis in the SQLite driver; these are all potentially breaking changes
as they can change the output of sqlx::query!()et al. We'd like to thank [[@tyrelr]] for their numerous PRs to
this area.
The MSSQL driver has been removed as it was not nearly at the same maturity level as the other drivers.
[As previously announced][sqlx-pro], we have plans to introduce a fully featured replacement as a premium offering,
alongside drivers for other proprietary databases, with the goal to support full-time development on SQLx.
The offline mode for the queries has been changed to use a separate file per query!() invocation,
which is intended to reduce the number of conflicts when merging branches in a project that both modified queries.
See [#2363] for details.
The type ascription override syntax for the query macros has been deprecated,
as parse support for it has been removed in syn 2.0, which we'll be upgrading to in the next breaking release.
This can be replaced with type overrides using casting syntax (as).
See [#2483] for details.
[#1946]: Fix compile time verification performance regression for sqlite [[@liningpan]]
[#1960]: Fix sqlite update return and order by type inference [[@tyrelr]]
[#1984]: Sqlite EXPLAIN type inference improvements [[@rongcuid]]
[#2039]: Break drivers out into separate crates, clean up some technical debt [[@abonander]]
All deprecated items have been removed.
The mssql feature and associated database driver has been deleted from the source tree. It will return as part of our planned SQLx Pro offering as a from-scratch rewrite with extra features (such as TLS) and type integrations that were previously missing.
The runtime-actix-* features have been deleted. They were previously changed to be aliases of their runtime-tokio-* counterparts for backwards compatibility reasons, but their continued existence is misleading as SQLx has no special knowledge of Actix anymore.
To fix, simply replace the runtime-actix-* feature with its runtime-tokio-* equivalent.
The git2 feature has been removed. This was a requested integration from a while ago that over time made less and less sense to be part of SQLx itself. We have to be careful with the crates we add to our public API as each one introduces yet another semver hazard. The expected replacement is to make #[derive(sqlx::Type)] useful enough that users can write wrapper types for whatever they want to use without SQLx needing to be specifically aware of it.
The Executor impls for Transaction and PoolConnection have been deleted because they cannot exist in the new crate architecture without rewriting the Executor trait entirely.
To fix this breakage, simply add a dereference where an impl Executor is expected, as they both dereference to the inner connection type which will still implement it:
&mut transaction -> &mut *transaction
&mut connection -> &mut *connection
These cannot be blanket impls as it triggers an overflow in the compiler due to the lack of lazy normalization, and
the driver crates cannot provide their own impls due to the orphan rule.
We're expecting to do another major refactor of traits to incorporate generic associated types (GAT).
This will mean another major release of SQLx but ideally most API usage will not need to change significantly, if at all.
The fields of Migrator are now #[doc(hidden)] and semver-exempt; they weren't meant to be public.
The offline feature has been removed from the sqlx facade crate and is enabled unconditionally as most users are expected to have enabled it anyway and disabling it doesn't seem to appreciably affect compile times.
The decimal feature has been renamed to rust_decimal to match the crate it actually provides integrations for.
AnyDriver and AnyConnection now require either sqlx::any::install_drivers() or sqlx::any::install_default_drivers() to be called at some point during the process' lifetime before the first connection is made, as the set of possible drivers is now determined at runtime. This was determined to be the least painful way to provide knowledge of database drivers to Any without them being hardcoded.
Alongside this upgrade, we are now considering the linkage to libsqlite3-sys to be semver-exempt,
and we reserve the right to upgrade it as necessary. If you are using libsqlite3-sys directly or a crate that
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Updates the requirements on sqlx to permit the latest version.
Changelog
Sourced from sqlx's changelog.
... (truncated)
Commits
dcb58b0
0.7.0 release (#2575)1bdbeda
ImplAsMut
for advisory lock types (#2520) (#2554)e2ce463
doc: make it clear thatConnectOptions
types implFromStr
(#2574)3fbc3a3
(sqlite) do not drop notify mutex until after condvar is triggered (#2573)1b7631e
Add CLI autocompletion using clap_complete (#2559)4b254ea
sqlite date macro support (#2491)87ff645
Exposing the Oid of PostgreSQL types (#2507)c2e54ea
add args to query builder (#2494) (#2506)3fdb79d
Do not panic when PrepareOk fails to decode (#2572)8c7f541
Update rsa to 0.9 (#2563)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)