Skip to main content

run_cli_with_custom_connection

Function run_cli_with_custom_connection 

Source
pub async fn run_cli_with_custom_connection(
    migrator: impl MigratorTraitSelf,
    make_connection: impl AsyncFnOnce() -> Result<DbConn, DbErr>,
)
Expand description

Same as run_cli where you provide a fully customized way to create the DbConn.

This allows loading database configuration from sources other than CLI arguments or environment variables.