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,
  connections: List(driver.Connection),
) -> pool.Pool

Starts a PostgreSQL connection pool with the specified configuration. Searches through the provided connections list to find a 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.

Search Document