Skip to content

Commit d60aa8e

Browse files
Copilotxperiandri
andauthored
Tighten ObjectListFilter README wording
Co-authored-by: xperiandri <2365592+xperiandri@users.noreply.github.com>
1 parent 8fc6eb5 commit d60aa8e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,10 +399,10 @@ query TestQuery {
399399

400400
This filter is mapped by the middleware into the `ObjectListFilter` discriminated union, with cases such as `And`, `Or`, `Not`, `Equals`, `GreaterThan`, `GreaterThanOrEqual`, `LessThan`, `LessThanOrEqual`, `In`, `StartsWith`, `EndsWith`, `Contains`, `OfTypes`, and `FilterField`.
401401

402-
- `Equals`, `StartsWith`, `EndsWith`, and `Contains` now carry a comparer in the public discriminated union.
402+
- The cases `Equals`, `StartsWith`, `EndsWith`, and `Contains` accept a comparer parameter in the public discriminated union.
403403
- `Equals` and `Contains` keep the non-generic `System.Collections.IComparer` because they also support non-string comparable values in the public discriminated union.
404404
- When the filtered field is a string and you construct the DU cases directly, pass a `StringComparer` instance in that comparer slot. `StringComparer` is accepted there because it also implements `System.Collections.IComparer`. Use `StringComparer.Ordinal` for case-sensitive matching and `StringComparer.OrdinalIgnoreCase` for case-insensitive matching.
405-
- The built-in case-sensitive operators (`===`, `=@@`, `@@=`, `@=@`) still use the default comparer behavior for you.
405+
- The built-in case-sensitive operators (`===`, `=@@`, `@@=`, `@=@`) use the default comparer behavior.
406406
- `Contains` is also used for collection membership checks, so the wrapped value type inside `FieldFilter<_>` stays `System.IComparable` instead of being limited to `string`.
407407
- If you were previously constructing `Equals`, `StartsWith`, `EndsWith`, or `Contains` directly, update those call sites to provide the comparer argument explicitly.
408408

0 commit comments

Comments
 (0)