Is all of the javascript part in mongo shell commands executed on the server or on client or is it partial?
Let's say I have a command
db.mycollection.find({timestamp:{$lt:new Date()}}).forEach(function(doc){
db.mycollection.remove(doc);
})
- Is the
new Date()
executed on the client or on server? - Is the
forEach
part executed on the client or on the server?