rhinoman / couchdb-go

CouchDB driver for Go
MIT License
48 stars 16 forks source link

API missing primary index (_all_docs) and range over indexes #7

Open jblachly opened 8 years ago

jblachly commented 8 years ago

Thanks for this package, it looks fantastic.

One thing that's missing from the API appears to be a way to access the primary index at db/_all_docs/. I note that the function ReadMultiple calls this endpoint, but always in the context of retrieval of arbitrary list of document _ids. It would be nice if I could retrieve all documents (without creating a view).

Further, I have given my documents ids that have meaningful sort order and would like to range over them as I do in the couchdb REST interface with startkey and endkey. Even if I created a view as I might for the solution to the paragraph above, I still can't retrieve subsets of views with the couchdb-go API.

Thank you for considering.

rhinoman commented 8 years ago

This doesn't look like it would be very difficult to implement. However, it might be some time before I get to it, I'm neck deep in some other projects at the moment. Though, I'm always open to pull requests...

jblachly commented 8 years ago

I am a golang novice but will give it a try if you are willing to provide constructive feedback to the pull request

rhinoman commented 8 years ago

Of course, no problem.