The aim of flechtwerk is to provide a very minimal wrapper for the neo4j graph database. There are other alternatives which might be much more feature rich, but this gem will remain very barebone.
Add this line to your application's Gemfile:
gem 'flechtwerk'
And then execute:
$ bundle
Or install it yourself as:
$ gem install flechtwerk
Create a connection object
graph = Flechtwerk.new
Get the root node for the graph
graph.root
Find a specific node by its it or node hash
graph.find_node(id)
Create a new node
graph.create_node # empty node
graph.update_node(id, { name: 'Testnode', size: 12 })
Change a nodes attributes
graph.update_node(id, { name: 'Married node', age: 35 }) # resets all attributes
graph.update_node_property(id, 'name', 'New name') # only changes the name attribute
graph.delete_node_property(id, 'name') # removes only the name attribute
Delete a node
graph.delete_node(id)
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request