glimr/config/database

Database Configuration

Centralizes database connection setup so application code doesn’t need to know about config file locations or parsing. Uses ${VAR} syntax for secrets to keep credentials out of version control while remaining simple to configure.

Values

pub fn clear_cache() -> Nil

Clears the cached database connections, forcing the next call to load() to re-read from config/database.toml. Useful for testing when you need to load different configurations.

pub fn load() -> List(driver.Connection)

Safe to call repeatedly from hot paths like request handlers since results are cached after first load. Returns empty list on missing/invalid config to let apps start without a database.

Search Document