Skip to content
This repository

Contains wrapper for Neo4j Java object defined in the neo4j-core gem.

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore First commit March 20, 2012
Octocat-spinner-32 .travis.yml Trying to get travis to build April 23, 2013
Octocat-spinner-32 CHANGELOG
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE release 2.0.0.rc1 May 03, 2012
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 neo4j-wrapper.gemspec release 2.3.0 June 18, 2013


This contains the Ruby wrapper of the Neo4j::Node and Neo4j::Relationship java object defined in the neo4j-core gem. This gem is included in neo4j.


The public API

{Neo4j::NodeMixin} The Java Neo4j Node

{Neo4j::RelationshipMixin} The Java Relationship

{Neo4j::IdentityMap} The Identity Map (should be disabled for batch imports and Rake scripts)


class Company
  include Neo4j::NodeMixin

class Person
  include Neo4j::NodeMixin
  property :name
  property :age, :size, :type => Fixnum, :index => :exact
  property :description, :index => :fulltext

end do => 'jimmy', :age => 35)

person = Person.find(:age => (10..42)).first do
  person.best_friend =
  person.employed_by << => "Foo ab")

# find by navigate incoming relationship
company = person.employed_by.find { |p| p[:name] == 'Foo ab' }
puts "Person #{} employed by #{company[:name]}"
# navigate the outgoing relationship:
company.employees.each {|x| puts}


Changes from the neo4j.rb

  • Use of YARD instead of RDoc

  • Some tidy up of the API and code

  • Change of Ruby module structure.

  • More RSpecs and more use of mocking combined with real testing of the Java layer

  • Make sure that we retrieve relationships and nodes lazy if possible.

This gem contains two modules: Neo4j and Neo4j::Wrapper The Neo4j module is public and the Neo4j::Wrapper(::*) are private modules.


Notice there are different license for the neo4j-community, neo4j-advanced and neo4j-enterprise jar gems. Only the neo4j-community gem is by default required.

Something went wrong with that request. Please try again.