Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 2 more batch operations #47

Merged
merged 2 commits into from
Jun 20, 2012
Merged

Conversation

samirahmed
Copy link
Contributor

Hey Max, great job with neography.

In my use of neography, I found that I needed to support batch for a few operations not currently implemented in batch, so I took the liberty and

** Implemented delete_node and remove_node_from_index operations. **

This pull request adds the operations to the get_batch method in the 'lib/neography/rest.rb' file. I also added two spec fixtures to ensure that they work.

Let me know if you have see and issues that need fixing before accepting the request.

Thanks

Modified the neography/rest.rb 'get_batch' to add a case for
 :remove_node_from_index
 :delete_node
Both method use the HTTP DELETE Methods and contain no 'body'

Did not account for alias :remove_node_index

Still need to add tests.
Added to spec tests to very that the operations...

For testing batch delete node :
 - 2 node created one by one
 - Nodes deleted in batch
 - Get nodes results should be nil

For testing batch remove node :
 - Create two nodes with indicies one by one
 - In batch remove the node from the indidicies
 - Search for exact nodes should be nil
@maxdemarzi
Copy link
Owner

Awesome! Thanks Samir.

maxdemarzi added a commit that referenced this pull request Jun 20, 2012
Added 2 more batch operations
@maxdemarzi maxdemarzi merged commit e048609 into maxdemarzi:master Jun 20, 2012
willkessler pushed a commit to willkessler/neography that referenced this pull request Apr 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants