Build Status Dependency Status Code Climate

ArangoDB adapter for axiom.


Install the gem axiom-arango-adapter via your preferred method.


Setup a gateway and connect it to ArangDB:

require 'axiom-arango-adapter'
require 'logger'

# Connect to ArangoDB
database ='http://localhost:8529')

# Save some people in the database
collection = database['people']

  { :id => 1, :firstname => "Jon", :lastname => "Doe" },
  { :id => 2, :firstname => "Sue", :lastname => "Doe" }
].each do |document|

# Some logger to see AQL
logger =$stderr, :debug)

# Instantiating adapter
adapter =, logger)

# Setting up a base relation
header = Axiom::Relation::Header.coerce([[:id, Integer], [:firstname, String], [:lastname, String]])
base   =, header)

# Creating a gateway
gateway = adapter.gateway(base)

# Use the gateway with the examples from the axiom README, for example:
gateway.restrict { |r| r.firstname.eq("Sue") } # restricts to tuples where firstname is "Sue"

You can find more examples in the axiom README.


Axiom has a fuzzer to assist checking the correctness of the adapter and datastore. To run the fuzzer execute the following:

bundle exec spec/fuzzer.rb

Make sure you run an ArangoDB instance on localhost at the default port!



  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with Rakefile or version (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.


This gem is published under the MIT license. See LICENSE file.