Skip to content

DOCS-1824: Comment on: manual/reference/aggregation/operator-conditional... #1244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/includes/ref-toc-aggregation-conditional.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: :expression:`$cond`
file: /reference/aggregation/cond
description: Evaluates a an expression and returns a boolean.
description: A ternary operator that evaluates one expression, and depending on the result returns the value one of two expressions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is pretty vague, but judging by the $ifnull below it I guess they are supposed to be?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are just quick descriptions to provide navigational assistance. The scope is fine, and consistent with other similar items throughout the docs.

---
name: :expression:`$ifNull`
file: /reference/aggregation/ifNull
description: Evaluates an expression and returns a value.
...
...
12 changes: 7 additions & 5 deletions source/reference/aggregation/cond.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ $cond (aggregation)

{ $cond: [ <boolean-expression>, <true-case>, <false-case> ] }

Takes an array with three expressions, where the first expression
evaluates to a Boolean value. If the first expression evaluates to true,
:expression:`$cond` returns the value of the second expression. If the
first expression evaluates to false, :expression:`$cond` evaluates and
returns the third expression.
:expression:`$cond` is a ternary operator that takes an array of
three expressions, where the first expression evaluates to a Boolean
value. If the first evaluates to ``true``, :expression:`$cond`
evaluates and returns the value of the second expression. If the
first expression evaluates to ``false``, :expression:`$cond`
evaluates and returns the third expression.