incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Metin Akat <akat.me...@gmail.com>
Subject Re: Comment tree design in CouchDB?
Date Wed, 25 Nov 2009 09:27:45 GMT
Hmm, could you explain how to configure CouchDB to generate such uuids please?


On Wed, Nov 25, 2009 at 11:14 AM, Brian Candler <B.Candler@pobox.com> wrote:
> On Tue, Nov 24, 2009 at 01:48:16PM +0100, Lennart Melzer wrote:
>> Right now I can either have those documents sorted by their creation date, or hierarchically
correct, but not both.
>>
>> I don't want to use incrementing ids, since I'd like to stick with the uuids ( or
at least with ids, that do not tell anything about the ordering).
>
> CouchDB can generate time-based UUIDs, where the top part of the uuid is the
> time and the bottom part is essentially random.
>
> I think this would work very well for you:
>
> - you get documents with equal keys naturally sorted by insertion time
>
> - you don't even need to add a created_time field, since you can parse it out
>  of the uuid when you need it
>
> Regards,
>
> Brian.
>

Mime
View raw message