init_global

Function init_global 

Source
pub fn init_global() -> Result<(), String>
Expand description

Initialize the global database. Call once at startup.

Safe under parallel cargo test: OnceLock stores at most one handle; a mutex ensures only one thread opens the DB file and runs migrations. Losers of the set race return Ok without retaining a second connection.