Like said in the title, im trying to get all docs in a specific time range. I have documents in my database with a timestamp stored. I was looking for something like here Querying CouchDB documents between a start date and an end date but i didnt really get it working for me, i also use nano for nodejs and i dont know how to write something like
?startkey="1970-01-01T00:00:00Z"&endkey="1971-01-01T00:00:00Z"
in nano syntax. I was looking for something here https://www.npmjs.com/package/nano#dbviewdesignname-viewname-params-callback but i couldnt find something similair.
You can use
/db/_findwith a selector that uses operators$gteand$lt(or$lte) described in the chapter Condition Operators of the CouchDB API Reference.With nano
db.find, this could look as follows: