glimr_postgres/postgres
PostgreSQL Connection Management
This module provides postgres database connection management for Glimr. It handles the initialization and configuration of postgres connection pools, enabling applications to efficiently manage database connections.
Values
pub fn start(name: String) -> pool.Pool
Starts a PostgreSQL connection pool with the specified configuration. Loads connections from config/database.toml and finds the matching connection by name, then initializes and returns a database pool using that configuration.
pub fn start_cache(
db_pool: pool.Pool,
name: String,
stores: List(driver.CacheStore),
) -> pool.Pool
Starts a PostgreSQL cache pool using an existing database pool. Searches through the provided cache stores to find a matching DatabaseStore by name, then creates a cache pool for it.