Hi All,
I want to know that is there is any way to create Triggers for MongoDB(local). I know that we can create Triggers for MongoDB Atlas which is a cloud service and here is the documentation link:
Thanks @Stennie_X for answering my question. Could you please be specific in Yes/No that is there is any way to write triggers in Robo 3T? We can write triggers for MongoDB Atlas only which is an cloud service, right?
Triggers are not part of the core MongoDB Server functionality. Database Triggers are implemented using the Change Streams functionality to watch a deployment for relevant changes which are then passed to a function; Scheduled Triggers are also implemented in the Atlas service.
MongoDB Atlas includes an implementation that runs as part of the cloud service, but you can also implement similar behaviour in your own application or API for a self-hosted deployment.
The Yes/No interpretation for implementing triggers for a self-hosted deployment is:
Yes: if you write code in your application or API using Change Streams and/or a scheduling service. The triggers are configured and implemented outside of Robo 3T.
No: if you do not have an application or API and are trying to do this entirely in Robo 3T.