-
Notifications
You must be signed in to change notification settings - Fork 55
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
Explicit connect / disconnect in level adapter, etc #230
Conversation
…or better mongo parity
One other thing -- the options will now take a manifest object, as well as a path. |
I've added you to the Geddy org -- you should be getting an invitation shortly. Feel free to merge this PR -- we just need to make sure that the 0.10 tests are passing. |
Thanks! I’ll work out the tests, and get it merged up.
|
EXCELLENT. :) |
I've got in a test for multilevel now and both the original Level adapter test and it pass. I haven't added coverage for sublevel yet, though it should probably make it in there at some point. Only issue is, I see these Travis tests failing with Riak. Not being familiar with Riak, is that something you'd be able to sort out so we can have a happy machine before I merge in my changes? |
Riak has been a continual thorn in our sides. I am disabling the those tests in the interest of getting us green. I'll take a look at them when I can. They're not critical. |
Finally passing... I had to re-do the dropTable() method in the adapter to use db.batch() rather than a writeStream() because the writeStream seemed to keep the stream open indefinitely, not allowing the db to close without an error. This might actually be better long-term since LevelUp is threatening to drop the writeStream() method altogether. |
Explicit connect / disconnect in level adapter. Multilevel updates, cleanup, and adding tests. Changing dropTable() behavior in Level adapter.
EXCELLENT. Thanks so much for this! |
Sorry, I ended up with a less clean PR than I would have liked, got a little rushed on the project I was using this for.
Here I'm changing:
connect
method actually do the connecting for multilevel. This allows you to provision the models, and then connect the adapters as a separate action. Again, I'm following the Mongo adapter here.connect
process is now more robust, actually waiting for a connection before emitting an error or a connect, performing auth, and setting the adapter db.disconnect
method now closes the db.