How do I query for ranges using reactivemongo. Something equivalent to
db.collection.find( { field: { $gt: value1, $lt: value2 } } );
Thanks.
How do I query for ranges using reactivemongo. Something equivalent to
db.collection.find( { field: { $gt: value1, $lt: value2 } } );
Thanks.
Just doing this quickly and off memory but something like:
val query = BSONDocument(
"field" -> BSONDocument(
"$gt" -> value1)
.add( BSONDocument(
"$lt" -> value2 )
)
)
I'm sure there is a more elegant way to use JSON with play though.