Map objects returned from Neo4j graph traversals using the Ruby Object Mapper toolkit.
Install with Rubygems:
Or add the dependency to your Gemfile
:
Right now, the fastest way to get started is to run the tests.
You’ll need to have Neo4j installed on your system. If it’s not already running, start the database server with:
To load the sample movies graph, go to http://localhost:7474/browser/
and click through the instructions or type :play movie graph
in the console to start.
Once the movies graph is loaded, the integration specs should run:
setup.relation(:movies) do matches m: :Movie returns m: [:title, :released, :tagline] def titled(title) where('m.title' => title) end end movie = rom.relation(:movies).titled('The Matrix').one movie.title # => "The Matrix" movie.updated # => 1999
setup.relation(:directors) do matches '(director:Person)-[:DIRECTED]->(movie:Movie)' returns 'DISTINCT director.name as name' def by_movie(title) where('movie.title' => title) end end director = rom.relation(:directors).by_movie('RescueDawn').one director.name # => "Werner Herzog"
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4