Skip to content

Commit

Permalink
update query tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
radex committed Jun 29, 2020
1 parent c809839 commit fabe503
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tutorials/Query Examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,15 @@ var results = coll.find({
});
```

**$$eq, $$eq, etc.** - many filters support column comparisons - comparing one column in a document
with another (instead of between column and value):
```javascript
// fetch documents where foo > bar
var results = coll.find({{ foo: { $$gt: 'bar' } }})

// instead of passing second column name, you can pass a function that computes value to compare against
var results = coll.find({{ foo: { $$lt: doc => doc.bar + 1 } }})
```
### Features which support 'find' queries
These operators can be used to compose find filter objects which can be used within :
* Collection find()
Expand Down

0 comments on commit fabe503

Please sign in to comment.