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

Use Cypher in cleandb() instead of the deprecated cleandb extension #180

Open
szabi opened this issue Jun 3, 2013 · 7 comments
Open

Use Cypher in cleandb() instead of the deprecated cleandb extension #180

szabi opened this issue Jun 3, 2013 · 7 comments

Comments

@szabi
Copy link

szabi commented Jun 3, 2013

Michael Hunger did never upgrade cleandb extension of neo4j as beginning with 1.9 you can purge the DB via cypher. (see link below; actually, I did not even manage to get cleandb to work with 1.8 either)

Unit test are crucial. Enable the possibility to clean the test db not via the cleandb extension, but via cypher.

http://stackoverflow.com/questions/16862852/why-does-the-cleandb-extension-refuse-to-delete-my-neo4j-graph-database

@mhluongo
Copy link
Member

mhluongo commented Jun 3, 2013

@szabi I'm pretty sure this is a non-issue, or none of our tests would run- are you sure you're not missing something with the extension? It works fine on our continue integration in Travis (eg https://travis-ci.org/scholrly/neo4django/jobs/7724430) and, on top of that, the neo4django.neo4jclient.EnhancedGraphDatabase.cleandb() method falls back to Gremlin if the cleandb extension doesn't work (https://github.com/scholrly/neo4django/blob/master/neo4django/neo4jclient.py#L47).

I think upgrading to Cypher to do the deletions might be a good idea, but our tests certainly work in 1.8-1.9.

@szabi
Copy link
Author

szabi commented Jun 3, 2013

Hm, my error seems definitely have to do with my neo4j/cleandb setup, as the server does not respond to the REST call of the cleandb method. (As described in the stackoverflow question). The reason I dared to raise an issue here before everything about that was sorted out over at stack overflow was exactly because it occured to me, that "upgrading to Cypher to do the deletions might be a good idea". :-)

(Btw, given that you do have a fallback to Gremlin, it's well possible that cleandb does not work on your setup either, and the tests clean the DB via Gremlin already?) — However, I see how the title of the issue here was premature asking for making the unit tests work, when it does, due to the fallback. (Actually, when the REST calls did not work on cleandb I did not further investigate or even try doing it via neo4django; sorry for that).

@mhluongo
Copy link
Member

mhluongo commented Jun 3, 2013

No worries, I'll change the title and we'll leave this open- we 100% need it for 2.0 since the Gremlin plugin won't be in Neo4j by default, and if cleandb is this much of a pain maybe a switch sooner is better.

@techdragon
Copy link

I'm currently trying to get neo4django to support neo4j 2.x (and then hopefully django 1.7 support)
I'll probably issue a pull request for this unless someone else already has code changes they can share ?

@mhluongo
Copy link
Member

mhluongo commented Jun 8, 2014

@techdragon please- I haven't had time to finish the upgrade to 2.x, so that would be great. Though I'm really interested to hear how you plan to tackle the query module- I'm skeptical Cypher has everything we need to completely remove Gremlin and remain performant (eg, ORs and indexes).

@techdragon
Copy link

@mhluongo not sure about the full feature set but between the changes needed to do things in gremlin and the changes needed to do things in cypher and all the changes made to the cypher syntax in the upgrade to 2.0 I'm fairly sure there will be a way

@techdragon
Copy link

@mhluongo see my comments over in here #241 (comment), this gremlin/groovy/transaction stuff is breaking the test suite which makes it nigh impossible to be sure if my new code is fixing this issue. If we can unblock the that issue a little bit, and even get just a few of the tests passing, then i can issue a proper PR for this cypher powered delete ticket.

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

No branches or pull requests

3 participants