Skip to content

Commit

Permalink
Documentation nits apache#6034 (apache#6035)
Browse files Browse the repository at this point in the history
* removed full-time from example rule name and comments

* removed full-time from example rule name and comments

* Replaced "at least" with "more than" for > tests

* Adjusted text and format of not forall note

* Revert "Adjusted text and format of not forall note"

This reverts commit 1662bfb.

* Change = to == for equality tests
  • Loading branch information
JaredDavis22 authored and rgdoliveira committed Aug 6, 2024
1 parent 3b2022f commit 7f7a7bf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@ For groups of constraints, you can use a delimiting comma `,` to use implicit `a
.Example patterns with multiple constraints
[source]
----
// Person is at least 50 years old and weighs at least 80 kilograms:
// Person is more than 50 years old and weighs more than 80 kilograms:
Person( age > 50, weight > 80 )
// Person is at least 50 years old, weighs at least 80 kilograms, and is taller than 2 meters:
// Person is more than 50 years old, weighs more than 80 kilograms, and is taller than 2 meters:
Person( age > 50, weight > 80, height > 2 )
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ endif::[]
rule "All full-time employees have red ID badges"
when
forall( $emp : Employee( type == "fulltime" )
Employee( this == $emp, badgeColor = "red" ) )
Employee( this == $emp, badgeColor == "red" ) )
then
// True, all full-time employees have red ID badges.
end
Expand All @@ -174,11 +174,11 @@ To state that all facts of a given type in the working memory of the {RULE_ENGIN
.Example rule with `forall` and a single pattern
[source]
----
rule "All full-time employees have red ID badges"
rule "All employees have red ID badges"
when
forall( Employee( badgeColor = "red" ) )
forall( Employee( badgeColor == "red" ) )
then
// True, all full-time employees have red ID badges.
// True, all employees have red ID badges.
end
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1345,10 +1345,10 @@ For groups of constraints, you can use a delimiting comma `,` to use implicit `a
.Example patterns with multiple constraints
[source]
----
// Person is at least 50 years old and weighs at least 80 kilograms:
// Person is more than 50 years old and weighs more than 80 kilograms:
/persons[ age > 50, weight > 80 ]
// Person is at least 50 years old, weighs at least 80 kilograms, and is taller than 2 meters:
// Person is more than 50 years old, weighs more than 80 kilograms, and is taller than 2 meters:
/persons[ age > 50, weight > 80, height > 2 ]
----
Expand Down Expand Up @@ -2062,7 +2062,7 @@ image::language-reference/forall.png[align="center"]
rule "All full-time employees have red ID badges"
when
forall( $emp : /employees[ type == "fulltime" ]
/employees[ this == $emp, badgeColor = "red" ] )
/employees[ this == $emp, badgeColor == "red" ] )
then
// True, all full-time employees have red ID badges.
end
Expand All @@ -2075,11 +2075,11 @@ To state that all facts of a given type in the working memory of the {RULE_ENGIN
.Example rule with `forall` and a single pattern
[source]
----
rule "All full-time employees have red ID badges"
rule "All employees have red ID badges"
when
forall( /employees[ badgeColor = "red" ] )
forall( /employees[ badgeColor == "red" ] )
then
// True, all full-time employees have red ID badges.
// True, all employees have red ID badges.
end
----
Expand Down

0 comments on commit 7f7a7bf

Please sign in to comment.