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

delphi - TJvHidDeviceController "DevicePath" always showing "\" -

Disabling Android home button for industry application -

c# - HwndSource win32 integration with Ribbons and KeyTips -