incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Blair Nilsson <blair.nils...@gmail.com>
Subject Re: startkey/endkey and descending=true
Date Thu, 18 Jun 2009 00:04:42 GMT
I shouldn't drink so much coffee before posting, some of that didn't
make too much sense.

take the keys
["a",1]
["a",2]
["a",3]
["b",1]
["b",3]
["b",5]

startkey=["a"]&endkey=["b"]
will give you all of the keys starting with ["a"]

Any key after ["a",3] and before ["b",1] can be used.
{} is after any number, string or array (I think), so is very useful
to use as part of a key describing a range.

startkey=["a"]&endkey=["a",{}] should give you anything under ["a"],
since it is the range containing going form the first to last possible
key for anything under ["a"]

What that means when you use descending=true, you will need to start
with ["a",{}] and end with ["a"]

Hopefully, this will make more sense, and that I have will remember to
read my posts before I post them :)

Sorry for the hurried post before.

--- Blair

Mime
View raw message