Couchdb 2.0 /db/_find total rows count for pagination
Asked Answered
T

0

7

I post request (use python requests lib) with json data:

    json_data = {
     "selector": {
        "year": {"$gt": 2010}
     },
     "fields": ["_id", "_rev", "year", "title"],
     "sort": [{"year": "asc"}],
     "limit": 10,
     "skip": 10
    }

    r = requests.post('http://127.0.0.1:5984/docs/_find',
                           json=json_data)

The response does not have total_rows. I need total rows for pagination. How I get this?

Tsarevna answered 5/12, 2016 at 16:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.