Commit Graph

2768 Commits

Author SHA1 Message Date
Austin Bonander
d6d4e59272 fix: run cargo fmt 2026-02-27 14:05:28 -08:00
Austin Bonander
4485e09798 WIP refactor: replace sharding with single connection set (6) 2026-02-27 14:05:28 -08:00
Austin Bonander
77d076f70d WIP refactor: replace sharding with single connection set (5) 2026-02-27 14:05:28 -08:00
Austin Bonander
831a5de71b feat: add tracing-flame to benches/any-pool 2026-02-27 14:05:28 -08:00
Austin Bonander
ac40323e4c WIP refactor: simpler acquire strategy 2026-02-27 14:05:28 -08:00
Austin Bonander
e89775258a WIP refactor: replace sharding with single connection set 2026-02-27 14:05:28 -08:00
Austin Bonander
fee55df248 fix: debug timeouts in benchmark 2026-02-27 14:05:28 -08:00
Austin Bonander
3f30e698c8 fix: bugs in sharded pool 2026-02-27 14:05:28 -08:00
Austin Bonander
f9c5b949ec chore: Cargo.lock after rebase 2026-02-27 14:05:28 -08:00
Austin Bonander
32012f8855 WIP feat: integrate sharding into pool 2026-02-27 14:05:28 -08:00
Austin Bonander
a02546d23e feat: create sharding structure for pool 2026-02-27 14:05:28 -08:00
Austin Bonander
1185e7e0a9 fix errors after rebase 2026-02-27 14:05:28 -08:00
Austin Bonander
568471d90a fix: errors after rebasing 2026-02-27 14:05:28 -08:00
Austin Bonander
965ae1b398 fix(pool): tweaks and fixes 2026-02-27 14:05:28 -08:00
Austin Bonander
69c071b245 fix(pool): use .fuse() 2026-02-27 14:05:28 -08:00
Austin Bonander
d0f598fc0b fix(pool): use the correct method in try_min_connections 2026-02-27 14:05:28 -08:00
Austin Bonander
6c1564a9d5 fix(pool): don't stop emptying idle queue in .close() 2026-02-27 14:05:28 -08:00
Austin Bonander
7a31c90ae0 fix: tests 2026-02-27 14:05:28 -08:00
Austin Bonander
402c81d5a4 fix: upgrade ease-off 2026-02-27 14:05:28 -08:00
Austin Bonander
4eae60853f chore: delete defunct use of futures-intrusive 2026-02-27 14:05:28 -08:00
Austin Bonander
c02e5eee37 fix: compilation error, warnings 2026-02-27 14:05:28 -08:00
Austin Bonander
e3cf5db6fe feat(pool): add more info to impl Debug for PoolConnection 2026-02-27 14:05:28 -08:00
Austin Bonander
b74cf8a185 fix(pool): add timeout to return_to_pool() 2026-02-27 14:05:28 -08:00
Austin Bonander
e1a3a623c5 refactor(pool): use a unique ID per connection 2026-02-27 14:05:28 -08:00
Austin Bonander
f02354dccd fix(pool): spawn task for before_acquire 2026-02-27 14:05:28 -08:00
Austin Bonander
8efb358593 WIP pool changes 2026-02-27 14:05:28 -08:00
Austin Bonander
418bcbb80e breaking(pool): use usize for all connection counts 2026-02-27 14:05:28 -08:00
Austin Bonander
63a9be27ef feat: create Pool::acquire() benchmark 2026-02-27 14:05:28 -08:00
Bailey Hayes
d9b3340d2f fix(sqlx-cli): bump openssl minimum to 0.10.46 (#4172)
native-tls 0.2.12 calls `Pkcs12::parse2()` which was added in
openssl 0.10.46, but declares its minimum as 0.10.29. The
minimal-versions resolver picked openssl 0.10.38 (our previous
lower bound), which lacks `parse2`.
2026-02-24 18:20:16 -08:00
Dario Anongba Varela
f5cdf3316d sqlx-sqlite: relax libsqlite3-sys constraint to allow 0.36.x (#4161) 2026-02-12 14:37:05 -08:00
Cathal
7248f64244 breaking: make offline optional to allow building without serde (#4077)
* refactor(postgres): split describe into resolve and explain

* refactor(postgres): remove duplicated code from resolve and explain

* breaking: make `offline` optional to allow building without `serde`
2026-02-05 17:06:30 -08:00
tottoto
9645a9ad8d Update to webpki-roots 1 (#4042) 2026-02-05 16:58:33 -08:00
Joey de Waal
8189f897ce Add on unimplemented diagnostic to SqlStr (#4153)
* add diagnostic to `SqlStr`

* Update note
2026-02-02 07:13:52 -08:00
tison
1dd526a2ed Bump whoami to v2 (#4143)
* Bump whoami to v2

Signed-off-by: tison <wander4096@gmail.com>

* Update sqlx-postgres/src/options/mod.rs

---------

Signed-off-by: tison <wander4096@gmail.com>
2026-01-17 19:02:10 -08:00
chrxn1c
93bafbefd6 feat: add self-extractor for JSON type (#4123) 2026-01-17 12:40:53 -08:00
M Bakhtiyar Ali
452da1acf5 Bump bit-vec to v0.8 (#4094) 2025-12-30 13:53:59 -08:00
Austin Bonander
a2a219f175 fix CI: replace removed macOS runner, deprecated use of Command::cargo_bin() (#4134)
* fix(ci): update macOS intel runner version

* fix(cli/tests): replace use of deprecated `Command::cargo_bin()`
2025-12-24 21:40:53 -08:00
Joey de Waal
e8384f2a00 fix spelling (#4069) 2025-10-28 05:18:47 -07:00
Andreas Molitor
e4afbd4ca1 chore: update hashlink to v0.11.0 (#4072)
Co-authored-by: amolitor <andreas.molitor@andrena.de>
2025-10-28 04:46:25 -07:00
Austin Bonander
2a1eedd299 fix(CHANGELOG): correct link to #4015 2025-10-28 04:44:02 -07:00
Kevin R
a802da0e67 Fix typo in migration example from 'uesrs' to 'users' (#4068) 2025-10-22 19:40:50 +02:00
Austin Bonander
946b6d4d16 fix: break dev-dependency cycle because of rust-lang/cargo#15622 2025-10-14 19:08:15 -07:00
Austin Bonander
1b2b19fe8e chore: update CHANGELOG for 0.9.0-alpha-1 (#4057) 2025-10-14 18:47:11 -07:00
Austin Bonander
388c424f48 fix(macros): smarter .env loading, caching, and invalidation (#4053)
* fix(macros): smarter `.env` loading, caching, and invalidation

* feat(mysql): test `.env` loading in CI

* feat(postgres): test `.env` loading in CI

* feat(macros): allow `DATABASE_URL` to be empty

* fix(examples/postgres): make `cargo-sqlx` executable

* fix(examples/postgres): `cargo sqlx` invocation

* feat(examples/postgres): check offline prepare on more examples

* fix(examples/postgres): the name of this step

* fix(cli): don't suppress error from `dotenv()`

* fix(ci/examples/postgres): don't use heredoc in this step

* fix(ci/examples/postgres): multi-tenant

* fix(ci/examples/sqlite): test `.env` loading

* chore: add CHANGELOG entry
2025-10-14 17:31:12 -07:00
David Uebler
064d649abd native tls handshake: build TlsConnector in blocking threadpool (#4027)
* build TlsConnector in blocking threadpool

The openssl TlsConnector synchronously loads certificates from files.
Loading these files can block for tens of milliseconds.

* Update sqlx-core/src/net/tls/tls_native_tls.rs

---------

Co-authored-by: David Übler <david.uebler@puzzleyou.de>
Co-authored-by: Austin Bonander <austin.bonander@gmail.com>
2025-09-23 07:23:01 -07:00
Dosenpfand
c52e129e83 fix(sqlite) Migrate revert with no-transaction (#4024)
* Fix migration reverts for no-TX SQLite

* Add regression test

---------

Co-authored-by: Markus Gasser <markus.gasser@frauscher.com>
2025-09-14 17:43:39 -07:00
iamjpotts
81526898d4 refactor(core): Remove lifetime parameter from Arguments trait (#3960)
* refactor(core): Remove lifetime parameter from Arguments trait

Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>

* refactor(core): Also relax lifetime of argument passed to Query::bind and Query::try_bind

Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>

---------

Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
2025-09-13 21:47:45 -07:00
iamjpotts
54a0492ee2 refactor(any): Remove lifetime parameter from AnyArguments (#3958)
Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
2025-09-12 16:11:39 -07:00
Alejandro González
1f4b5f28f3 feat(sqlite): no_tx migration support (#4015)
* chore(sqlx-postgres): fix typo in `migrate.rs` comment

* feat(sqlite): support `no_tx` migrations

SQLite includes several SQL statements that are useful during migrations but
must be executed outside of a transaction to take effect, such as `PRAGMA
foreign_keys = ON|OFF` or `VACUUM`. Additionally, advanced migrations may want
more precise control over how statements are grouped into transactions or
savepoints to achieve the desired atomicity for different parts of the
migration.

While SQLx already supports marking migrations to run outside explicit
transactions through a `-- no-transaction` comment, this feature is currently
only available for `PgConnection`'s `Migrate` implementation, leaving SQLite and
MySQL without this capability. Although it's possible to work around this
limitation by implementing custom migration logic instead of executing
`Migrator#run`, this comes at a cost of significantly reduced developer
ergonomics: code that relies on the default migration logic, such as
`#[sqlx::test]` or `cargo sqlx database setup`, won't support these migrations.

These changes extend `SqliteConnection`'s `Migrate` implementation to support
`no_tx` migrations in the same way as PostgreSQL, addressing this feature gap. I
also considered implementing the same functionality for MySQL, but since I
haven't found a practical use case for it yet, and every
non-transaction-friendly statement I could think about in MySQL triggers
implicit commits anyway, I determined it wasn't necessary at this time and could
be considered an overreach.

* test(sqlite): add test for `no_tx` migrations

* chore(sqlx-sqlite): bring back useful comment

* chore(sqlx-sqlite): unify SQL dialect in annotation comments
2025-09-08 14:55:58 -07:00
Austin Bonander
66526d9c56 refactor: tweaks after #3791 (#4022)
* restore fallback to `async-io` for `connect_tcp()` when `runtime-tokio` feature is enabled
* `smol` and `async-global-executor` both use `async-task`, so `JoinHandle` impls can be consolidated
* no need for duplicate `yield_now()` impls
* delete `impl Socket for ()`
2025-09-08 14:28:58 -07:00