-
Notifications
You must be signed in to change notification settings - Fork 4
Conversation
@@ -0,0 +1,21 @@ | |||
# $schema: ../schema.json | |||
name: $case | |||
link: 'https://www.mongodb.com/docs/manual/reference/operator/aggregation/switch/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the interest of creating this "fake" operator for code generation. It should be consistent with OutputWindow
this is the same need.
Could you create accumulator/outputWindow.yaml
also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do so in a separate PR: the current OutputWindow
type contains additional validation logic that we can't represent through the config.
9804f17
to
745eef4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switch stage is also in $convert
, $isNumber
and $toBool
operator tests.
Updated |
0fef6aa
to
a80cdf7
Compare
PHPLIB-1273
Instead of using
object
, there is now a dedicatedcase
operator. In order to accommodate the different encoding forcase
, I added aflat_object
encoding mechanism that doesn't wrap the parameter object in another object containing the operator name. Alternatively, we could create a separate encoder forcase
.