Skip to content

Conversation

JosiahParry
Copy link
Owner

No description provided.

joeydewaal and others added 16 commits August 26, 2025 22:29
* sqlx-postgres(tests): fix positive_int domain type

* sqlx-postgres(tests): Update no pg array test

* sqlx-core: Remove conflicting Type impl for Box<JsonRawValue>
…cies (launchbadge#3989)

Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
…ods (launchbadge#3987)

* chore(deps): Resolve deprecation warning for chrono Date and ymd methods

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

* chore(ci): Fail postgres tests if compiling them generates warnings

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

---------

Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
I couldn't follow the steps in `tests/README.md` because two containers failed to bind to the same port, already used by a local running database.
…ype` by default for newtype structs (launchbadge#4008)

add regression tests
…ge#4009)

Once a connection to the database is lost all future macro evaluations
will fail. This is fine for normal compilation since it tends to be
short but causes issues with rust-analyzer since it keeps the macro
binaries loaded for a long time.

This commit changes the macro implementation to drop the cached
connection when it encounters an IO or protocol error. In practice these
seem to be the errors that show up when the connection is lost and
dumping the connection on every error would have unnecessary overhead.
* Yield while salting password for PG SASL

To prevent spenting too much time doing synchronous work on the
event loop, we yield every few iterations of the hmac-sha256.

* Remove unused bench
* Sqlx-core: rename async_io dependency for async-std

* Sqlx-core: simplify TimeoutError

* Sqlx-core: code for async-global-executor

* Sqlx: integrate async-global-executor feature

* Note to unsafe

* Step up MSRV as async-global-executor needs it

* Sqlx-core: fix of unix socket build

* Unsafe fixes, smol executor added

* Workflow fix

* Changes outside sqlx_rt

* Cleanup conditional rt compilation

* Warning

* Add executors to test matrix

* Fix of skipping code sqlite due to mismatch in cargo feature names

* Smol executor isolated

* Fix, reduce number of tests, remove async_std

* Fix of test_block_on, regression

* Format fixes

* async-global-executor added

* async-std changed to 1.13

* litemap, zerofrom requires rustc 1.81

* Fix of missing _sqlite in cargo.toml

* Clippy lints

* Clean up

* Remove features combinations

* Fixes after merge

* Fix of compiling connect_tcp_address with both tokio + other executor selected

* Try to fix CI -Z minimal-versions check

Try to fix CI -Z minimal-versions check
* Add the helper function with_migrations() to Migrator.

* cargo fmt

* cargo fmt

* cargo fmt

* Improve comments.
* 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 ()`
* 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
…ge#3958)

Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
…hbadge#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>
* Fix migration reverts for no-TX SQLite

* Add regression test

---------

Co-authored-by: Markus Gasser <markus.gasser@frauscher.com>
…chbadge#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>
@JosiahParry JosiahParry merged commit 62db1b2 into feat/json-any Sep 24, 2025
@JosiahParry JosiahParry deleted the dev-merge branch September 24, 2025 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.