Crates.io | axum-sqlx-tx |
lib.rs | axum-sqlx-tx |
version | 0.8.0 |
source | src |
created_at | 2022-03-04 01:31:21.458477 |
updated_at | 2023-12-23 21:07:23.148159 |
description | Request-scoped SQLx transactions for axum |
homepage | |
repository | https://github.com/digital-society-coop/axum-sqlx-tx/ |
max_upload_size | |
id | 543290 |
size | 99,222 |
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.