incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sleepnova <wanpee...@gmail.com>
Subject Re: About _id generation rule
Date Sun, 20 Feb 2011 19:48:35 GMT
Ha, I know the host uuids request trick.
But it doesn't solve my problem, I need to generate it offline.
Right now I use Java API to generate UUID and strip all "-" in it to
make it looks like an _id generated by CouchDB.
But I wonder if this approach is good enough, or there are some better
way to make my _id more appropriate.
Because I don't know if Couch plays any trick on the auto generated
_id that could make some different to the internal storage.

2011/2/21 Bill Barry <bill@billbarry.org>:
> On Sun, Feb 20, 2011 at 11:19 AM, sleepnova <wanpeebaw@gmail.com> wrote:
>
>> Hi,
>>
>> Does any one know what is the CouchDB _id generation rule?
>> I'd like to generate it from my client.
>>
>>
> Not to directly answer your question because I don't know how CouchDB
> generates the UUIDs, but any UUID generator should work. You can also
> request them from the host using a GET to /_uuids  or if you want 10 of
> them   /_uuids?count=10
>
> Bill
>

-- 
- sleepnova

Mime
View raw message