node.js - Find records where modulo is greater than some number -


in mongodb can find records field%x=y :

db.collection.find({  field: {   $mod: [x, y]  } }) 

i need $mod greater y. i've tried this:

db.collection.find({  field: {   $mod: [x, {    $gt: y   }]  } }) 

but no effects. how can find records? ideas?

regards, mateusz

from v2.4 mongodb changed javascript engine v8, promissing better performance , concurrency.

http://docs.mongodb.org/manual/release-notes/2.4-javascript/

i think $where operator quite appropriate unless "x" fixed in app. static "x" might worth having precomputed field {field % x}


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -