Commit 7ad72a1
committed
Add parenthesis on filter
When combining several filters by calling Filter() multiple times, they will be joined by "and" which is "fine".
The issues comes when there's an or in one of the filters, which will produce unexpected results.
e.g.
Filter(x => x.Foo == "some string")
Filter(x => x.Bar == 1 || x.Bar == 2 )
Should be:
"(Foo eq 'some string') and (Bar eq 1 or Bar eq 2)"
But will be:
"Foo eq 'some string' and Bar eq 1 or Bar eq 2"1 parent 0168279 commit 7ad72a1
1 file changed
Lines changed: 4 additions & 3 deletions
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
| 257 | + | |
| 258 | + | |
258 | 259 | | |
259 | | - | |
260 | | - | |
| 260 | + | |
| 261 | + | |
261 | 262 | | |
262 | 263 | | |
263 | 264 | | |
| |||
0 commit comments