The Filter builder And and Or methods should handle empty lists of clauses by rendering them to $and and $or operators with empty arrays:
builder.And() => "{ $and : [ ] }" builder.Or() => "{ $or : [ ] }"
It is not really obvious what semantics And and Or should have when the list of clauses is empty. By rendering them this way we leave it up to the server to decide. The server currently returns error messages for both of these, but it might conceivably support them in the future.
- is related to
-
CSHARP-1986 And with zero clauses renders as { $and : [] }
- Closed
-
CSHARP-1912 Filter builder.And(<emptyFilter>,<emptyFilter>) renders incorrectly
- Closed