couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ayende Rahien" <aye...@ayende.com>
Subject Re: Sorting views with composite keys
Date Sun, 05 Oct 2008 18:35:41 GMT
How does querying those works?I mean, the keys wouldn't match, would they?

On Sun, Oct 5, 2008 at 8:26 PM, Chris Anderson <jchris@apache.org> wrote:

> Jan posted this to the IRC channel.
>
> http://friendpaste.com/rc9CcxUW
>
> I supposed you'd have to write a reverse method for each JS primitive
> type, if you wanted to be completely flexible.
>
>
> On Sun, Oct 5, 2008 at 9:25 AM, Nick Johnson <arachnid@notdot.net> wrote:
> > How would I construct a view with two keys, a and b, sorted first by a
> > ascending, then by b descending? Composite keys are easy enough to
> generate,
> > but the key [a,b] would only permit sorting both in ascending order (or
> both
> > in descending order, if we scan in reverse). Can anyone suggest a way of
> > modifying the keys to support heterogenous sort orders like this? My best
> > idea so far is a monstrosity involving hex-encoded binary data. :)
> >
>
>
>
> --
> Chris Anderson
> http://jchris.mfdz.com
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message