How to use sea-orm crate in Rust async ORM

Install sea-orm via Cargo and initialize an async database connection using the Database::connect method.

Add the sea-orm crate to your Cargo.toml and initialize the database connection in your async runtime.

[dependencies]
sea-orm = { version = "1.1", features = ["sqlx-postgres", "runtime-tokio-rustls"] }
use sea_orm::Database;

#[tokio::main]
async fn main() -> Result<(), sea_orm::DbErr> {
    let db = Database::connect("postgres://user:pass@localhost/dbname").await?;
    Ok(())
}