Skip to content
Hstore support for Postgrex
Elixir
Latest commit 20266e0 Jul 28, 2015 @tyre tyre Merge pull request #6 from lowks/patch-1
Update .travis.yml
Failed to load latest commit information.
config
lib
test
.gitignore
.travis.yml
README.md Fix typo in Readme: "elixer" -> "elixir" Jul 22, 2015
mix.exs
mix.lock

README.md

Hstore

HStore support for Postgrex

  def deps do
    [{:hstore, "~> 0.0.2"}]
  end

Now all up in your iex -S mix:

  opts = [
    hostname: "localhost",
    username: "postgres",
    database: "hstore_database",
    encoder: &Hstore.encoder/3,
    decoder: &Hstore.decoder/4,
    formatter: &Hstore.formatter/1
  ]
  {:ok, pid} = Postgrex.Connection.start_link(opts)
  Postgrex.Connection.query(pid, "SELECT * FROM table_with_hstore", [])
Something went wrong with that request. Please try again.