Skip to content Skip to sidebar Skip to footer

Generate (query) String From "where" Object In Waterline.js

Using waterline.js in sails.js (0.10.5): I would like to create a 'where' string out of a where option object. For example, I have: where = { updatedAt:{'>':'2015-01-08T10:00:

Solution 1:

You can do date range queries using the comparison operators.

Model.find({ date: { '>': new Date('2/4/2014'), '<': new Date('2/7/2014') } })

Post a Comment for "Generate (query) String From "where" Object In Waterline.js"