Query builder for accepting URL query parameters into your MongoDB queries. Safe and feature rich. Supports most of MongoDB's query operators such as $eq, $gt, $lt, $ne, $in, $nin, $exists, $regex, geospatial queries such as bbox and near, as well as your own custom query business logic!
thanks a lot for your effort on this library - extremely useful!
I'm having a problem, though, when using it to parse query params sent to a hapijs server and trying to specify a range of values for a parameter, such as:
url?count=>10&count=<100
parsed query comes out as:
count: { '$in': [ '>10', '<100' ] } }
The expected result would, naturally, be:
count: {$gt: 10, $lt: 100}
Do you have any suggestions on how to work around this, or is this something you would consider supporting?
Hi,
thanks a lot for your effort on this library - extremely useful!
I'm having a problem, though, when using it to parse query params sent to a hapijs server and trying to specify a range of values for a parameter, such as:
url?count=>10&count=<100
parsed query comes out as:
count: { '$in': [ '>10', '<100' ] } }
The expected result would, naturally, be:
count: {$gt: 10, $lt: 100}
Do you have any suggestions on how to work around this, or is this something you would consider supporting?
Thanks!