gloo/adapter/postgres
Postgres adapter. Wraps the pog connection pool.
postgres.default_config()
|> postgres.database("myapp_dev")
|> postgres.user("postgres")
|> postgres.start()
// -> Result(Repo, actor.StartError)
Types
pub type Config {
Config(
host: String,
database: String,
user: String,
password: option.Option(String),
pool_size: Int,
)
}
Constructors
-
Config( host: String, database: String, user: String, password: option.Option(String), pool_size: Int, )
Values
pub fn default_config() -> Config
pub fn password(
config: Config,
password: option.Option(String),
) -> Config
pub fn start(
config: Config,
) -> Result(repo.Repo, actor.StartError)