Packages

Postgrex extension for the PostgreSQL extension of the same name

Current section

Files

Jump to
pg_secret lib pg_secret.ex
Raw

lib/pg_secret.ex

defmodule PGSecret do
@moduledoc """
`PGSecret` is an extension type for `Postgrex` to support the data types defined in the
PostgreSQL extension of the same name. See [https://github.com/cipherstash/pg_secret](https://github.com/cipherstash/pg_secret).
## Usage
### Directly in Postgrex
Postgrex.Types.define(
MyApp.PostgrexTypes,
[PGSecret.Extension]
)
### Ecto
#Add extensions to your repo config
config :thanks, Repo,
database: "secrets",
username: "postgres",
password: "postgres",
hostname: "localhost",
adapter: Ecto.Adapters.Postgres,
types: MyApp.PostgresTypes
"""
end