pub async fn get_db_connection_pool() -> &'static DatabaseConnection
Expand 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.