Skip to main content

premix_orm/integrations/
actix.rs

1/// Actix-web helper type alias for Premix pools.
2pub type PremixData<DB> = actix_web::web::Data<sqlx::Pool<DB>>;
3
4/// Wrap a Premix pool as Actix application data.
5pub fn premix_data<DB: sqlx::Database>(pool: sqlx::Pool<DB>) -> PremixData<DB> {
6    actix_web::web::Data::new(pool)
7}