From 897bb5bf798e67a852efa24ebfb1b5caeec6f493 Mon Sep 17 00:00:00 2001 From: David Oliver Date: Tue, 22 Nov 2022 15:36:52 +0000 Subject: [PATCH] Update explanation for predicate functions when used with null values --- modules/ROOT/pages/functions/predicate.adoc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/ROOT/pages/functions/predicate.adoc b/modules/ROOT/pages/functions/predicate.adoc index 3254355c1..ff8f713d6 100644 --- a/modules/ROOT/pages/functions/predicate.adoc +++ b/modules/ROOT/pages/functions/predicate.adoc @@ -41,7 +41,8 @@ CREATE == all() The function `all()` returns `true` if the predicate holds for all elements in the given list. -`null` is returned if the list is `null` or all of its elements are `null`. + +`null` is returned if the list is `null` or if the predicate evaluates to `null` for at least one element and does not evaluate to `false` for any other element. *Syntax:* @@ -113,7 +114,8 @@ All nodes in the returned paths will have a property `age` with a value larger t == any() The function `any()` returns `true` if the predicate holds for at least one element in the given list. -`null` is returned if the list is `null` or all of its elements are `null`. + +`null` is returned if the list is `null`, or if the predicate evaluates to `null` for at least one element and does not evaluate to `true` for any other element. *Syntax:* @@ -429,7 +431,8 @@ Thus, `isEmpty()` is not suited to test for `null`-values. == none() The function `none()` returns `true` if the predicate does _not_ hold for any element in the given list. -`null` is returned if the list is `null` or all of its elements are `null`. + +`null` is returned if the list is `null`, or if the predicate evaluates to `null` for at least one element and does not evaluate to `true` for any other element. *Syntax:* @@ -499,7 +502,8 @@ No node in the returned paths has a property `age` with the value `25`. == single() The function `single()` returns `true` if the predicate holds for exactly _one_ of the elements in the given list. -`null` is returned if the list is `null` or all of its elements are `null`. + +`null` is returned if the list is `null`, or if the predicate evaluates to `null` for at least one element and `true` for max one element. *Syntax:* @@ -558,4 +562,3 @@ In every returned path there is exactly one node that has a property `eyes` with |=== ====== -