ruby on rails - Query MongoDB with length criteria -
i have several documents in mongodb collection, field 'name' (which string).
how can perform queries 7 <= name.length <= 14
you can use javascript expression.
user.where("this.name.length >= 7 && this.name.length <= 14")
Comments
Post a Comment