Crates.io | axum-sqlx-tx |
lib.rs | axum-sqlx-tx |
version | 0.9.0 |
source | src |
created_at | 2022-03-04 01:31:21.458477 |
updated_at | 2024-07-26 20:37:55.551542 |
description | Request-scoped SQLx transactions for axum |
homepage | |
repository | https://github.com/digital-society-coop/axum-sqlx-tx/ |
max_upload_size | |
id | 543290 |
size | 94,115 |
axum-sqlx-tx
Request-bound SQLx transactions for axum.
axum-sqlx-tx
provides an axum
extractor for obtaining a request-bound transaction.
The transaction begins the first time the extractor is used, and is stored with the request for use by other middleware/handlers.
The transaction is resolved depending on the status code of the response – successful (2XX
) responses will commit the transaction, otherwise it will be rolled back.
See the crate documentation for more information and examples.