Skip to main content

connect_database

Function connect_database 

Source
pub fn connect_database(database_url: &str) -> Result<Client, MigrationError>
Expand description

Connect to PostgreSQL using the same TLS policy as migration commands.

ยงErrors

Returns an error when the URL is invalid, TLS cannot be initialized, or PostgreSQL rejects the connection.