myusuf
myusuf

Reputation: 12260

Modifiers for find queries in Sailsjs Blueprints

Going through the Sailsjs Docs for Blueprints for find where, I came across the following paragraph:

Instead of filtering based on a specific attribute, you may instead choose to provide a where parameter with a Waterline WHERE criteria object, encoded as a JSON string. This allows you to take advantage of contains, startsWith, and other sub-attribute criteria modifiers for more powerful find() queries.

e.g. ?where={"name":{"contains":"theodore"}}

Where do I find other sub-attribute criteria modifiers ?

Upvotes: 1

Views: 449

Answers (1)

Adam William Larson
Adam William Larson

Reputation: 228

I believe the section you want is Query Language Documentation Here

In there you will see all the various criteria modifiers which currently contain:

'<' / 'lessThan'
'<=' / 'lessThanOrEqual'
'>' / 'greaterThan'
'>=' / 'greaterThanOrEqual'
'!' / 'not'
'like'
'contains'
'startsWith'
'endsWith'

Upvotes: 2

Related Questions