fix(deps): update rust crate sqlx to 0.7 #464
Merged
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:
0.6
->0.7
Release Notes
launchbadge/sqlx (sqlx)
v0.7.0
Compare Source
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 tothis area.
The MSSQL driver has been removed as it was not nearly at the same maturity level as the other drivers.
As previously announced, 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.
If interested, please email your inquiry to [email protected].
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.
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.runtime-actix-*
features have been deleted. They were previously changed to be aliases of theirruntime-tokio-*
counterparts for backwards compatibility reasons, but their continued existence is misleading as SQLx has no special knowledge of Actix anymore.runtime-actix-*
feature with itsruntime-tokio-*
equivalent.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.Executor
impls forTransaction
andPoolConnection
have been deleted because they cannot exist in the new crate architecture without rewriting theExecutor
trait entirely.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
the driver crates cannot provide their own impls due to the orphan rule.
This will mean another major release of SQLx but ideally most API usage will not need to change significantly, if at all.
Migrator
are now#[doc(hidden)]
and semver-exempt; they weren't meant to be public.offline
feature has been removed from thesqlx
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.decimal
feature has been renamed torust_decimal
to match the crate it actually provides integrations for.AnyDriver
andAnyConnection
now require eithersqlx::any::install_drivers()
orsqlx::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 toAny
without them being hardcoded.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 thatlinks it such as
rusqlite
, you should pin the versions of both crates to avoid breakages fromcargo update
:time
: Assume UTC when decoding a DATETIME column in sqlite [[@nstinus]]OffsetDateTime
to be the first type used when deserializing atimestamp
type.Added
try_from
when derivingFromRow
[[@95ulisse]]PRAGMA optimize;
on close of a connection [[@miles170]]Connection::shrink_buffers
,PoolConnection::close
[[@abonander]]sqlx_macros_unstable
in config.toml [[@df51d]]AsMut
for advisory lock types (#2520) [[@alilleybrinker]]Changed
tracing
[[@CosmicHorrorDev]]let else
statements in favor of macro [[@OverHash]]dirs
withhome
&etcetera
[[@utkarshgupta137]]ConnectOptions
types implFromStr
[[@abonander]]Fixed
search_path
[[@95ulisse]]sqlx::test
[[@kenkoooo]]try_acquire
[[@abonander]]tracked_path
[[@df51d]]PrepareOk
fails to decode [[@stepantubanov]]0.6.3 - 2023-03-21
This is a hotfix to address the breakage caused by transitive dependencies upgrading to
syn = "2"
.We set
default-features = false
for our dependency onsyn = "1"
to be good crates.io citizens,but failed to enable the features we actually used, which went undetected because we transitively depended on
syn
with the default features enabled through other crates,and so they were also on for us because features are additive.
When those other dependencies upgraded to
syn = "2"
it was no longer enabling those features for us,and so compilation broke for projects that don't also depend on
syn = "1"
, transitively or otherwise.There is no PR for this fix as there was no longer a dedicated development branch for
0.6
,but discussion can be found in issue #2418.
As of this release, the
0.7
release is in alpha and so development is no longer occurring against0.6
.This fix will be forward-ported to
0.7
.v0.6.3
Compare Source
This is a hotfix to address the breakage caused by transitive dependencies upgrading to
syn = "2"
.We set
default-features = false
for our dependency onsyn = "1"
to be good crates.io citizens,but failed to enable the features we actually used, which went undetected because we transitively depended on
syn
with the default features enabled through other crates,and so they were also on for us because features are additive.
When those other dependencies upgraded to
syn = "2"
it was no longer enabling those features for us,and so compilation broke for projects that don't also depend on
syn = "1"
, transitively or otherwise.There is no PR for this fix as there was no longer a dedicated development branch for
0.6
,but discussion can be found in issue #2418.
As of this release, the
0.7
release is in alpha and so development is no longer occurring against0.6
.This fix will be forward-ported to
0.7
.v0.6.2
Compare Source
25 pull requests were merged this release cycle.
Added
try_from
attribute forFromRow
derive [[@zzhengzhuo]]the second page. We'll be sure to clean out the backlog for 0.7.0.
IpAddr
support in Postgres [[@rakshith-ravi]]Changed
prepare
[[@cycraig]]Fixed
#[sqlx(flatten)]
forFromRow
derive [[@RustyYato]]#[test]
from#[sqlx::test]
[[@alexander-jackson]]FromRow
docs [[@zlidner]]sqlite3_exec
[[@madadam]]prepare
race condition in workspaces [[@cycraig]]\target/
thatcargo sqlx prepare
depends on.If you use offline mode in your workflow, please rerun
cargo install sqlx-cli
to upgrade.v0.6.1
Compare Source
33 pull requests were merged this release cycle.
Added
FromRow
trait [[@Erik1000]]std::net::IpAddr
[[@meh]]INET
value in Postgres is a prefix and not a full address(
/32
for IPv4,/128
for IPv6).time
crate [[@johnbcodes]]QueryBuilder::separated()
[[@sbeckeriv]]sqlx::types::Json
[[@jayy-lmao]]Clone
forPoolOptions
[[@Thomasdezeeuw]]push_tuples
forQueryBuilder
[[@0xdeafbeef]]#[sqlx(flatten)]
attribute inFromRow
[[@TheoOiry]]query_builder::Separated::push_bind_unseparated()
[[@0xdeafbeef]]#[sqlx::test]
for general useQueryBuilder
improvements [[@abonander]]QueryAs
instead ofQuery
.Changed
query_as!()
andFromRow
[[@abonander]]dotenv
withdotenvy
[[@abonander]]Fixed
cargo sqlx prepare --merged
[[@LovecraftianHorror]]Any
database driver [[@raviqqe]]CARGO_TARGET_DIR
when compiling queries [[@sedrik]]BYTEA
decode [[@e00E]]S
orV
notice fields are not UTF-8 [[@abonander]]rust-cache
action for CI [[@abonander]]PgListener
[[@crepererum]]master
tomain
in docs [[@crepererum]]Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.