Skip to content

Commit

Permalink
Merge pull request #35 from heelhook/master
Browse files Browse the repository at this point in the history
batch call to do get_node_relationships
  • Loading branch information
maxdemarzi committed Mar 30, 2012
2 parents 42346ad + 65b53b2 commit 07495c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ To Use:
[:set_node_property, node2, {"name" => "Jerry"}] # Sets the property of two nodes
@neo.batch [:create_unique_node, index_name, key, value,
{"age" => 33, "name" => "Max"}] # Creates a unique node
@neo.batch [:get_node_relationships, node1, "out",
[:get_node_relationships, node2, "out"] # Get node relationships in a batch
@neo.batch [:get_relationship, rel1],
[:get_relationship, rel2] # Gets two relationships in a batch
@neo.batch [:create_relationship, "friends",
Expand Down
2 changes: 2 additions & 0 deletions lib/neography/rest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,8 @@ def get_batch(args)
{:method => "GET", :to => "/index/node/#{args[1]}/#{args[2]}/#{args[3]}"}
when :get_relationship_index
{:method => "GET", :to => "/index/relationship/#{args[1]}/#{args[2]}/#{args[3]}"}
when :get_node_relationships
{:method => "GET", :to => "/node/#{get_id(args[1])}/relationships/#{args[2]}"}
else
raise "Unknown option #{args[0]}"
end
Expand Down

0 comments on commit 07495c5

Please sign in to comment.