From eb3183a49da3c9cf30d275342d85aacdcacb8c30 Mon Sep 17 00:00:00 2001 From: Jason Shin Date: Sun, 1 Oct 2023 21:40:58 +0900 Subject: [PATCH] chore: add docs on DB_CONNECTIONS --- src/common/lazy.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/lazy.rs b/src/common/lazy.rs index 3c1fc52b..bf990322 100644 --- a/src/common/lazy.rs +++ b/src/common/lazy.rs @@ -44,6 +44,8 @@ lazy_static! { cache }; + // This variable holds a singleton of DBConnections that is used to get a DBConn from the cache + // DBConn is used to access the raw connection to the database or run `prepare` statement against each connection pub static ref DB_CONNECTIONS: Mutex> = { let db_connections = DBConnections::new(&DB_CONN_CACHE); Mutex::new(db_connections)