Skip to main content

init

Function init 

Source
pub async fn init(
    database_url: &str,
) -> Result<DatabaseConnection, DurableError>
Expand description

Initialize durable: connect to Postgres and run migrations.

Sets search_path = public, durable on every pooled connection so Postgres resolves the task_status enum type without a schema prefix.

let db = durable::init("postgres://localhost/mydb").await?;