based_pg

Types

pub type Config {
  Config(
    host: String,
    port: Int,
    database: String,
    username: String,
    password: String,
  )
}

Constructors

  • Config(
      host: String,
      port: Int,
      database: String,
      username: String,
      password: String,
    )

Functions

pub fn with_connection(
  config: Config,
  callback: fn(DB(a, Connection)) -> Result(Returned(a), Nil),
) -> Result(Returned(a), Nil)
Search Document