arangodb_ecto
arangodb_ecto copied to clipboard
Use Ecto 4.0?
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?
In addition, is there another way to query ArangoDB without relying on Ecto?
@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.
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.