couchdb-go icon indicating copy to clipboard operation
couchdb-go copied to clipboard

API missing primary index (_all_docs) and range over indexes

Open jblachly opened this issue 9 years ago • 3 comments

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.

jblachly avatar Jun 20 '16 03:06 jblachly

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...

rhinoman avatar Jun 24 '16 02:06 rhinoman

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

jblachly avatar Jun 24 '16 02:06 jblachly

Of course, no problem.

rhinoman avatar Jun 25 '16 02:06 rhinoman