Crate poem_sea_orm_middleware

source ·
Expand description

§poem-sea-orm-middleware version

This library is the Sea ORM middleware for Poem. This library is designed to make it easier for users to no longer need to manually begin transactions.


async fn hello(Path(name): Path<String>) -> String {
    // get transaction from task local
    let txn = default_txn().await.unwrap();

    let user = match Entity::find()
        Some(user) => user,
        None => return format!("not found: {name}"),

    format!("hello: {}",

Check examples, to see the full examples.