Skip to main content

create_pool

Function create_pool 

Source
pub fn create_pool(database_url: &str) -> OrmResult<Pool>
Expand description

Create a connection pool from a database URL.

This is a convenience helper that uses NoTls and small default settings (suitable for local/dev). For production, prefer:

§Example

let pool = pgorm::create_pool("postgres://user:pass@localhost/db")?;
let client = pool.get().await?;