arangodb-community / arangodb_ecto Goto Github PK
View Code? Open in Web Editor NEWAn Ecto adapter for ArangoDB.
License: MIT License
An Ecto adapter for ArangoDB.
License: MIT License
I am using mix ecto.create
to create database but getting the following error
** (Mix) The database for RegUser.Repo couldn't be created: %HTTPoison.Error{id: nil, reason: :econnrefused}
I am new to elixir and want to use ArangoDB via arango_ecto adapter.
Configurations in dev.exs file are:
config :reg_user, RegUser.Repo,
adapter: ArangoDB.Ecto,
username: "root",
password: "password",
database: "reg_user",
hostname: "10.0.21.6",
port: 8529,
pool_size: 10
Please help me to get through this.
Thanks in advance
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
?
Ecto.DateTime was deprecated some time ago.
Let's try to provide the same level of docs as Ecto and Postgrex.
Undocumented features:
Currently, the Ecto adapter uses ArangoEx. This driver exchanges regular json with the ArangoDB server.
Working with VelocyStream would make things faster.
Makes replacing Postgres with ArangoDB a little bit easier.
First, thank you for maintaining this driver.
I'm new to Elixir/Phoenix (currently using NodeJs) and considering migrating to Elixir.
The ArangoDB JavaScript driver API allows to write raw AQL queries. Does this driver allow to write raw AQL queries? If so, is there a documentation on this?
Hi,
The main thing I use ArangoDB is a dynamic link between multiple collections.
I.e. you can link a column named "media" to either a movie or a tv show and it will join easily.
Is this something you know if Ecto might be able to do? If that is the case I can surely help making arangodb_ecto working with the new db_connection etc.
Currently i'm using a forked Durango but as it has its limtis (i.e. not being able to use IN ARRAY in queries).
After some experimenting, a few areas arose, where we need to make changes:
lock_for_migrations
We have to translate Query.preload and Repo.preload into something like
AQL subqueries
from p in Post,
join: c in assoc(p, :comments),
preload: [comments: c]
should translate into
FOR p IN posts
FOR c IN comments
FILTER p._key == c.post_id
RETURN { post : p, comments : c }
Scenario:
mix phx.new
mix phx.gen.schema
to set up a migration filemix ecto.migrate
This error is thrown:
15:41:14.473 [error] Could not retrieve migrated versions. This error usually happens due to the following:
* The database does not exist
* The "schema_migrations" table, which Ecto uses for managing
migrations, was defined by another library
To fix the first issue, run "mix ecto.create".
To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table for managing migrations:
config :test, Test.Repo,
migration_source: "some_other_table_for_schema_migrations"
The full error report is shown below.
** (FunctionClauseError) no function clause matching in ArangoDB.Ecto.Adapter.execute/6
(elixir) lib/keyword.ex:504: Keyword.delete_key/3
(elixir) lib/keyword.ex:501: Keyword.delete_key/3
(elixir) lib/keyword.ex:501: Keyword.delete_key/3
(elixir) lib/keyword.ex:493: Keyword.put/3
lib/test/repo.ex:9: Test.Repo.init/2
(ecto) lib/ecto/repo/supervisor.ex:23: Ecto.Repo.Supervisor.runtime_config/4
lib/test/repo.ex:2: Test.Repo.config/0
(ecto) lib/ecto/migrator.ex:316: Ecto.Migrator.verbose_schema_migration/3
(ecto) lib/ecto/migrator.ex:157: Ecto.Migrator.run/4
(ecto) lib/mix/tasks/ecto.migrate.ex:83: anonymous fn/4 in Mix.Tasks.Ecto.Migrate.run/2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.