When I create a new document in couchDB, I want that document to have an attribute createdAt where the exact date is stored when the document was created. I can create a timestamp using JavaScript but I was wondering whether there was a function in couchDB itself that does that kind of thing for me?
When I create a new document in couchDB, I want that document to have
Share
The closest thing is to use an update handler each time you create a document. However, this will force you to use that update handler each time you create a document, and this will not catch documents that are created that bypass the update handler. (which isn’t a problem unless you are exposing the database itself directly to the user)