title: Call stored function in mongodb
body: <p>I'm getting some difficulties to call a stored function within mongdb.
  I'm a little bit newbie with mongo.</p>
  
  <p>[EDIT] : my function stored in mongodb</p>
  
  <pre><code>function() {
      var cndTime = new Date().getTime() - (3600*1000*24*2); // condition
       db.urls.find(needParse: false).forEach(function(item){
          if(item.date &lt; cndTime)  // check
              db.urls.update({_id: item._id}, {$set: { needParse: true }}); // update field
       });
  }
  </code></pre>
  
  <p>All I'm asking is how to invoke this function using reactivemongo or native API.</p>