#13 ✓resolved
Andreas Ronge

Support for traversal of any depth

Reported by Andreas Ronge | December 28th, 2008 @ 08:50 PM | in 0.2.0

It now only support traversal of one level deep for has_one has has_many relationships Should be possible to specify how deep traversal The following should be easy to express in Neo4j.rb:

Traverser morpheusfriends = factory.createTraverser( Traverser.BREADTH_FIRST, // first return friends, then friends' friends morpheus, // start with Morpheus KNOWS, // relationship types we wish to traverse new DepthLimitStopEvaluator( 2 ), // don't traverse deeper than 2 levels ReturnableEvaluator.RETURN_ALL_BUT_START_NODE ); // return all nodes visited in

                                                // traversal except the first one

for ( Node friend : morpheusFriends )

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Neo4j.rb is a graph database framework for JRuby.

It provides:

* Mapping of ruby objects to nodes in networks rather than in tables.
* Storage of ruby object to a file system.
* Fast traversal of relationships between nodes in a hugh node space.
* Transaction with rollbacks support.
* Indexing and quering of ruby objects.
* Integration with Rails

People watching this ticket

Referenced by