Function axum_restful::db::get_db_connection_pool
source · pub async fn get_db_connection_pool() -> &'static DatabaseConnectionExpand description
only init once will read some env keys if exists.
env DATABASE_URL to specific the database connect options, default is postgres://demo-user:demo-password@localhost:5432/demo
env SQLX_LOGGING to config the sqlx logging, default is false, can chaneg into true
env SQLX_LOGGING_LEVEL to config the sqlx logging level, default is info, choices is debug, info, warning…, same as log::Level.