I want to record the time when a new field is added to the document in CouchDB using Python. I have to put a time stamp on every new field and show this time with the respective id of the field on an Html page. Thanks in advance.
Asked
Active
Viewed 79 times
0
-
Does this answer your question? [CouchDb automatic timestamps](https://stackoverflow.com/questions/3009925/couchdb-automatic-timestamps) – Jonathan Hall Feb 29 '20 at 22:33
1 Answers
1
If clients send directly to the couchdb then your best bet is to modify them to use an update function and have the update function write timestamps for each normal field. You could also use a validate function to prevent changing them and to verify that they exist and are roughly correct.
Since validate and update designs are independent, I don't think you can prevent a clever user from still writing misleading information by bypassing the update function. The design document functions also probably need to be written in JavaScript as the default and most complete Query Server is the JavaScript one.

lossleader
- 13,182
- 2
- 31
- 45