Closed tammoippen closed 7 years ago
This looks great to me from reading the code. I've not got time right now to test it, but I'd definitely support what this PR is trying to achieve. I did something similar in a fork for my project but never found the time to get the tests together and for that reason haven't sent in a PR. I'd happily switch to this though and drop my fork :+1:
@djc Are there still changes requested, that I overlooked? Is there something holding this PR back?
The only changes I'd like to have done or a bit meta; rearranging your commits so that they make a logical series of commits (that is, without things like "Apply requested changes" or "Revert unwanted changes"). I was going to do this myself, but if you are up for it you don't have to wait for me. I've been very busy the past weeks, which is why I haven't gotten to it, but I expect to merge it by next week if redoing the commits is up to me. (I can give a bit more detail if you want to do it.)
I can do that.
@djc Done.
Thanks! I swizzled it a little more (mostly allocating some of the random bits and pieces from your last commit to earlier commits) and pushed it to master. Would it be convenient for you if I push this as a release?
@djc I am good with working with master for now. When I run into more 2.0 related issues (I know of some already), I will eventually provide PRs (if time permits).
Cool, looking forward to it!
sudo pip install git+https://github.com/djc/couchdb-python@master does not update my copy of client.py with these wonderful additions I see in the latest version.. Any idea why?
Not really. Are you loading the correct copy of the library into your application? Maybe ask the pip folks about it.
I want to use CouchDB 2 in a private project and plan to use the new mango queries. Here I implemented the wrappers for the new endpoints:
find
corresponds to endpointPOST /{db}/_find
explain
corresponds to endpointPOST /{db}/_explain
index
,add_index
andremove_index
correspond toGET /{db}/_index
,POST /{db}/_index
andDELETE /{db}/_index/{designdoc}/json/{name}
Further, I added the
_selector
filter in thechanges
method.I wrote tests for the new methods, but since they only work for CouchDB >= 2.0.0. I skip those test in case CouchDB < 2.0.0.
Finally, I needed to change the
http::Resource::_request
method to allow multiple path elements in a request (forremove_index
).Should solve #300 and partly #306 .