Questions tagged [postgrex]

For questions related to PostgreSQL driver for Elixir.

postgrex is a driver for .

Features:

  • Automatic decoding and encoding of Elixir values to and from PostgreSQL's binary format
  • User defined extensions for encoding and decoding any PostgresSQL type
  • Supports transactions, prepared queries and multiple pools via DBConnection
  • Supports PostgreSQL 8.4, 9.0, 9.1, 9.2, 9.3, 9.4, and 9.5 (hstore is not supported on 8.4)

Additional links:

32 questions
0
votes
1 answer

Route to controller which fetches from database and returns results in http response

I want to have a route that gets all entries from a database table and returns them. in router.ex: get "/categories/" do [controller] = ["repo"] Api.Repo.getCategories(conn, controller) end in repo.ex: def getCategories(conn,…
BeniaminoBaggins
  • 11,202
  • 41
  • 152
  • 287
0
votes
1 answer

Get the current ID in Postgres before insert

I'm trying to hash the current ID of every book I insert in the database, so that every book will be recognized by such 'code'. Is there is a way in Ecto to display value of fragment("nextval('books_id_seq')") in a changeset or Ecto.insert() ? So…
kayne
  • 349
  • 2
  • 15
1 2
3