gmysql/pool

Types

pub opaque type Message
pub opaque type Pool
pub type WithConnectionError {
  CouldNotCheckout
}

Constructors

  • CouldNotCheckout

Functions

pub fn checkin_connection(
  pool: Pool,
  connection: Connection,
) -> Nil
pub fn checkout_connection(
  pool: Pool,
  timeout: Int,
) -> Result(Connection, Nil)
pub fn connect(
  config: Config,
  count: Int,
  limit max_connections_per_second: Int,
) -> Pool
pub fn disconnect(pool: Pool) -> Nil
pub fn new_connection(pool: Pool) -> Nil
pub fn restart_all_connections(pool: Pool) -> Nil
pub fn restart_connection(
  pool: Pool,
  connection: Connection,
) -> Nil
pub fn with_connection(
  pool: Pool,
  wait checkout_timeout: Int,
  with function: fn(Connection) -> a,
) -> Result(a, WithConnectionError)
Search Document