@@ -5,20 +5,14 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8- ## 0.9.0-alpha.1 - 2025-05-19
8+ ## 0.9.0-alpha.1 - 2025-10-14
99
1010Accumulated changes since the beginning of the alpha cycle. Effectively a draft CHANGELOG for the 0.9.0 release.
1111
1212This section will be replaced in subsequent alpha releases. See the Git history of this file for previous alphas.
1313
1414### Breaking
1515
16- * [[ #3821 ]] : Groundwork for 0.9.0-alpha.1 [[ @abonander ]]
17- * Increased MSRV to 1.86 and set rust-version
18- * Deleted deprecated combination runtime+TLS features (e.g. ` runtime-tokio-native-tls ` )
19- * Deleted re-export of unstable ` TransactionManager ` trait in ` sqlx ` .
20- * Not technically a breaking change because it's ` #[doc(hidden)] ` ,
21- but [ it _ will_ break SeaORM] [ seaorm-2600 ] if not proactively fixed.
2216* [[ #3383 ]] : feat: create ` sqlx.toml ` format [[ @abonander ]]
2317 * SQLx and ` sqlx-cli ` now support per-crate configuration files (` sqlx.toml ` )
2418 * New functionality includes, but is not limited to:
@@ -42,9 +36,136 @@ This section will be replaced in subsequent alpha releases. See the Git history
4236 * ** Breaking changes** :
4337 * Significant changes to the ` Migrate ` trait
4438 * ` sqlx::migrate::resolve_blocking() ` is now ` #[doc(hidden)] ` and thus SemVer-exempt.
39+ * [[ #3486 ]] : fix(logs): Correct spelling of aquired_after_secs tracing field [[ @iamjpotts ]]
40+ * Breaking behavior change: implementations parsing ` tracing ` logs from SQLx will need to update the spelling.
41+ * [[ #3495 ]] : feat(postgres): remove lifetime from ` PgAdvisoryLockGuard ` [[ @bonsairobo ]]
42+ * [[ #3526 ]] : Return &mut Self from the migrator set_ methods [[ @nipunn1313 ]]
43+ * Minor breaking change: ` Migrator::set_ignore_missing ` and ` set_locking ` now return ` &mut Self ` instead of ` &Self `
44+ which may break code in rare circumstances.
45+ * [[ #3541 ]] : Postgres: force generic plan for better nullability inference. [[ @joeydewaal ]]
46+ * Breaking change: may alter the output of the ` query!() ` macros for certain queries in Postgres.
47+ * [[ #3613 ]] : fix: ` RawSql ` lifetime issues [[ @abonander ]]
48+ * Breaking change: adds ` DB ` type parameter to all methods of ` RawSql `
49+ * [[ #3670 ]] : Bump ipnetwork to v0.21.1 [[ @BeauGieskens ]]
50+ * [[ #3674 ]] : Implement ` Decode ` , ` Encode ` and ` Type ` for ` Box ` , ` Arc ` , ` Cow ` and ` Rc ` [[ @joeydewaal ]]
51+ * Breaking change: ` impl Decode for Cow ` now always decodes ` Cow::Owned ` , lifetime is unlinked
52+ * See this discussion for motivation: https://github.com/launchbadge/sqlx/pull/3674#discussion_r2008611502
53+ * [[ #3723 ]] : Add SqlStr [[ @joeydewaal ]]
54+ * Breaking change: all ` query*() ` functions now take ` impl SqlSafeStr `
55+ which is only implemented for ` &'static str ` and ` AssertSqlSafe ` .
56+ For all others, wrap in ` AssertSqlSafe(<query>) ` .
57+ * This, along with [[ #3960 ]] , finally allows returning owned queries as the type will be ` Query<'static, DB> ` .
58+ * ` SqlSafeStr ` trait is deliberately similar to ` std::panic::UnwindSafe ` ,
59+ serving as a speedbump to warn users about naïvely building queries with ` format!() `
60+ while allowing a workaround for advanced usage that is easy to spot on code review.
61+ * [[ #3800 ]] : Escape PostgreSQL Options [[ @V02460 ]]
62+ * Breaking behavior change: options passed to ` PgConnectOptions::options() ` are now automatically escaped.
63+ Manual escaping of options is no longer necessary and may cause incorrect behavior.
64+ * [[ #3821 ]] : Groundwork for 0.9.0-alpha.1 [[ @abonander ]]
65+ * Increased MSRV to 1.86 and set rust-version
66+ * Deleted deprecated combination runtime+TLS features (e.g. ` runtime-tokio-native-tls ` )
67+ * Deleted re-export of unstable ` TransactionManager ` trait in ` sqlx ` .
68+ * Not technically a breaking change because it's ` #[doc(hidden)] ` ,
69+ but [ it _ will_ break SeaORM] [ seaorm-2600 ] if not proactively fixed.
70+ * [[ #3924 ]] : breaking(mysql): assume all non-binary collations compatible with ` str ` [[ @abonander ]]
71+ * Text (or text-like) columns which previously were inferred to be ` Vec<u8> ` will be inferred to be ` String `
72+ (this should ultimately fix more code than it breaks).
73+ * ` SET NAMES utf8mb4 COLLATE utf8_general_ci ` is no longer sent by default; instead, ` SET NAMES utf8mb4 ` is sent to
74+ allow the server to select the appropriate default collation (since this is version- and configuration-dependent).
75+ * ` MySqlConnectOptions::charset() ` and ` ::collation() ` now imply ` ::set_names(true) ` because they don't do anything otherwise.
76+ * Setting ` charset ` doesn't change what's sent in the ` Protocol::HandshakeResponse41 ` packet as that normally only
77+ matters for error messages before ` SET NAMES ` is sent.
78+ The default collation if ` set_names = false ` is ` utf8mb4_general_ci ` .
79+ * See [ this comment] ( https://github.com/launchbadge/sqlx/blob/388c424f486bf20542a8a37d296dbcf86bb6dffd/sqlx-mysql/src/collation.rs#L1-L37 ) for details.
80+ * Incidental breaking change: ` RawSql::fetch_optional() ` now returns ` sqlx::Result<Option<DB::Row>> `
81+ instead of ` sqlx::Result<DB::Row> ` . Whoops.
82+ * [[ #3928 ]] : breaking(sqlite): ` libsqlite3-sys ` versioning, feature flags, safety changes [[ @abonander ]]
83+ * SemVer policy changes: ` libsqlite3-sys ` version is now specified using a range.
84+ The maximum of the range may now be increased in any backwards-compatible release.
85+ The minimum of the range may only be increased in major releases.
86+ If you have ` libsqlite3-sys ` in your dependencies, Cargo should choose a compatible version automatically.
87+ If otherwise unconstrained, Cargo should choose the latest version supported.
88+ * SQLite extension loading (including through the new ` sqlx-toml ` feature) is now ` unsafe ` .
89+ * Added new ** non-default** features corresponding to conditionally compiled SQLite APIs:
90+ * ` sqlite-deserialize ` enabling ` SqliteConnection::serialize() ` and ` SqliteConnection::deserialize() `
91+ * ` sqlite-load-extension ` enabling ` SqliteConnectOptions::extension() ` and ` ::extension_with_entrypoint() `
92+ * ` sqlite-unlock-notify ` enables internal use of ` sqlite3_unlock_notify() `
93+ * ` SqliteValue ` and ` SqliteValueRef ` changes:
94+ * The [ ` sqlite3_value* ` interface] ( https://www.sqlite.org/c3ref/value_blob.html ) reserves the right to be stateful.
95+ Without protection, any call could theoretically invalidate values previously returned, leading to dangling pointers.
96+ * ` SqliteValue ` is now ` !Sync ` and ` SqliteValueRef ` is ` !Send ` to prevent data races from concurrent accesses.
97+ * Instead, clone or wrap the ` SqliteValue ` in ` Mutex ` , or convert the ` SqliteValueRef ` to an owned value.
98+ * ` SqliteValue ` and any derived ` SqliteValueRef ` s now internally track if that value has been used to decode a
99+ borrowed ` &[u8] ` or ` &str ` and errors if it's used to decode any other type.
100+ * This is not expected to affect the vast majority of usages, which should only decode a single type
101+ per ` SqliteValue ` /` SqliteValueRef ` .
102+ * See new docs on ` SqliteValue ` for details.
103+ * [[ #3949 ]] : Postgres: move ` PgLTree::from ` to ` From<Vec<PgLTreeLabel>> ` implementation [[ @JerryQ17 ]]
104+ * [[ #3957 ]] : refactor(sqlite): do not borrow bound values, delete lifetime on ` SqliteArguments ` [[ @iamjpotts ]]
105+ * [[ #3958 ]] : refactor(any): Remove lifetime parameter from AnyArguments [[ @iamjpotts ]]
106+ * [[ #3960 ]] : refactor(core): Remove lifetime parameter from Arguments trait [[ @iamjpotts ]]
107+ * [[ #4008 ]] : make ` #[derive(sqlx::Type)] ` automatically generate ` impl PgHasArrayType ` by default for newtype structs [[ @papaj-na-wrotkach ]]
108+ * Manual implementations of PgHasArrayType for newtypes will conflict with the generated one.
109+ Delete the manual impl or add ` #[sqlx(no_pg_array)] ` where conflicts occur.
45110
46- ### Fixed
111+ ### Added
112+ * [[ #3641 ]] : feat(Postgres): support nested domain types [[ @joeydewaal ]]
113+ * [[ #3651 ]] : Add PgBindIter for encoding and use it as the implementation encoding &[ T] [[ @tylerhawkes ]]
114+ * [[ #3675 ]] : feat: implement Encode, Decode, Type for ` Arc<str> ` and ` Arc<[u8]> ` (and ` Rc ` equivalents) [[ @joeydewaal ]]
115+ * [[ #3791 ]] : Smol+async global executor 1.80 dev [[ @martin-kolarik ]]
116+ * Adds ` runtime-smol ` and ` runtime-async-global-executor ` features to replace usages of the deprecated ` async-std ` crate.
117+ * [[ #3859 ]] : Add more JsonRawValue encode/decode impls. [[ @Dirbaio ]]
118+ * [[ #3881 ]] : CLi: made cli-lib modules publicly available for other crates [[ @silvestrpredko ]]
119+ * [[ #3889 ]] : Compile-time support for external drivers [[ @bobozaur ]]
120+ * [[ #3917 ]] : feat(sqlx.toml): support SQLite extensions in macros and sqlx-cli [[ @djarb ]]
121+ * [[ #3918 ]] : Feature: Add exclusion violation error kind [[ @barskern ]]
122+ * [[ #3971 ]] : Allow single-field named structs to be transparent [[ @Xiretza ]]
123+ * [[ #4015 ]] : feat(sqlite): ` no_tx ` migration support [[ @AlexTMjugador ]]
124+ * [[ #4020 ]] : Add ` Migrator::with_migrations() ` constructor [[ @xb284524239 ]]
125+
126+ ### Changed
127+ * [[ #3525 ]] : Remove unnecessary boxfutures [[ @joeydewaal ]]
128+ * [[ #3867 ]] : sqlx-postgres: Bump etcetera to 0.10.0 [[ @miniduikboot ]]
129+ * [[ #3709 ]] : chore: replace once_cell ` OnceCell ` /` Lazy ` with std ` OnceLock ` /` LazyLock ` [[ @paolobarbolini ]]
130+ * [[ #3890 ]] : feat: Unify ` Debug ` implementations across ` PgRow ` , ` MySqlRow ` and ` SqliteRow ` [[ @davidcornu ]]
131+ * [[ #3911 ]] : chore: upgrade async-io to v2.4.1 [[ @zebrapurring ]]
132+ * [[ #3938 ]] : Move ` QueryLogger ` back [[ @joeydewaal ]]
133+ * [[ #3956 ]] : chore(sqlite): Remove unused test of removed git2 feature [[ @iamjpotts ]]
134+ * [[ #3962 ]] : Give SQLX_OFFLINE_DIR from environment precedence in macros [[ @psionic-k ]]
135+ * [[ #3968 ]] : chore(ci): Add timeouts to ci jobs [[ @iamjpotts ]]
136+ * [[ #4002 ]] : sqlx-postgres(tests): cleanup 2 unit tests. [[ @joeydewaal ]]
137+ * [[ #4022 ]] : refactor: tweaks after #3791 [[ @abonander ]]
47138
139+ ### Fixed
140+ * [[ #3840 ]] : Fix docs.rs build of sqlx-sqlite [[ @gferon ]]
141+ * [[ #3848 ]] : fix(macros): don't mutate environment variables [[ @joeydewaal ]]
142+ * [[ #3856 ]] : fix(macros): slightly improve unsupported type error message [[ @dyc3 ]]
143+ * [[ #3857 ]] : fix(mysql): validate parameter count for prepared statements [[ @cvzx ]]
144+ * [[ #3861 ]] : Fix NoHostnameTlsVerifier for rustls 0.23.24 and above [[ @elichai ]]
145+ * [[ #3863 ]] : Use unnamed statement in pg when not persistent [[ @ThomWright ]]
146+ * [[ #3874 ]] : Further reduce dependency on ` futures ` and ` futures-util ` [[ @paolobarbolini ]]
147+ * [[ #3886 ]] : fix: use Executor::fetch in QueryAs::fetch [[ @bobozaur ]]
148+ * [[ #3910 ]] : feat(ok): add correct handling of ok packets in MYSQL implementation [[ @0xfourzerofour ]]
149+ * [[ #3914 ]] : fix: regenerate test certificates [[ @abonander ]]
150+ * [[ #3915 ]] : fix: spec_error is used by try_from derive [[ @saiintbrisson ]]
151+ * [[ #3919 ]] : fix[ sqlx-postgres] : do a checked_mul to prevent panic'ing [[ @nhatcher-frequenz ]]
152+ * [[ #3923 ]] : sqlx-mysql: Fix bug in cleanup test db's. [[ @joeydewaal ]]
153+ * [[ #3950 ]] : chore: Fix warnings for custom postgres_ ## cfg flags [[ @iamjpotts ]]
154+ * [[ #3952 ]] : ` Pool.close ` : close all connections before returning [[ @jpmelos ]]
155+ * [[ #3975 ]] : fix documentation for rustls native root certificates [[ @2ndDerivative ]]
156+ * [[ #3977 ]] : refactor(ci): Use separate job for postgres ssl auth tests [[ @iamjpotts ]]
157+ * [[ #3980 ]] : Correctly ` ROLLBACK ` transaction when dropped during ` BEGIN ` . [[ @kevincox ]]
158+ * [[ #3981 ]] : SQLite: fix transaction level accounting with bad custom command. [[ @kevincox ]]
159+ * [[ #3986 ]] : chore(core): Fix docstring for Query::try_bind [[ @iamjpotts ]]
160+ * [[ #3987 ]] : chore(deps): Resolve deprecation warning for chrono Date and ymd methods [[ @iamjpotts ]]
161+ * [[ #3988 ]] : refactor(sqlite): Resolve duplicate test target warning for macros.rs [[ @iamjpotts ]]
162+ * [[ #3989 ]] : chore(deps): Set default-features=false on sqlx in workspace.dependencies [[ @iamjpotts ]]
163+ * [[ #3991 ]] : fix(sqlite): regression when decoding nulls [[ @abonander ]]
164+ * [[ #4006 ]] : PostgreSQL SASL – run SHA256 in a blocking executor [[ @ThomWright ]]
165+ * [[ #4007 ]] : fix(compose): use OS-assigned ports for all conatiners [[ @papaj-na-wrotkach ]]
166+ * [[ #4009 ]] : Drop cached db connections in macros upon hitting an error [[ @swlynch99 ]]
167+ * [[ #4024 ]] : fix(sqlite) Migrate revert with no-transaction [[ @Dosenpfand ]]
168+ * [[ #4027 ]] : native tls handshake: build TlsConnector in blocking threadpool [[ @daviduebler ]]
48169* [[ #4053 ]] : fix(macros): smarter ` .env ` loading, caching, and invalidation [[ @abonander ]]
49170 * Additional credit to [[ @AlexTMjugador ]] ([[ #4018 ]] ) and [[ @Diggsey ]] ([[ #4039 ]] ) for their proposed solutions
50171 which served as a useful comparison.
@@ -55,7 +176,76 @@ This section will be replaced in subsequent alpha releases. See the Git history
55176
56177[ #3821 ] : https://github.com/launchbadge/sqlx/pull/3821
57178[ #3383 ] : https://github.com/launchbadge/sqlx/pull/3383
179+ [ #3486 ] : https://github.com/launchbadge/sqlx/pull/3486
180+ [ #3495 ] : https://github.com/launchbadge/sqlx/pull/3495
181+ [ #3525 ] : https://github.com/launchbadge/sqlx/pull/3525
182+ [ #3526 ] : https://github.com/launchbadge/sqlx/pull/3526
183+ [ #3541 ] : https://github.com/launchbadge/sqlx/pull/3541
184+ [ #3613 ] : https://github.com/launchbadge/sqlx/pull/3613
185+ [ #3641 ] : https://github.com/launchbadge/sqlx/pull/3641
186+ [ #3651 ] : https://github.com/launchbadge/sqlx/pull/3651
187+ [ #3670 ] : https://github.com/launchbadge/sqlx/pull/3670
188+ [ #3674 ] : https://github.com/launchbadge/sqlx/pull/3674
189+ [ #3675 ] : https://github.com/launchbadge/sqlx/pull/3675
190+ [ #3709 ] : https://github.com/launchbadge/sqlx/pull/3709
191+ [ #3723 ] : https://github.com/launchbadge/sqlx/pull/3723
192+ [ #3791 ] : https://github.com/launchbadge/sqlx/pull/3791
193+ [ #3800 ] : https://github.com/launchbadge/sqlx/pull/3800
194+ [ #3821 ] : https://github.com/launchbadge/sqlx/pull/3821
195+ [ #3840 ] : https://github.com/launchbadge/sqlx/pull/3840
196+ [ #3848 ] : https://github.com/launchbadge/sqlx/pull/3848
197+ [ #3856 ] : https://github.com/launchbadge/sqlx/pull/3856
198+ [ #3857 ] : https://github.com/launchbadge/sqlx/pull/3857
199+ [ #3859 ] : https://github.com/launchbadge/sqlx/pull/3859
200+ [ #3861 ] : https://github.com/launchbadge/sqlx/pull/3861
201+ [ #3863 ] : https://github.com/launchbadge/sqlx/pull/3863
202+ [ #3867 ] : https://github.com/launchbadge/sqlx/pull/3867
203+ [ #3874 ] : https://github.com/launchbadge/sqlx/pull/3874
204+ [ #3881 ] : https://github.com/launchbadge/sqlx/pull/3881
205+ [ #3886 ] : https://github.com/launchbadge/sqlx/pull/3886
206+ [ #3889 ] : https://github.com/launchbadge/sqlx/pull/3889
207+ [ #3890 ] : https://github.com/launchbadge/sqlx/pull/3890
208+ [ #3910 ] : https://github.com/launchbadge/sqlx/pull/3910
209+ [ #3911 ] : https://github.com/launchbadge/sqlx/pull/3911
210+ [ #3914 ] : https://github.com/launchbadge/sqlx/pull/3914
211+ [ #3915 ] : https://github.com/launchbadge/sqlx/pull/3915
212+ [ #3917 ] : https://github.com/launchbadge/sqlx/pull/3917
213+ [ #3918 ] : https://github.com/launchbadge/sqlx/pull/3918
214+ [ #3919 ] : https://github.com/launchbadge/sqlx/pull/3919
215+ [ #3923 ] : https://github.com/launchbadge/sqlx/pull/3923
216+ [ #3924 ] : https://github.com/launchbadge/sqlx/pull/3924
217+ [ #3928 ] : https://github.com/launchbadge/sqlx/pull/3928
218+ [ #3938 ] : https://github.com/launchbadge/sqlx/pull/3938
219+ [ #3949 ] : https://github.com/launchbadge/sqlx/pull/3949
220+ [ #3950 ] : https://github.com/launchbadge/sqlx/pull/3950
221+ [ #3952 ] : https://github.com/launchbadge/sqlx/pull/3952
222+ [ #3956 ] : https://github.com/launchbadge/sqlx/pull/3956
223+ [ #3957 ] : https://github.com/launchbadge/sqlx/pull/3957
224+ [ #3958 ] : https://github.com/launchbadge/sqlx/pull/3958
225+ [ #3960 ] : https://github.com/launchbadge/sqlx/pull/3960
226+ [ #3962 ] : https://github.com/launchbadge/sqlx/pull/3962
227+ [ #3968 ] : https://github.com/launchbadge/sqlx/pull/3968
228+ [ #3971 ] : https://github.com/launchbadge/sqlx/pull/3971
229+ [ #3975 ] : https://github.com/launchbadge/sqlx/pull/3975
230+ [ #3977 ] : https://github.com/launchbadge/sqlx/pull/3977
231+ [ #3980 ] : https://github.com/launchbadge/sqlx/pull/3980
232+ [ #3981 ] : https://github.com/launchbadge/sqlx/pull/3981
233+ [ #3986 ] : https://github.com/launchbadge/sqlx/pull/3986
234+ [ #3987 ] : https://github.com/launchbadge/sqlx/pull/3987
235+ [ #3988 ] : https://github.com/launchbadge/sqlx/pull/3988
236+ [ #3989 ] : https://github.com/launchbadge/sqlx/pull/3989
237+ [ #3991 ] : https://github.com/launchbadge/sqlx/pull/3991
238+ [ #4002 ] : https://github.com/launchbadge/sqlx/pull/4002
239+ [ #4006 ] : https://github.com/launchbadge/sqlx/pull/4006
240+ [ #4007 ] : https://github.com/launchbadge/sqlx/pull/4007
241+ [ #4008 ] : https://github.com/launchbadge/sqlx/pull/4008
242+ [ #4009 ] : https://github.com/launchbadge/sqlx/pull/4009
243+ [ #4015 ] : https://github.com/launchbadge/sqlx/pull/401
58244[ #4018 ] : https://github.com/launchbadge/sqlx/pull/4018
245+ [ #4020 ] : https://github.com/launchbadge/sqlx/pull/4020
246+ [ #4022 ] : https://github.com/launchbadge/sqlx/pull/4022
247+ [ #4024 ] : https://github.com/launchbadge/sqlx/pull/4024
248+ [ #4027 ] : https://github.com/launchbadge/sqlx/pull/4027
59249[ #4039 ] : https://github.com/launchbadge/sqlx/pull/4039
60250[ #4053 ] : https://github.com/launchbadge/sqlx/pull/4053
61251
@@ -2960,4 +3150,28 @@ Fix docs.rs build by enabling a runtime feature in the docs.rs metadata in `Carg
29603150[@ dyc3]: https: // github.com/dyc3
29613151[@ ThomWright ]: https: // github.com/ThomWright
29623152[@ duhby]: https: // github.com/duhby
3153+ [@ V02460 ]: https: // github.com/V02460
3154+ [@ nipunn1313]: https: // github.com/nipunn1313
3155+ [@ miniduikboot]: https: // github.com/miniduikboot
3156+ [@ 0xfourzerofour]: https: // github.com/0xfourzerofour
29633157[@ AlexTMjugador ]: https: // github.com/AlexTMjugador
3158+ [@ martin- kolarik]: https: // github.com/martin-kolarik
3159+ [@ cvzx]: https: // github.com/cvzx
3160+ [@ Dirbaio ]: https: // github.com/Dirbaio
3161+ [@ elichai]: https: // github.com/elichai
3162+ [@ silvestrpredko]: https: // github.com/silvestrpredko
3163+ [@ davidcornu]: https: // github.com/davidcornu
3164+ [@ zebrapurring]: https: // github.com/zebrapurring
3165+ [@ djarb]: https: // github.com/djarb
3166+ [@ barskern]: https: // github.com/barskern
3167+ [@ nhatcher- frequenz]: https: // github.com/nhatcher-frequenz
3168+ [@ JerryQ17 ]: https: // github.com/JerryQ17
3169+ [@ jpmelos]: https: // github.com/jpmelos
3170+ [@ psionic- k]: https: // github.com/psionic-k
3171+ [@ Xiretza ]: https: // github.com/Xiretza
3172+ [@ 2ndDerivative]: https: // github.com/2ndDerivative
3173+ [@ kevincox]: https: // github.com/kevincox
3174+ [@ papaj- na- wrotkach]: https: // github.com/papaj-na-wrotkach
3175+ [@ xb284524239]: https: // github.com/xb284524239
3176+ [@ Dosenpfand ]: https: // github.com/Dosenpfand
3177+ [@ daviduebler]: https: // github.com/daviduebler
0 commit comments