In MongoDB, you can create an index to delete a document by time (TTL). Is there such a tool to update the document. Or its creation. The task is to update some fields in it after a certain time after creating a document. Thank!
1 answer
This task in relational databases is solved by triggers. In MongoDB, there is no such functionality.
There are so-called Tailable Cursors with which you can create similar functionality.
Some JavaScript implementations:
- https://github.com/afharo/mongo-trigger
- https://github.com/iddogino/mongoTriggers (without tailable cursors, but the idea is the same)
|