Maybe a document update handler is what you're looking for?

http://wiki.apache.org/couchdb/Document_Update_Handlers

Nils.
________________________________________
Van: Guillaume Leprohon [[email protected]]
Verzonden: woensdag 26 mei 2010 15:04
Aan: [email protected]
Onderwerp: Triggers

Hi!

I'm trying to find a way to insert a timestamp field with every
insert/update.  Because I can't rely on the user to provide valid data,
this information would have to be inserted while processing the request
on the server side (just like the _rev field).  In MySQL, I'm doing it
with triggers (before insert / before update), but (unless I'm missing
something), there is nothing that compares with triggers in CouchDB.
And since validation functions are side-effect free, I can't use those
to do it.  Any idea?

Thanks,

Guillaume Leprohon


De informatie vervat in deze  e-mail en meegezonden bijlagen is uitsluitend 
bedoeld voor gebruik door de geadresseerde en kan vertrouwelijke informatie 
bevatten. Openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking 
van deze informatie aan derden is voorbehouden aan geadresseerde. De VPRO staat 
niet in voor de juiste en volledige overbrenging van de inhoud van een 
verzonden e-mail, noch voor tijdige ontvangst daarvan.

Reply via email to