Light
Dark
System
v3latest
v3latest
v2
v1

EdgeDB client for Elixir

edgedb-elixir is the EdgeDB client for Elixir. The documentation for client is available on edgedb.com and on hex.pm.

edgedb-elixir is available on hex.pm and can be installed via mix. Just add :edgedb to your dependencies in the mix.exs file:

Copy
{:edgedb, "~> 0.1"}

EdgeDB comes with JSON support out of the box via the Jason library. To use it, add :jason to your dependencies in the mix.exs file:

Copy
{:jason, "~> 1.0"}

The JSON library can be configured using the :json option in the :edgedb application configuration:

Copy
config :edgedb,
    json: CustomJSONLibrary

The JSON library is injected in the compiled EdgeDB code, so be sure to recompile EdgeDB if you change it:

Copy
$ 
mix deps.clean edgedb --build

EdgeDB can work with Timex out of the box. If you define Timex as an application dependency, EdgeDB will use Timex.Duration to encode and decode the std::duration type from database. If you don’t like this behavior, you can set EdgeDB to ignore Timex using the :timex_duration option by setting this to false in the :edgedb application configuration:

Copy
config :edgedb,
    timex_duration: false

EdgeDB will inject the use of Timex into the std::duration codec at compile time, so be sure to recompile EdgeDB if you change this behavior:

Copy
$ 
mix deps.clean edgedb --build

This project is licensed under the terms of the Apache 2.0 license. See LICENSE for details.

Light
Dark
System

We use ChatGPT with additional context from our documentation to answer your questions. Not all answers will be accurate. Please join our Discord if you need more help.