sqlx-sqlite
SQLite driver implementation for SQLx. Not for direct use; see the `sqlx` crate for details.
0.9.0
107M downloads/mo
#774 most downloaded on crates.io
launchbadge/sqlx
What this package is like to depend on
Last release 3 months ago
21 May 2026
Ships fairly regularly
a new release about every 3 months
Nearly every release is documented
notes for 12 of 13 stable releases
1 version withdrawn
withdrawn after publishing
7 years old
18 releases · first in 2019
2 releases in the last 12 months
see the full history below
Release timeline
18 releases · Nov 2019 to May 2026Releases
latest 18-
0.9.021 May 2026Release notes
Open source →-
refactor: un-track
Cargo.lock -
chore: prepare release
0.9.0 -
chore: update
rand, crypto crates -
chore: update
rand, crypto crates (2) -
chore: revert
-Z direct-minimal-versions
For context: #4173 (comment)
-
chore: fix new clippy warnings
-
fix: compiler errors in tests/sqlite
-
fix: compiler errors in tests/postgres
-
fix: errors in
axum-social-with-tests -
fix: errors in Postgres examples, update
examples/x.py -
fix(sqlite): don't panic if
call_with_resultdidn't set an error message -
chore: update CHANGELOG for 0.9.0
-
chore: upgrade
etceterato0.11.0 -
chore: document release PR changes
-
chore: document
Executormethods not for general use -
chore: update copyright
Release notes
Open source →Important Announcements
New Github Organization
Shortly after this release is published, the SQLx repository will be transferred to a new GitHub organization: https://github.com/transact-rs/
This is because SQLx has not been owned or maintained by LaunchBadge, LLC. for a few years now, and has since been informally transferred to the collective ownership of its principal authors. Moving the repository to a new organization makes this change more clear, and also allows for potentially inviting outside collaborators.
Cargo.lockRemoved from TrackingThe
Cargo.lockhas been removed from tracking in Git. CI should now always test with the latest versions of all dependencies by default, alongside our pass that checks withcargo generate-lockfile -Z minimal-versions.This should eliminate the need for any PRs that update dependencies to also update
Cargo.lockor contend with an endless stream of merge conflicts against it.N.B.
cargo install --locked sqlx-cliwill no longer work. However,cargo install sqlx-clihas always used the latest dependencies by default, ignoring the lockfile, so most users should not be affected. For users requiring reproducible builds, consider maintaining your own lockfile instead; historically, we only rancargo updatesporadically, so relying on SQLx's lockfile offered few guarantees anyway.See the manual page for
cargo installfor details.Breaking
As per our MSRV policy, the supported Rust version for this release cycle is
1.94.0.- [#3383]: feat: create
sqlx.tomlformat [[@abonander]]- SQLx and
sqlx-clinow support per-crate configuration files (sqlx.toml) - New functionality includes, but is not limited to:
- Rename
DATABASE_URLfor a crate (for multi-database workspaces) - Set global type overrides for the macros (supporting custom types)
- Rename or relocate the
_sqlx_migrationstable (for multiple crates using the same database) - Set characters to ignore when hashing migrations (e.g. ignore whitespace)
- Rename
- More to be implemented in future releases.
- Enable feature
sqlx-tomlto use.sqlx-clihas it enabled by default, butsqlxdoes not.- Default features of library crates can be hard to completely turn off because of feature unification, so it's better to keep the default feature set as limited as possible. This is something we learned the hard way.
- Guide: see
sqlx::_configmodule in documentation. - Reference: [Link]
- Examples (written for Postgres but can be adapted to other databases; PRs welcome!):
- Multiple databases using
DATABASE_URLrenaming and global type overrides: [Link] - Multi-tenant database using
_sqlx_migrationsrenaming and multiple schemas: [Link] - Force use of
chronowhentimeis enabled (e.g. when usingtower-sessions-sqlx-store): [Link]- Forcing
bigdecimalwhenrust_decimalis enabled is also shown, but problems withchrono/timeare more common.
- Forcing
- Multiple databases using
- Breaking changes:
- Significant changes to the
Migratetrait sqlx::migrate::resolve_blocking()is now#[doc(hidden)]and thus SemVer-exempt.
- Significant changes to the
- SQLx and
- [#3486]: fix(logs): Correct spelling of aquired_after_secs tracing field [[@iamjpotts]]
- Breaking behavior change: implementations parsing
tracinglogs from SQLx will need to update the spelling.
- Breaking behavior change: implementations parsing
- [#3495]: feat(postgres): remove lifetime from
PgAdvisoryLockGuard[[@bonsairobo]] - [#3526]: Return &mut Self from the migrator set_ methods [[@nipunn1313]]
- Minor breaking change:
Migrator::set_ignore_missingandset_lockingnow return&mut Selfinstead of&Selfwhich may break code in rare circumstances.
- Minor breaking change:
- [#3541]: Postgres: force generic plan for better nullability inference. [[@joeydewaal]]
- Breaking change: may alter the output of the
query!()macros for certain queries in Postgres.
- Breaking change: may alter the output of the
- [#3613]: fix:
RawSqllifetime issues [[@abonander]]- Breaking change: adds
DBtype parameter to all methods ofRawSql
- Breaking change: adds
- [#3670]: Bump ipnetwork to v0.21.1 [[@BeauGieskens]]
- [#3674]: Implement
Decode,EncodeandTypeforBox,Arc,CowandRc[[@joeydewaal]]- Breaking change:
impl Decode for Cownow always decodesCow::Owned, lifetime is unlinked - See this discussion for motivation: https://github.com/launchbadge/sqlx/pull/3674#discussion_r2008611502
- Breaking change:
- [#3723]: Add SqlStr [[@joeydewaal]]
- Breaking change: all
query*()functions now takeimpl SqlSafeStrwhich is only implemented for&'static strandAssertSqlSafe. For all others, wrap inAssertSqlSafe(<query>). - This, along with [#3960], finally allows returning owned queries as the type will be
Query<'static, DB>. SqlSafeStrtrait is deliberately similar tostd::panic::UnwindSafe, serving as a speedbump to warn users about naïvely building queries withformat!()while allowing a workaround for advanced usage that is easy to spot on code review.
- Breaking change: all
- [#3800]: Escape PostgreSQL Options [[@V02460]]
- Breaking behavior change: options passed to
PgConnectOptions::options()are now automatically escaped. Manual escaping of options is no longer necessary and may cause incorrect behavior.
- Breaking behavior change: options passed to
- [#3821]: Groundwork for 0.9.0-alpha.1 [[@abonander]]
- Increased MSRV to 1.86 and set rust-version
- Deleted deprecated combination runtime+TLS features (e.g.
runtime-tokio-native-tls) - Deleted re-export of unstable
TransactionManagertrait insqlx.- Not technically a breaking change because it's
#[doc(hidden)], but it will break SeaORM if not proactively fixed.
- Not technically a breaking change because it's
- [#3924]: breaking(mysql): assume all non-binary collations compatible with
str[[@abonander]]- Text (or text-like) columns which previously were inferred to be
Vec<u8>will be inferred to beString(this should ultimately fix more code than it breaks). SET NAMES utf8mb4 COLLATE utf8_general_ciis no longer sent by default; instead,SET NAMES utf8mb4is sent to allow the server to select the appropriate default collation (since this is version- and configuration-dependent).MySqlConnectOptions::charset()and::collation()now imply::set_names(true)because they don't do anything otherwise.- Setting
charsetdoesn't change what's sent in theProtocol::HandshakeResponse41packet as that normally only matters for error messages beforeSET NAMESis sent. The default collation ifset_names = falseisutf8mb4_general_ci. - See this comment for details.
- Incidental breaking change:
RawSql::fetch_optional()now returnssqlx::Result<Option<DB::Row>>instead ofsqlx::Result<DB::Row>. Whoops.
- Text (or text-like) columns which previously were inferred to be
- [#3928]: breaking(sqlite):
libsqlite3-sysversioning, feature flags, safety changes [[@abonander]]- SemVer policy changes:
libsqlite3-sysversion is now specified using a range. The maximum of the range may now be increased in any backwards-compatible release. The minimum of the range may only be increased in major releases. If you havelibsqlite3-sysin your dependencies, Cargo should choose a compatible version automatically. If otherwise unconstrained, Cargo should choose the latest version supported. - SQLite extension loading (including through the new
sqlx-tomlfeature) is nowunsafe. - Added new non-default features corresponding to conditionally compiled SQLite APIs:
sqlite-deserializeenablingSqliteConnection::serialize()andSqliteConnection::deserialize()sqlite-load-extensionenablingSqliteConnectOptions::extension()and::extension_with_entrypoint()sqlite-unlock-notifyenables internal use ofsqlite3_unlock_notify()
SqliteValueandSqliteValueRefchanges:- The
sqlite3_value*interface reserves the right to be stateful. Without protection, any call could theoretically invalidate values previously returned, leading to dangling pointers. SqliteValueis now!SyncandSqliteValueRefis!Sendto prevent data races from concurrent accesses.- Instead, clone or wrap the
SqliteValueinMutex, or convert theSqliteValueRefto an owned value.
- Instead, clone or wrap the
SqliteValueand any derivedSqliteValueRefs now internally track if that value has been used to decode a borrowed&[u8]or&strand errors if it's used to decode any other type.- This is not expected to affect the vast majority of usages, which should only decode a single type
per
SqliteValue/SqliteValueRef. - See new docs on
SqliteValuefor details.
- The
- SemVer policy changes:
- [#3949]: Postgres: move
PgLTree::fromtoFrom<Vec<PgLTreeLabel>>implementation [[@JerryQ17]] - [#3957]: refactor(sqlite): do not borrow bound values, delete lifetime on
SqliteArguments[[@iamjpotts]] - [#3958]: refactor(any): Remove lifetime parameter from AnyArguments [[@iamjpotts]]
- [#3960]: refactor(core): Remove lifetime parameter from Arguments trait [[@iamjpotts]]
- [#3993]: Unescape PostgreSQL passfile password [[@V02460]]
- Previously,
.pgpassfile handling did not process backslash-escapes in the password part. Now it does, which may change what password is sent to the server.
- Previously,
- [#4008]: make
#[derive(sqlx::Type)]automatically generateimpl PgHasArrayTypeby default for newtype structs [[@papaj-na-wrotkach]]- Manual implementations of PgHasArrayType for newtypes will conflict with the generated one.
Delete the manual impl or add
#[sqlx(no_pg_array)]where conflicts occur.
- Manual implementations of PgHasArrayType for newtypes will conflict with the generated one.
Delete the manual impl or add
- [#4077]: breaking: make
offlineoptional to allow building withoutserde[[@CathalMullan]] - [#4094]: Bump bit-vec to v0.8 [[@zennozenith]]
- [#4142]: feat(mysql): add mysql-rsa feature for non-TLS RSA auth [[@dertin]]
- Connections requiring RSA password encryption now need to enable the
mysql-rsafeature or an error will be generated at runtime. RSA encryption is only used for plaintext (non-TLS) connections.
- Connections requiring RSA password encryption now need to enable the
- [#4255]: breaking(any+mysql): correctly convert text and blob types to
AnyTypeInfo[[@abonander]]
Added
- [#3641]: feat(Postgres): support nested domain types [[@joeydewaal]]
- [#3651]: Add PgBindIter for encoding and use it as the implementation encoding &[T] [[@tylerhawkes]]
- [#3675]: feat: implement Encode, Decode, Type for
Arc<str>andArc<[u8]>(andRcequivalents) [[@joeydewaal]] - [#3791]: Smol+async global executor 1.80 dev [[@martin-kolarik]]
- Adds
runtime-smolandruntime-async-global-executorfeatures to replace usages of the deprecatedasync-stdcrate.
- Adds
- [#3859]: Add more JsonRawValue encode/decode impls. [[@Dirbaio]]
- [#3881]: CLi: made cli-lib modules publicly available for other crates [[@silvestrpredko]]
- [#3889]: Compile-time support for external drivers [[@bobozaur]]
- [#3917]: feat(sqlx.toml): support SQLite extensions in macros and sqlx-cli [[@djarb]]
- [#3918]: Feature: Add exclusion violation error kind [[@barskern]]
- [#3971]: Allow single-field named structs to be transparent [[@Xiretza]]
- [#4015]: feat(sqlite):
no_txmigration support [[@AlexTMjugador]] - [#4020]: Add
Migrator::with_migrations()constructor [[@xb284524239]] - [#3846]: Add the possibility to skip migrations [[@Dosenpfand]]
- [#4107]: Add SQLite extension entrypoint config to
sqlx.toml, update SQLite extension example [[@supleed2]] - [#4118]: [postgres] Display line number in error message [[@mousetail]]
- [#4123]: feat: add
Json::into_inner()[[@chrxn1c]] - [#4153]: Add on unimplemented diagnostic to
SqlStr[[@joeydewaal]] - [#4167]: add sqlite serialize/deserialize example [[@mattrighetti]]
- [#4228]: sqlx-postgres: Make
PgNotificationstruct clone [[@michaelvanstraten]]
Changed
- [#3525]: Remove unnecessary boxfutures [[@joeydewaal]]
- [#3867]: sqlx-postgres: Bump etcetera to 0.10.0 [[@miniduikboot]]
- [#3709]: chore: replace once_cell
OnceCell/Lazywith stdOnceLock/LazyLock[[@paolobarbolini]] - [#3890]: feat: Unify
Debugimplementations acrossPgRow,MySqlRowandSqliteRow[[@davidcornu]] - [#3911]: chore: upgrade async-io to v2.4.1 [[@zebrapurring]]
- [#3938]: Move
QueryLoggerback [[@joeydewaal]] - [#3956]: chore(sqlite): Remove unused test of removed git2 feature [[@iamjpotts]]
- [#3962]: Give SQLX_OFFLINE_DIR from environment precedence in macros [[@psionic-k]]
- [#3968]: chore(ci): Add timeouts to ci jobs [[@iamjpotts]]
- [#4002]: sqlx-postgres(tests): cleanup 2 unit tests. [[@joeydewaal]]
- [#4022]: refactor: tweaks after #3791 [[@abonander]]
- [#4257]: Prefer to give real data to
.bind()inREADME.md[[@sobolevn]] - [#4042]: Update to webpki-roots 1 [[@tottoto]]
- [#4072]: chore: update hashlink to v0.11.0 [[@anmolitor]]
- [#4143]: Bump whoami to v2 [[@tisonkun]]
- [#4161]: sqlx-sqlite: relax libsqlite3-sys constraint to allow 0.36.x [[@darioAnongba]]
- [#4173]: ci: check direct minimal versions [[@ricochet]]
- Note: reverted in 0.9.0 release but still listed for contributor credit. See end of PR thread for details.
- [#4189]: Bump flume to 0.12.0 [[@opoplawski]]
- [#4223]: test(sqlite): add regression test for ORDER BY + LIMIT nullability (#4147) [[@barry3406]]
- [#4230]: chore: Update to cargo_metadata 0.23 [[@tottoto]]
- [#4233]: Change reference to dotenvy [[@graemer957]]
- [#4235]: chore: Update to validator 0.20 [[@tottoto]]
- [#4253]: chore: update example to axum 0.8 [[@tottoto]]
- Release PR:
- Upgraded all Rust-Crypto crates,
rand - Upgraded
etceterato0.11.0 - Increased max of
libsqlite3-sysversion range to<0.38.0
- Upgraded all Rust-Crypto crates,
Fixed
- [#3840]: Fix docs.rs build of sqlx-sqlite [[@gferon]]
- [#3848]: fix(macros): don't mutate environment variables [[@joeydewaal]]
- [#3856]: fix(macros): slightly improve unsupported type error message [[@dyc3]]
- [#3857]: fix(mysql): validate parameter count for prepared statements [[@cvzx]]
- [#3861]: Fix NoHostnameTlsVerifier for rustls 0.23.24 and above [[@elichai]]
- [#3863]: Use unnamed statement in pg when not persistent [[@ThomWright]]
- [#3874]: Further reduce dependency on
futuresandfutures-util[[@paolobarbolini]] - [#3886]: fix: use Executor::fetch in QueryAs::fetch [[@bobozaur]]
- [#3910]: feat(ok): add correct handling of ok packets in MYSQL implementation [[@0xfourzerofour]]
- [#3914]: fix: regenerate test certificates [[@abonander]]
- [#3915]: fix: spec_error is used by try_from derive [[@saiintbrisson]]
- [#3919]: fix[sqlx-postgres]: do a checked_mul to prevent panic'ing [[@nhatcher-frequenz]]
- [#3923]: sqlx-mysql: Fix bug in cleanup test db's. [[@joeydewaal]]
- [#3950]: chore: Fix warnings for custom postgres_## cfg flags [[@iamjpotts]]
- [#3952]:
Pool.close: close all connections before returning [[@jpmelos]] - [#3975]: fix documentation for rustls native root certificates [[@2ndDerivative]]
- [#3977]: refactor(ci): Use separate job for postgres ssl auth tests [[@iamjpotts]]
- [#3980]: Correctly
ROLLBACKtransaction when dropped duringBEGIN. [[@kevincox]] - [#3981]: SQLite: fix transaction level accounting with bad custom command. [[@kevincox]]
- [#3986]: chore(core): Fix docstring for Query::try_bind [[@iamjpotts]]
- [#3987]: chore(deps): Resolve deprecation warning for chrono Date and ymd methods [[@iamjpotts]]
- [#3988]: refactor(sqlite): Resolve duplicate test target warning for macros.rs [[@iamjpotts]]
- [#3989]: chore(deps): Set default-features=false on sqlx in workspace.dependencies [[@iamjpotts]]
- [#3991]: fix(sqlite): regression when decoding nulls [[@abonander]]
- [#4006]: PostgreSQL SASL – run SHA256 in a blocking executor [[@ThomWright]]
- [#4007]: fix(compose): use OS-assigned ports for all conatiners [[@papaj-na-wrotkach]]
- [#4009]: Drop cached db connections in macros upon hitting an error [[@swlynch99]]
- [#4024]: fix(sqlite) Migrate revert with no-transaction [[@Dosenpfand]]
- [#4027]: native tls handshake: build TlsConnector in blocking threadpool [[@daviduebler]]
- [#4053]: fix(macros): smarter
.envloading, caching, and invalidation [[@abonander]] - [#4068]: Fix typo in migration example from 'uesrs' to 'users' [[@squidpickles]]
- [#4069]: fix some spelling issues [[@joeydewaal]]
- [#4086]: fix(mysql): Work around for Issue #2206 (ColumnNotFound error when querying) [[@duelafn]]
- [#4088]: (Fix) Handle nullability of SQLite rowid alias columns [[@Lege19]]
- [#4100]: postgres: update pgpass path on windows [[@joeydewaal]]
- [#4134]: fix CI: replace removed macOS runner, deprecated use of
Command::cargo_bin()[[@abonander]] - [#4136]: Ensure Deterministic Migration Order [[@aoengin]]
- [#4158]: Fix panic in JSONB decoder on invalid version byte [[@jrey8343]]
- [#4165]: sqlx-postgres: fix correct operator precedence in byte length check [[@cuiweixie]]
- [#4171]: fix(postgres): remove home crate in favor of std::env::home_dir [[@ricochet]]
- [#4172]: fix(sqlx-cli): bump openssl minimum to 0.10.46 [[@ricochet]]
- [#4176]: fix(mysql): return error instead of panic on truncated OK packet [[@cvzx]]
- [#4199]: fix(postgres): make advisory lock cancel safe [[@joeydewaal]]
- [#4201]: Fix SCRAM password
SASLprep[[@var4yn]] - [#4202]: fix: replace from_utf8_unchecked with from_utf8_lossy in SqliteError [[@joaquinhuigomez]]
- [#4203]: fix: use sqlite3_value_text for REGEXP to match SQLite coercion [[@joaquinhuigomez]]
- [#4219]: sqlite: lossily coerce invalid UTF-8 in custom collation callback [[@joaquinhuigomez]]
- [#4221]: fix: replace
from_utf8_uncheckedwithfrom_utf8in SQLite column name handling [[@barry3406]] - [#4226]: fix(postgres): use non-prepared statements for metadata queries [[@abonander]]
- [#4227]: fix(macros-core): update unstable proc_macro APIs for recent nightly [[@barry3406]]
- [#4234]: fix: Use correct path in error when failing to create tmp dir in prepare [[@Miesvanderlippe]]
- [#4245]: fix(mysql): repair caching_sha2_password fast-auth path [[@altmannmarcelo]]
- [#4251]: fix(tls): potential deadlock in
StdSocket::poll_ready()[[@abonander]]
-
-
0.9.0-alpha.115 Oct 2025 pre-releaseNothing published for this version
-
0.8.619 May 2025Release notes
Open source →9 pull requests were merged this release cycle.
Added
- [#3849]: Add color and wrapping to cli help text [[@joshka]]
Changed
- [#3830]: build: drop unused
tempfiledependency [[@paolobarbolini]] - [#3845]: chore: clean up no longer used imports [[@tisonkun]]
- [#3863]: Use unnamed statement in pg when not persistent [[@ThomWright]]
- [#3866]: chore(doc): clarify compile-time verification and case conversion behavior [[@duhby]]
Fixed
-
0.8.515 Apr 2025Release notes
Open source →-
fix(cli): correctly handle
.envfiles again -
feat(ci): add functionality tests for sqlx-cli (MySQL)
-
feat(ci): add functionality tests for sqlx-cli (Postgres)
-
feat(ci): add functionality tests for sqlx-cli (SQLite)
-
chore: prepare 0.8.5 release
-
feat(ci): run
test-attrtests twice to catch #3825 -
fix: correct bugs in MySQL implementation of
#[sqlx::test]
Release notes
Open source →Hotfix release to address two new issues:
- [#3823]:
[email protected]broke.envdefault resolution mechanism - [#3825]:
[email protected]broke test fixture setup
The
0.8.4release will be yanked as of publishing this one.Added
- In release PR:
sqlx-clinow accepts--no-dotenvin subcommand arguments. - In release PR: added functionality tests for
sqlx-clito CI. - In release PR: test
#[sqlx::test]twice in CI to cover cleanup.
Fixed
-
-
0.8.414 Apr 2025 withdrawnRelease notes
Open source →50 pull requests were merged this release cycle.
Added
- [#3603]: Added missing special casing for encoding embedded arrays of custom types [[@nico-incubiq]]
- [#3625]: feat(sqlite): add preupdate hook [[@aschey]]
- [#3655]: docs: add example for postgres enums with type TEXT [[@tisonkun]]
- [#3677]: Add json(nullable) macro attribute [[@seanaye]]
- [#3687]: Derive clone and debug for postgresql arguments [[@remysaissy]]
- [#3690]: feat: add postres geometry line segment [[@jayy-lmao]]
- [#3707]: feat(Sqlite): add LockedSqliteHandle::last_error [[@joeydewaal]]
- [#3710]: feat: add ipnet support [[@BeauGieskens]]
- [#3711]: feat(postgres): add geometry box [[@jayy-lmao]]
- [#3714]: chore: expose bstr feature [[@joeydewaal]]
- [#3716]: feat(postgres): add geometry path [[@jayy-lmao]]
- [#3724]: feat(sqlx-cli): Add flag to disable automatic loading of .env files [[@benwilber]]
- [#3734]: QueryBuilder: add debug_assert when
push_valuesis passed an empty set of tuples [[@chanmaoganda]] - [#3745]: feat: sqlx sqlite expose de/serialize [[@mattrighetti]]
- [#3765]: Merge of #3427 (by @mpyw) and #3614 (by @bonsairobo) [[@abonander]]
- [#3769]: feat(postgres): add geometry polygon [[@jayy-lmao]]
- [#3773]: feat(postgres): add geometry circle [[@jayy-lmao]]
Changed
- [#3665]: build(deps): bump semver compatible dependencies [[@paolobarbolini]]
- [#3669]: refactor(cli): replace promptly with dialoguer [[@paolobarbolini]]
- [#3672]: add
#[track_caller]toRow::get()[[@karambarakat]] - [#3708]: chore(MySql): Remove unnecessary box [[@joeydewaal]]
- [#3715]: chore: add pg_copy regression tests [[@joeydewaal]]
- [#3721]: Replace some
futures-core/futures-utilAPIs withstdvariants [[@paolobarbolini]] - [#3725]: chore: replace rustls-pemfile with rustls-pki-types [[@tottoto]]
- [#3754]: chore(cli): remove unused async-trait crate from dependencies [[@tottoto]]
- [#3762]: docs(pool): recommend actix-web ThinData over Data to avoid two Arcs [[@jonasmalacofilho]]
Fixed
- [#3289]: Always set
SQLITE_OPEN_URIon in-memory sqlite [[@LecrisUT]] - [#3334]: Fix: nextest cleanup race condition [[@bonega]]
- [#3666]: fix(cli): running tests on 32bit platforms [[@paolobarbolini]]
- [#3686]: fix: handle nullable values by printing NULL instead of panicking [[@joeydewaal]]
- [#3700]: fix(Sqlite): stop sending rows after first error [[@joeydewaal]]
- [#3701]: fix(postgres) use signed int for length prefix in
PgCopyIn[[@joeydewaal]] - [#3703]: fix(Postgres) chunk pg_copy data [[@joeydewaal]]
- [#3712]: FromRow: Fix documentation order [[@Turbo87]]
- [#3720]: Fix readme: uuid feature is gating for all repos [[@jthacker]]
- [#3728]: postgres: Fix tracing span when dropping PgListener [[@chitoku-k]]
- [#3741]: Fix example calculation in docs [[@dns2utf8]]
- [#3749]: docs: add some missing backticks [[@soulwa]]
- [#3753]: Avoid privilege requirements by using an advisory lock in test setup (postgres). [[@kildrens]]
- [#3755]: Fix FromRow docs for tuples [[@xvapx]]
- [#3768]: chore(Sqlite): remove ci.db from repo [[@joeydewaal]]
- [#3771]: fix(ci): breakage from Rustup 1.28 [[@abonander]]
- [#3786]: Fix a copy-paste error on get_username docs [[@sulami]]
- [#3801]: Fix: Enable Json type when db feature isn't enabled [[@thriller08]]
- [#3809]: fix: PgConnectOptions docs [[@mbj]]
- [#3811]: Fix error message typo in PgPoint::from_str [[@TeCHiScy]]
- [#3812]: mysql: Fix panic on invalid text row length field [[@0xdeafbeef]]
- [#3815]: fix(macros): cache macro metadata based on
CARGO_MANIFEST_DIR[[@joeydewaal]] - Fixes in release PR [#3819] [[@abonander]]:
- fix(postgres): send
limit: 0for allExecutemessages- Addresses [#3673]: Parallel workers not used on Postgres
- fix: let
CertificateInput::frominfer any PEM-encoded document- Fixes
PGSSLKEYnot being parsed correctly when containing a PEM-encoded private key.
- Fixes
- doc: improve documentation of
PgConnectOptionsPGHOSTADDRnow can be used to overridePGHOST.- Addresses [#3740]: Document the URL syntax for Unix-domain sockets when connecting to postgres
- fix(postgres): send
-
0.8.304 Jan 2025Release notes
Open source →-
chore: create 0.8.3 release
-
fix: prevent dead-branch warning from Clippy in query macros
cc #3595
- fix: move
#[allow]from previous commit to theifblock
Release notes
Open source →41 pull requests were merged this release cycle.
Added
- [#3418]: parse timezone parameter in mysql connection url [[@dojiong]]
- [#3491]: chore: Update async-std v1.13 [[@jayvdb]]
- [#3492]: expose relation_id and relation_attribution_no on PgColumn [[@kurtbuilds]]
- [#3493]: doc(sqlite): document behavior for zoned date-time types [[@abonander]]
- [#3500]: Add sqlite commit and rollback hooks [[@gridbox]]
- [#3505]: chore(mysql): create test for passwordless auth (#3484) [[@abonander]]
- [#3507]: Add a "sqlite-unbundled" feature that dynamically links to system libsqlite3.so library [[@lilydjwg]]
- [#3508]: doc(sqlite): show how to turn options into a pool [[@M3t0r]]
- [#3514]: Support PgHstore by default in macros [[@joeydewaal]]
- [#3550]: Implement Acquire for PgListener [[@sandhose]]
- [#3551]: Support building with rustls but native certificates [[@IlyaBizyaev]]
- [#3553]: Add support for Postgres lquery arrays [[@philipcristiano]]
- [#3560]: Add PgListener::next_buffered(), to support batch processing of notifications [[@chanks]]
- [#3577]: Derive Copy where possible for database-specific types [[@veigaribo]]
- [#3579]: Reexport AnyTypeInfoKind [[@Norlock]]
- [#3580]: doc(mysql): document difference between
Uuidanduuid::fmt::Hyphenated[[@abonander]] - [#3583]: feat: point [[@jayy-lmao]]
- [#3608]: Implement AnyQueryResult for Sqlite and MySQL [[@pxp9]]
- [#3623]: feat: add geometry line [[@jayy-lmao]]
- [#3658]: feat: add Transaction type aliases [[@joeydewaal]]
Changed
- [#3519]: Remove unused dependencies from sqlx-core, sqlx-cli and sqlx-postgres [[@vsuryamurthy]]
- [#3529]: Box Pgconnection fields [[@joeydewaal]]
- [#3548]: Demote
.pgpassfile warning to a debug message. [[@denschub]] - [#3585]: Eagerly reconnect in
PgListener::try_recv[[@swlynch99]] - [#3596]: Bump thiserror to v2.0.0 [[@paolobarbolini]]
- [#3605]: Use
UNION ALLinstead ofUNIONin nullable check [[@Suficio]] - [#3629]: chore: remove BoxFuture's (non-breaking) [[@joeydewaal]]
- [#3632]: Bump hashlink to v0.10 [[@paolobarbolini]]
- [#3643]: Roll PostgreSQL 11..=15 tests to 13..=17 [[@paolobarbolini]]
- [#3648]: close listener connection on TimedOut and BrokenPipe errors [[@DXist]]
- [#3649]: Bump hashbrown to v0.15 [[@paolobarbolini]]
Fixed
- [#3528]: fix: obey
no-transactionflag in down migrations [[@manifest]] - [#3536]: fix: using sqlx::test macro inside macro's [[@joeydewaal]]
- [#3545]: fix: remove
sqlformat[[@tbar4]] - [#3558]: fix: fix example code of
query_as[[@xuehaonan27]] - [#3566]: Fix: Cannot query Postgres
INTERVAL[][[@Ddystopia]] - [#3593]: fix: URL decode database name when parsing connection url [[@BenoitRanque]]
- [#3601]: Remove default-features = false from url [[@hsivonen]]
- [#3604]: Fix mistake in sqlx::test fixtures docs [[@andreweggleston]]
- [#3612]: fix(mysql): percent-decode database name [[@abonander]]
- [#3640]: Dont use
EXPLAINin nullability check for QuestDB [[@Suficio]]
-
-
0.8.203 Sep 2024Release notes
Open source →10 pull requests were merged this release cycle.
This release addresses a few regressions that have occurred, and refines SQLx's MSRV policy (see the FAQ).
Added
- [#3447]: Clarify usage of Json/Jsonb in query macros [[@Lachstec]]
Changed
- [#3424]: Remove deprecated feature-names from
Cargo.tomlfiles in examples [[@carschandler]]
Fixed
- [#3403]: Fix (#3395) sqlx::test macro in 0.8 [[@joeydewaal]]
- [#3411]: fix: Use rfc3339 to decode date from text [[@pierre-wehbe]]
- [#3453]: fix(#3445): PgHasArrayType [[@joeydewaal]]
- Fixes
#[sqlx(no_pg_array)]being forbidden on#[derive(Type)]structs.
- Fixes
- [#3454]: fix: non snake case warning [[@joeydewaal]]
- [#3459]: Pgsql cube type compile fail [[@kdesjard]]
- [#3465]: fix(postgres): max number of binds is 65535, not 32767 (regression) [[@abonander]]
- [#3467]: fix cancellation issues with
PgListener,PgStream::recv()[[@abonander]]- Fixes cryptic
unknown message: "\\0"error
- Fixes cryptic
- [#3474]: Fix try_get example in README.md [[@luveti]]
-
0.8.124 Aug 2024Release notes
Open source →16 pull requests were merged this release cycle.
This release contains a fix for RUSTSEC-2024-0363.
Postgres users are advised to upgrade ASAP as a possible exploit has been demonstrated: https://github.com/launchbadge/sqlx/issues/3440#issuecomment-2307956901
MySQL and SQLite do not appear to be exploitable, but upgrading is recommended nonetheless.
Added
- [#3421]: correct spelling of
MySqlConnectOptions::no_engine_substitution()[[@kolinfluence]]- Deprecates
MySqlConnectOptions::no_engine_subsitution()(oops) in favor of the correctly spelled version.
- Deprecates
Changed
- [#3376]: doc: hide
spec_errormodule [[@abonander]]- This is a helper module for the macros and was not meant to be exposed.
- It is not expected to receive any breaking changes for the 0.8.x release, but is not designed as a public API. Use at your own risk.
- [#3382]: feat: bumped to
libsqlite3-sys=0.30.1to support sqlite 3.46 [[@CommanderStorm]] - [#3385]: chore(examples):Migrated the pg-chat example to ratatui [[@CommanderStorm]]
- [#3399]: Upgrade to rustls 0.23 [[@djc]]
- RusTLS now has pluggable cryptography providers:
ring(the existing implementation), andaws-lc-rswhich has optional FIPS certification. - The existing features activating RusTLS (
runtime-tokio-rustls,runtime-async-std-rustls,tls-rustls) enable theringprovider of RusTLS to match the existing behavior so this should not be a breaking change. - Switch to the
tls-rustls-aws-lc-rsfeature to use theaws-lc-rsprovider.- If using
runtime-tokio-rustlsorruntime-async-std-rustls, this will necessitate switching to the appropriate non-legacy runtime feature:runtime-tokioorruntime-async-std
- If using
- See the RusTLS README for more details: https://github.com/rustls/rustls?tab=readme-ov-file#cryptography-providers
- RusTLS now has pluggable cryptography providers:
Fixed
- [#2786]: fix(sqlx-cli): do not clean sqlx during prepare [[@cycraig]]
- [#3354]: sqlite: fix inconsistent read-after-write [[@ckampfe]]
- [#3371]: Fix encoding and decoding of MySQL enums in
sqlx::Type[[@alu]] - [#3374]: fix: usage of
node12inSQLxaction [[@hamirmahal]] - [#3380]: chore: replace structopt with clap in examples [[@tottoto]]
- [#3381]: Fix CI after Rust 1.80, remove dead feature references [[@abonander]]
- [#3384]: chore(tests): fixed deprecation warnings [[@CommanderStorm]]
- [#3386]: fix(dependencys):bumped cargo_metadata to
v0.18.1to avoid yankedv0.14.3[[@CommanderStorm]] - [#3389]: fix(cli): typo in error for required DB URL [[@ods]]
- [#3417]: Update version to 0.8 in README [[@soucosmo]]
- [#3441]: fix: audit protocol handling [[@abonander]]
- This addresses RUSTSEC-2024-0363 and includes regression tests for MySQL, Postgres and SQLite.
- [#3421]: correct spelling of
-
0.8.023 Jul 2024Release notes
Open source →70 pull requests were merged this release cycle.
#2697 was merged the same day as release 0.7.4 and so was missed by the automatic CHANGELOG generation.
Breaking
- [#2697]: fix(macros): only enable chrono when time is disabled [[@saiintbrisson]]
- [#2973]: Generic Associated Types in Database, replacing HasValueRef, HasArguments, HasStatement [[@nitn3lav]]
- [#2482]: chore: bump syn to 2.0 [[@saiintbrisson]]
- Deprecated type ascription syntax in the query macros was removed.
- [#2736]: Fix describe on PostgreSQL views with rules [[@tsing]]
- Potentially breaking: nullability inference changes for Postgres.
- [#2869]: Implement PgHasArrayType for all references [[@tylerhawkes]]
- Conflicts with existing manual implementations.
- [#2940]: fix: Decode and Encode derives (#1031) [[@benluelo]]
- Changes lifetime obligations for field types.
- [#3064]: Sqlite explain graph [[@tyrelr]]
- Potentially breaking: nullability inference changes for SQLite.
- [#3123]: Reorder attrs in sqlx::test macro [[@bobozaur]]
- Potentially breaking: attributes on
#[sqlx::test]usages are applied in the correct order now.
- Potentially breaking: attributes on
- [#3126]: Make Encode return a result [[@FSMaxB]]
- [#3130]: Add version information for failed cli migration (#3129) [[@FlakM]]
- Breaking changes to
MigrateError.
- Breaking changes to
- [#3181]: feat: no tx migration [[@cleverjam]]
- (Postgres only) migrations that should not run in a transaction can be flagged by adding
-- no-transactionto the beginning. - Breaking change: added field to
Migration
- (Postgres only) migrations that should not run in a transaction can be flagged by adding
- [#3184]: [BREAKING} fix(sqlite): always use
i64as intermediate when decoding [[@abonander]]- integer decoding will now loudly error on overflow instead of silently truncating.
- some usages of the query!() macros might change an i32 to an i64.
- [#3252]: fix
#[derive(sqlx::Type)]in Postgres [[@abonander]]- Manual implementations of PgHasArrayType for enums will conflict with the generated one. Delete the manual impl or add
#[sqlx(no_pg_array)]where conflicts occur. - Type equality for PgTypeInfo is now schema-aware.
- Manual implementations of PgHasArrayType for enums will conflict with the generated one. Delete the manual impl or add
- [#3329]: fix: correct handling of arrays of custom types in Postgres [[@abonander]]
- Potential breaking change:
PgTypeInfo::with_name()infers types that start with_to be arrays of the un-prefixed type. Wrap type names in quotes to bypass this behavior.
- Potential breaking change:
- [#3356]: breaking: fix name collision in
FromRow, returnError::ColumnDecodeforTryFromerrors [[@abonander]]- Breaking behavior change: errors with
#[sqlx(try_from = "T")]now returnError::ColumnDecodeinstead ofError::ColumnNotFound. - Breaking because
#[sqlx(default)]on an individual field or the struct itself would have previously suppressed the error. This doesn't seem like good behavior as it could result in some potentially very difficult bugs.- Instead, create a wrapper implementing
Fromand apply the default explicitly.
- Instead, create a wrapper implementing
- Breaking behavior change: errors with
- [#3337]: allow rename with rename_all (close #2896) [[@DirectorX]]
- Changes the precedence of
#[sqlx(rename)]and#[sqlx(rename_all)]to match the expected behavior (renamewins).
- Changes the precedence of
- [#3285]: fix: use correct names for sslmode options [[@lily-mosquitoes]]
- Changes the output of
ConnectOptions::to_url_lossy()to match what parsing expects.
- Changes the output of
Added
- [#2917]: Add Debug impl for PgRow [[@g-bartoszek]]
- [#3113]: feat: new derive feature flag [[@saiintbrisson]]
- [#3154]: feat: add
MySqlTime, auditmysql::typesfor panics [[@abonander]] - [#3188]: feat(cube): support postgres cube [[@jayy-lmao]]
- [#3244]: feat: support
NonZero*scalar types [[@AlphaKeks]] - [#3260]: feat: Add set_update_hook on SqliteConnection [[@gridbox]]
- [#3291]: feat: support the Postgres Bool type for the Any driver [[@etorreborre]]
- [#3293]: Add LICENSE-* files to crates [[@LecrisUT]]
- [#3303]: add array support for NonZeroI* in postgres [[@JohannesIBK]]
- [#3311]: Add example on how to use Transaction as Executor [[@Lachstec]]
- [#3343]: Add support for PostgreSQL HSTORE data type [[@KobusEllis]]
Changed
- [#2652]: MySQL: Remove collation compatibility check for strings [[@alu]]
- [#2960]: Removed
Sendtrait bound from argument binding [[@bobozaur]] - [#2970]: refactor: lift type mappings into driver crates [[@abonander]]
- [#3148]: Bump libsqlite3-sys to v0.28 [[@NfNitLoop]]
- Note: version bumps to
libsqlite3-sysare not considered breaking changes as per our semver guarantees.
- Note: version bumps to
- [#3265]: perf: box
MySqlConnectionto reduce sizes of futures [[@stepantubanov]] - [#3352]: chore:added a testcase for
sqlx migrate add ...[[@CommanderStorm]] - [#3340]: ci: Add job to check that sqlx builds with its declared minimum dependencies [[@iamjpotts]]
Fixed
- [#2702]: Constrain cyclic associated types to themselves [[@BadBastion]]
- [#2954]: Fix several inter doc links [[@ralpha]]
- [#3073]: feat(logging): Log slow acquires from connection pool [[@iamjpotts]]
- [#3137]: SqliteConnectOptions::filename() memory fix (#3136) [[@hoxxep]]
- [#3138]: PostgreSQL Bugfix: Ensure connection is usable after failed COPY inside a transaction [[@feikesteenbergen]]
- [#3146]: fix(sqlite): delete unused
ConnectionHandleRawtype [[@abonander]] - [#3162]: Drop urlencoding dependency [[@paolobarbolini]]
- [#3165]: Bump deps that do not need code changes [[@GnomedDev]]
- [#3167]: fix(ci): use
docker composeinstead ofdocker-compose[[@abonander]] - [#3172]: fix: Option decoding in any driver [[@pxp9]]
- [#3173]: fix(postgres) : int type conversion while decoding [[@RaghavRox]]
- [#3190]: Update time to 0.3.36 [[@BlackSoulHub]]
- [#3191]: Fix unclean TLS shutdown [[@levkk]]
- [#3194]: Fix leaking connections in fetch_optional (#2647) [[@danjpgriffin]]
- [#3216]: security: bump rustls to 0.21.11 [[@toxeus]]
- [#3230]: fix: sqlite pragma order for auto_vacuum [[@jasonish]]
- [#3233]: fix: get_filename should not consume self [[@jasonish]]
- [#3234]: fix(ci): pin Rust version, ditch unmaintained actions [[@abonander]]
- [#3236]: fix: resolve
pathownership problems when usingsqlx_macros_unstable[[@lily-mosquitoes]] - [#3254]: fix: hide
sqlx_postgres::any[[@Zarathustra2]] - [#3266]: ci: MariaDB - add back 11.4 and add 11.5 [[@grooverdan]]
- [#3267]: ci: syntax fix [[@grooverdan]]
- [#3271]: docs(sqlite): fix typo - unixtime() -> unixepoch() [[@joelkoen]]
- [#3276]: Invert boolean for
migrateerror message. (#3275) [[@nk9]] - [#3279]: fix Clippy errors [[@abonander]]
- [#3288]: fix: sqlite update_hook char types [[@jasonish]]
- [#3297]: Pass the
persistentquery setting when preparing queries with theAnydriver [[@etorreborre]] - [#3298]: Track null arguments in order to provide the appropriate type when converting them. [[@etorreborre]]
- [#3312]: doc: Minor rust docs fixes [[@SrGesus]]
- [#3327]: chore: fixed one usage of
select_input_type!()being unhygenic [[@CommanderStorm]] - [#3328]: fix(ci): comment not separated from other characters [[@hamirmahal]]
- [#3341]: refactor: Resolve cargo check warnings in postgres examples [[@iamjpotts]]
- [#3346]: fix(postgres): don't panic if
MorCNotice fields are not UTF-8 [[@YgorSouza]] - [#3350]: fix:the
json-feature should activatesqlx-postgres?/jsonas well [[@CommanderStorm]] - [#3353]: fix: build script new line at eof [[@Zarthus]]
- (no PR): activate
clockandstdfeatures ofworkspace.dependencies.chrono.
-
0.7.412 Mar 2024Release notes
Open source →38 pull requests were merged this release cycle.
This is officially the last release of the 0.7.x release cycle.
As of this release, development of 0.8.0 has begun on
mainand only high-priority bugfixes may be backported.Added
- [#2891]: feat: expose getters for connect options fields [[@saiintbrisson]]
- [#2902]: feat: add
to_url_lossyto connect options [[@lily-mosquitoes]] - [#2927]: Support
query!for cargo-free systems [[@kshramt]] - [#2997]: doc(FAQ): add entry explaining prepared statements [[@abonander]]
- [#3001]: Update README to clarify MariaDB support [[@iangilfillan]]
- [#3004]: feat(logging): Add numeric elapsed time field elapsed_secs [[@iamjpotts]]
- [#3007]: feat: add
raw_sqlAPI [[@abonander]]- This hopefully makes it easier to find how to execute statements which are not supported by the default
prepared statement interfaces
query*()andquery!(). - Improved documentation across the board for the
query*()functions. - Deprecated:
execute_many()andfetch_many()on interfaces that use prepared statements.- Multiple SQL statements in one query string were only supported by SQLite because its prepared statement interface is the only way to execute SQL. All other database flavors forbid multiple statements in one prepared statement string as an extra defense against SQL injection.
- The new
raw_sqlAPI retains this functionality because it explicitly does not use prepared statements. Raw or text-mode query interfaces generally allow multiple statements in one query string, and this is supported by all current databases. Due to their nature, however, one cannot use bind parameters with them. - If this change affects you, an issue is open for discussion: https://github.com/launchbadge/sqlx/issues/3108
- This hopefully makes it easier to find how to execute statements which are not supported by the default
prepared statement interfaces
- [#3011]: Added support to IpAddr with MySQL/MariaDB. [[@Icerath]]
- [#3013]: Add default implementation for PgInterval [[@pawurb]]
- [#3018]: Add default implementation for PgMoney [[@pawurb]]
- [#3026]: Update docs to reflect support for MariaDB data types [[@iangilfillan]]
- [#3037]: feat(mysql): allow to connect with mysql driver without default behavor [[@darkecho731]]
Changed
- [#2900]: Show latest url to docs for macro.migrate [[@Vrajs16]]
- [#2914]: Use
create_newinstead ofatomic-file-write[[@mattfbacon]] - [#2926]: docs: update example for
PgConnectOptions[[@Fyko]] - [#2989]: sqlx-core: Remove dotenvy dependency [[@joshtriplett]]
- [#2996]: chore: Update ahash to 0.8.7 [[@takenoko-gohan]]
- [#3006]: chore(deps): Replace unmaintained tempdir crate with tempfile [[@iamjpotts]]
- [#3008]: chore: Ignore .sqlx folder created by running ci steps locally [[@iamjpotts]]
- [#3009]: chore(dev-deps): Upgrade env_logger from 0.9 to 0.11 [[@iamjpotts]]
- [#3010]: chore(deps): Upgrade criterion to 0.5.1 [[@iamjpotts]]
- [#3050]: Optimize SASL auth in sqlx-postgres [[@mirek26]]
- [#3055]: Set TCP_NODELAY option on TCP sockets [[@mirek26]]
- [#3065]: Improve max_lifetime handling [[@mirek26]]
- [#3072]: Change the name of "inner" function generated by
#[sqlx::test][[@ciffelia]] - [#3083]: Remove sha1 because it's not being used in postgres [[@rafaelGuerreiro]]
Fixed
- [#2898]: Fixed docs [[@Vrajs16]]
- [#2905]: fix(mysql): Close prepared statement if persistence is disabled [[@larsschumacher]]
- [#2913]: Fix handling of deferred constraints [[@Thomasdezeeuw]]
- [#2919]: fix duplicate "`" in FromRow "default" attribute doc comment [[@shengsheng]]
- [#2932]: fix(postgres): avoid unnecessary flush in PgCopyIn::read_from [[@tsing]]
- [#2955]: Minor fixes [[@Dawsoncodes]]
- [#2963]: Fixed ReadMe badge styling [[@tadghh]]
- [#2976]: fix: AnyRow not support PgType::Varchar [[@holicc]]
- [#3053]: fix: do not panic when binding a large BigDecimal [[@Ekleog]]
- [#3056]: fix: spans in sqlite tracing (#2876) [[@zoomiti]]
- [#3089]: fix(migrate): improve error message when parsing version from filename [[@abonander]]
- [#3098]: Migrations fixes [[@abonander]]
- Unhides
sqlx::migrate::Migrator. - Improves I/O error message when failing to read a file in
migrate!().
- Unhides
-
0.7.323 Nov 2023Release notes
Open source →38 pull requests were merged this release cycle.
Added
- [#2478]: feat(citext): support postgres citext [[@hgranthorner]]
- [#2545]: Add
fixtures_pathin sqlx::test args [[@ripa1995]] - [#2665]: feat(mysql): support packet splitting [[@tk2217]]
- [#2752]: Enhancement #2747 Provide
fn PgConnectOptions::get_host(&self)[[@boris-lok]] - [#2769]: Customize the macro error message based on the metadata [[@Nemo157]]
- [#2793]: derived Hash trait for PgInterval [[@yasamoka]]
- [#2801]: derive FromRow: sqlx(default) for all fields [[@grgi]]
- [#2827]: Add impl
FromRowfor the unit type [[@nanoqsh]] - [#2871]: Add
MySqlConnectOptions::get_database()[[@shiftrightonce]] - [#2873]: Sqlx Cli: Added force flag to drop database for postgres [[@Vrajs16]]
- [#2894]: feat:
Textadapter [[@abonander]]
Changed
- [#2701]: Remove documentation on offline feature [[@Baptistemontan]]
- [#2713]: Add additional info regarding using Transaction and PoolConnection as… [[@satwanjyu]]
- [#2770]: Update README.md [[@snspinn]]
- [#2797]: doc(mysql): document behavior regarding
BOOLEANand the query macros [[@abonander]] - [#2803]: Don't use separate temp dir for query jsons (2) [[@mattfbacon]]
- [#2819]: postgres begin cancel safe [[@conradludgate]]
- [#2832]: Update extra_float_digits default to 2 instead of 3 [[@brianheineman]]
- [#2865]: Update Faq - Bulk upsert with optional fields [[@Vrajs16]]
- [#2880]: feat: use specific message for slow query logs [[@abonander]]
- [#2882]: Do not require db url for prepare [[@tamasfe]]
- [#2890]: doc(sqlite): cover lack of
NUMERICsupport [[@abonander]] - [No PR]: Upgraded
libsqlite3-systo 0.27.0- Note: linkage to
libsqlite3-sysis considered semver-exempt; see the release notes for 0.7.0 below for details.
- Note: linkage to
Fixed
- [#2640]: fix: sqlx::macro db cleanup race condition by adding a margin to current timestamp [[@fhsgoncalves]]
- [#2655]: [fix] Urlencode when passing filenames to sqlite3 [[@uttarayan21]]
- [#2684]: Make PgListener recover from UnexpectedEof [[@hamiltop]]
- [#2688]: fix: Make rust_decimal and bigdecimal decoding more lenient [[@cameronbraid]]
- [#2754]: Is tests/x.py maintained? And I tried fix it. [[@qwerty2501]]
- [#2784]: fix: decode postgres time without subsecond [[@granddaifuku]]
- [#2806]: Depend on version of async-std with non-private spawn-blocking [[@A248]]
- [#2820]: fix: correct decoding of
rust_decimal::Decimalfor high-precision values [[@abonander]] - [#2822]: issue #2821 Update error handling logic when opening a TCP connection [[@anupj]]
- [#2826]: chore: bump some sqlx-core dependencies [[@djc]]
- [#2838]: Fixes rust_decimal scale for Postgres [[@jkleinknox]]
- [#2847]: Fix comment in
sqlx migrate addhelp text [[@cryeprecision]] - [#2850]: fix(core): avoid unncessary wakeups in
try_stream!()[[@abonander]] - [#2856]: Prevent warnings running
cargo build[[@nyurik]] - [#2864]: fix(sqlite): use
AtomicUsizefor thread IDs [[@abonander]] - [#2892]: Fixed force dropping bug [[@Vrajs16]]
-
0.7.226 Sep 2023Release notes
Open source →23 pull requests were merged this release cycle.
Added
- [#2121]: Add JSON support to
FromRowderive [[@95ulisse]] - [#2533]: Implement mysql_clear_password [[@ldanilek]]
- [#2538]: cli: add --target-version CLI flags for migrate run/revert [[@inahga]]
- [#2577]: supplement Postgres listen example with a small chat example [[@JockeM]]
- [#2602]: Support naming migrations sequentially [[@vmax]]
- [#2634]: Adding PgHasArrayType for &[u8;N] [[@snf]]
- [#2646]: Support for setting client certificate and key from bytes [[@wyhaya]]
- [#2664]: Automatically infer migration type [[@vmax]]
- [#2712]: Add impl for
Type,Decode, andEncodeforBox<str>andBox<[u8]>[[@grant0417]]
Changed
- [#2650]: Cleanup format arguments [[@nyurik]]
- [#2695]: remove &mut PoolConnection from Executor docs [[@olback]]
- This impl was removed in 0.7.0 because of coherence issues.
- [#2706]: Clarify where optional features should be enabled [[@kryptan]]
- [#2717]: Update README.md [[@fermanjj]]
- [#2739]: Bump mariadb CI images + mysql unpin [[@grooverdan]]
- [#2742]: Implemented poll_flush for Box<S:Socket> [[@bobozaur]]
- [#2740]: Remove sealed trait comments from documentation [[@bobozaur]]
- [#2750]: Fix #2384, bump flume to v0.11.0 [[@madadam]]
- [#2757]: Remove unused
remove_dir_allcrate fromsqlx-cli, fixes RUSTSEC-2023-0018 [[@aldur]]
Fixed
- [#2624]: Documentation typo: BYTE -> BINARY [[@sebastianv89]]
- [#2628]: docs: 0.7 is stable in the entire README [[@marcusirgens]]
- [#2630]: fix(postgres): fix buffer management in PgCopyIn::read_from [[@tsing]]
- [#2651]: Chore: Fix few build warnings, and make CI fail on warn [[@nyurik]]
- [#2670]: fix: ignore extra fields in Postgres describe parsing [[@abonander]]
- [#2687]: docs: Fix description of
min_connections[[@hakoerber]]
- [#2121]: Add JSON support to
-
0.7.115 Jul 2023Release notes
Open source →This release mainly addresses issues reported with the 0.7.0 release.
16 pull requests were merged this release cycle.
Added
- [#2551]: Introduce build_query_scalar for QueryBuilder [[@iamquang95]]
- [#2605]: Implement Default for QueryBuilder [[@Xydez]]
- [#2616]: feat(sqlx-core): add table function to database error [[@saiintbrisson]]
- [#2619]: feat: allow opt-out of
PgHasArrayTypewith#[derive(sqlx::Type)][[@abonander]]- TL;DR: if you're getting errors from
#[derive(sqlx::Type)]with#[sqlx(transparent)]regardingPgHasArrayTypenot being implemented, add#[sqlx(no_pg_array)]to fix.
- TL;DR: if you're getting errors from
Changed
- [#2566]: improve docs about migration files [[@jnnnnn]]
- [#2576]: Major Version Update clap to 4.0 [[@titaniumtraveler]]
- [#2597]: Bump webpki-roots to v0.24 [[@paolobarbolini]]
- [#2603]: docs(changelog): be more verbose about offline mode breaking change [[@mrl5]]
Fixed
- [#2553]: Implement
CloneforPoolOptionsmanually (#2548) [[@alilleybrinker]] - [#2580]: Update README.md now that 0.7.0 is no longer in alpha [[@saolof]]
- [#2585]: Fix for Issue #2549 - cannot use feature "rust_decimal" without also using "bigdecimal" [[@deneut]]
- [#2586]: Fix optional dependency on sqlx-macros [[@kitterion]]
- [#2593]: Correct mention of the
tls-native-tlsin the documentation. [[@denschub]] - [#2599]: Remove incorrect CAST in test database cleanup for MySQL. [[@fd]]
- [#2613]: Fix readme.md to reduce confusion about optional features (decimal->rust_decimal) [[@vabka]]
- [#2620]: fix(sqlite/any): encode bool as integer [[@saiintbrisson]]
-
0.7.003 Jul 2023Release notes
Open 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 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, 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. This means that CLI flag--mergedis no longer supported. See [#2363] for details and make sure that yoursqlx-cliversion is in sync with thesqlxversion in your project.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
mssqlfeature 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 theirruntime-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 itsruntime-tokio-*equivalent.
- To fix, simply replace the
- The
git2feature 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
Executorimpls forTransactionandPoolConnectionhave been deleted because they cannot exist in the new crate architecture without rewriting theExecutortrait entirely.- To fix this breakage, simply add a dereference where an
impl Executoris 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.
- To fix this breakage, simply add a dereference where an
- The fields of
Migratorare now#[doc(hidden)]and semver-exempt; they weren't meant to be public. - The
offlinefeature has been removed from thesqlxfacade 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
decimalfeature has been renamed torust_decimalto match the crate it actually provides integrations for. AnyDriverandAnyConnectionnow 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 toAnywithout them being hardcoded.- The
AnyEncodetrait has been removed.
- [#2109]: feat: better database errors [[@saiintbrisson]]
- [#2094]: Update libsqlite3-sys to 0.25.1 [[@penberg]]
- Alongside this upgrade, we are now considering the linkage to
libsqlite3-systo be semver-exempt, and we reserve the right to upgrade it as necessary. If you are usinglibsqlite3-sysdirectly or a crate that links it such asrusqlite, you should pin the versions of both crates to avoid breakages fromcargo update:
- Alongside this upgrade, we are now considering the linkage to
[dependencies] sqlx = { version = "=0.7.0", features = ["sqlite"] } rusqlite = "=0.29.0"- [#2132]: fix: use owned Builder pattern for ConnectOptions [[@ar3s3ru]]
- [#2253]: Sqlite describe fixes [[@tyrelr]]
- [#2285]:
time: Assume UTC when decoding a DATETIME column in sqlite [[@nstinus]] - [#2363]: [offline] Change prepare to one-file-per-query [[@cycraig]]
- [#2387]: PATCH: bump libsqlite3-sys to patched version [[@grantkee]]
- [#2409]: fix(#2407): respect the HaltIfNull opcode when determining nullability [[@arlyon]]
- [#2459]: limit the number of instructions that can be evaluated [[@tyrelr]]
- [#2467]: Add and improve sqlite describe performance benchmarks [[@tyrelr]]
- [#2491]: sqlite date macro support [[@Arcayr]]
- Changes
OffsetDateTimeto be the first type used when deserializing atimestamptype.
- Changes
- [#2496]: Bump to libsqlite3-sys 0.26 [[@mdecimus]]
- [#2508]: Sqlite analytical [[@tyrelr]]
Added
- [#1850]: Add client SSL authentication using key-file for Postgres, MySQL and MariaDB [[@ThibsG]]
- [#2088]: feat: Add set_connect_options method to Pool [[@moatra]]
- [#2113]: Expose PoolOptions for reading [[@FSMaxB]]
- [#2115]: Allow using complex types in
try_fromwhen derivingFromRow[[@95ulisse]] - [#2116]: [SQLite] Add option to execute
PRAGMA optimize;on close of a connection [[@miles170]] - [#2189]: Added regexp support in sqlite [[@VictorKoenders]]
- [#2224]: Add From impls for Json [[@dbeckwith]]
- [#2256]: add progress handler support to sqlite [[@nbaztec]]
- [#2366]: Allow ignoring attributes for deriving FromRow [[@grgi]]
- [#2369]: new type support in query_as [[@0xdeafbeef]]
- [#2379]: feat: add
Connection::shrink_buffers,PoolConnection::close[[@abonander]] - [#2400]: fix(docs): example of
sqlx_macros_unstablein config.toml [[@df51d]] - [#2469]: Add Simple format for Uuid for MySQL & SQLite. [[@MidasLamb]]
- [#2483]: chore: add deprecation notice for type ascription use [[@saiintbrisson]]
- [#2506]: add args to query builder (#2494) [[@cemoktra]]
- [#2554]: Impl
AsMutfor advisory lock types (#2520) [[@alilleybrinker]] - [#2559]: Add CLI autocompletion using clap_complete [[@titaniumtraveler]]
Changed
- [#2185]: Initial work to switch to
tracing[[@CosmicHorrorDev]] - [#2193]: Start testing on Postgres 15 and drop Postgres 10 [[@paolobarbolini]]
- We reserve the right to drop support for end-of-lifed database versions as discussed in our FAQ.
- [#2213]: Use
let elsestatements in favor of macro [[@OverHash]] - [#2365]: Update dependencies [[@paolobarbolini]]
- [#2371]: Disable rustls crate logging feature by default up to date [[@sergeiivankov]]
- [#2373]: chore: Use tracing's fields to get structured logs [[@jaysonsantos]]
- [#2393]: Lower default logging level for statements to Debug [[@bnoctis]]
- [#2445]: Traverse symlinks when resolving migrations [[@tgeoghegan]]
- [#2485]: chore(sqlx-postgres): replace
dirswithhome&etcetera[[@utkarshgupta137]] - [#2515]: Bump mac_address to 1.1.5 [[@repnop]]
- [#2440]: Update rustls to 0.21, webpki-roots to 0.23 [[@SergioBenitez]]
- [#2563]: Update rsa to 0.9 [[@paolobarbolini]]
- [#2564]: Update bitflags to v2 [[@paolobarbolini]]
- [#2565]: Bump indexmap and ahash [[@paolobarbolini]]
- [#2574]: doc: make it clear that
ConnectOptionstypes implFromStr[[@abonander]]
Fixed
- [#2098]: Fix sqlite compilation [[@cycraig]]
- [#2120]: fix logical merge conflict [[@tyrelr]]
- [#2133]: Postgres OID resolution query does not take into account current
search_path[[@95ulisse]] - [#2156]: Fixed typo. [[@cdbfoster]]
- [#2179]: fix: ensures recover from fail with PgCopyIn [[@andyquinterom]]
- [#2200]: Run CI on *-dev branch [[@joehillen]]
- [#2222]: Add context to confusing sqlx prepare parse error [[@laundmo]]
- [#2271]: feat: support calling Postgres procedures with the macros [[@bgeron]]
- [#2282]: Don't run EXPLAIN nullability analysis on Materialize [[@benesch]]
- [#2319]: Set whoami default-features to false [[@thedodd]]
- [#2352]: Preparing 0.7.0-alpha.1 release [[@abonander]]
- [#2355]: Fixed the example code for
sqlx::test[[@kenkoooo]] - [#2367]: Fix sqlx-cli create, drop, migrate [[@cycraig]]
- [#2376]: fix(pool): close when last handle is dropped, extra check in
try_acquire[[@abonander]] - [#2378]: Fix README build badge [[@dbrgn]]
- [#2398]: fix(prepare): store temporary query files inside the workspace [[@aschey]]
- [#2402]: fix: drop old time 0.1.44 dep [[@codahale]]
- [#2413]: fix(macros-core): use of undeclared
tracked_path[[@df51d]] - [#2420]: Enable runtime-tokio feature of sqlx when building sqlx-cli [[@paolobarbolini]]
- [#2453]: in README.md, correct spelling and grammar [[@vizvasrj]]
- [#2454]: fix: ensure fresh test db's aren't accidentally deleted by do_cleanup [[@phlip9]]
- [#2507]: Exposing the Oid of PostgreSQL types [[@Razican]]
- [#2519]: Use ::std::result::Result::Ok in output.rs [[@southball]]
- [#2569]: Fix broken links to mysql error documentation [[@titaniumtraveler]]
- [#2570]: Add a newline to the generated JSON files [[@nyurik]]
- [#2572]: Do not panic when
PrepareOkfails to decode [[@stepantubanov]] - [#2573]: fix(sqlite) Do not drop notify mutex guard until after condvar is triggered [[@andrewwhitehead]]
-
0.7.0-alpha.311 May 2023 pre-releaseNothing published for this version
-
0.7.0-alpha.217 Mar 2023 pre-releaseNothing published for this version
-
0.7.0-alpha.122 Feb 2023 pre-releaseNothing published for this version
-
0.0.027 Nov 2019Nothing published for this version