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

Popular posts from this blog

forms - Secure PHP File Upload Script -

c# - Regex Problems, extracting data to groups -

silverlight - SL4 - TextTrimming in DataGridRowGroupHeader -