couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laura Hamel <>
Subject Re: automatic timestamps
Date Thu, 10 Jun 2010 18:52:13 GMT
Thank you!  That clarifies a lot.


On 6/10/2010 10:35 AM, J Chris Anderson wrote:
> On Jun 10, 2010, at 7:34 AM, Laura Hamel wrote:
>> Hey Couch-Users!
>> How do you guys handle timestamping documents?
>> I have seen some advice to generate the timestamps in the application.  However,
this has the drawback that multiple applications touching the same database may generate inconsistent
timestamps.  Validation might be able to reject updates when applications submit timestamps
which are too un-synchronized, but this seems like a weird way to solve the problem.  I found
the documentation on using Document Update Handlers (
however these have to be triggered separately.  I'm also not clear on how to trigger that
update through jcouchdb.
>> Is there a way to trigger the timestamp to be added automatically when the document
is created?
> The document update handler is the proper way to do this. We can't have hooks on document
create or update, because then the timestamp would get changed every time the doc is replicated,
as replication is just another client.
> Chris
>> Thanks,
>> Laura
>> -- 
>> Laura Hamel
>> Software Engineer
>> Soar Technology

Laura Hamel
Software Engineer
Soar Technology
734-327-8000 x228

View raw message