arangodb_ecto icon indicating copy to clipboard operation
arangodb_ecto copied to clipboard

Use Ecto 4.0?

Open tmaabm opened this issue 6 years ago • 5 comments
trafficstars

Hi,

I'm starting a new phoenix project where Ecto 4.0.0 is the default version. However arangodb_ecto requires Ecto 2.2. I tried to use Ecto 2.2 but it is apparently unavailable on hex?

tmaabm avatar Aug 07 '19 17:08 tmaabm

In addition, is there another way to query ArangoDB without relying on Ecto?

tmaabm avatar Aug 07 '19 17:08 tmaabm

@tbm206 I suppose you mean Ecto 3.0, since there exists no version 4.0 as of now (https://www.hex.pm/packages/ecto/versions). I have been meaning to update the adapter to Ecto 3.0 for a while now, but unfortunately I never found enough time. Anyway, you can certainly use Ecto 2.2 since this is also what we do for now. Just make sure that your deps list specifies the correct version: {:ecto, "~> 2.2"}

You can always resort to pure AQL like this:

{:ok, result} = ArangoDB.Ecto.query(MyRepo, """
      FOR d in docs
        FILTER ...
        RETURN d
      """)

This will use the DB settings from your Repo configuration.

mpoeter avatar Aug 08 '19 16:08 mpoeter

I know this is an old issue but just in case someone is looking at this in the future. I have made an adapter for ArangoDB for Ecto 3.x. It also implements some additional features such as better support for graphs, geo data, etc.

https://github.com/TomGrozev/arangox_ecto

TomGrozev avatar Jun 07 '21 02:06 TomGrozev