This is a table showing a relationship between CouchDB view and _all_docs
query parameters start_key
, end_key
,
descending
and inclusive_end
. Obvious things to notice: 1) Start key always included 2) inclusive_end
doesn't
affect starting key 3) from A to B asc
not equal from B to A desc
.
start_key | end_key | inclusive_end | descending |
[ 1 | 2 | 3 | 4 | 5 | 6 ]
null | null | true | false | 1 ----------------> 6
null | null | true | true | 1 <---------------- 6
3 | null | true/false | false | 3 --------> 6
3 | null | true/false | true | 1 <---- 3
null | 3 | true | false | 1 ----> 3
null | 3 | true | true | 3 <-------- 6
null | 3 | false | false | 1 > 2
null | 3 | false | true | 4 <---- 6
3 | 5 | true | false | 3 ----> 5
3 | 5 | true | true | -/-
5 | 3 | true | false | -/-
5 | 3 | true | true | 3 <---- 5
3 | 5 | false | false | 3 > 4
3 | 5 | false | true | -/-
5 | 3 | false | false | -/-
5 | 3 | false | true | 4 < 5