Skip to content

大佬可否写一个在axum中使用事务的案例? #3

@CQCisBest

Description

@CQCisBest

本地调试的时候有这个报错:
= help: the trait Send is not implemented for (dyn StdError + 'static)
let tx = state.transaction().await;
| -- has type Result<SqliteTransaction<'_>, TaitanOrmError> which is not Send
...
104 | let result = tx.insert(&dbase_entity).await;
| ^^^^^ await occurs here, with tx maybe used later

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions