Skip to main content

init

Function init 

Source
pub async fn init(url: &str, database: &str) -> Result<Pool, Error>
Expand description

Open the admin pool against url (no database path — lands on the connecting user’s default database, postgres), ensure database exists, then open the application pool and apply the inline schema. Idempotent across cold and warm starts — re-running against an already-bootstrapped database is a no-op (every CREATE uses IF NOT EXISTS).