couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Leprohon <>
Subject Re: Triggers
Date Wed, 26 May 2010 13:23:41 GMT
> Hi,
> 	I do this in my application logic, rather than in the database. e.g.  
> I just add a timestamp field before I POST/PUT the json document. You  
> could then use a validation function to check that a date was added if  
> you were really conscientious.
> Cheers
> Simon

It still depends on the user sending valid data.  If he doesn't
(because, say, he doesn't know how to change the date on his computer),
the request is invalid and rejected.  If, on the other hand, I put a
hidden field with a timestamp that comes from the server, then it's not
really a timestamp, it's the time when the form was generated by the
server (and not when it was submitted).  So it could become invalid if
the validation is too strict.

That's why I think it would be better to insert the timestamp like a


View raw message