apoc.util.validatePredicate
Syntax |
|
||
Description |
If the given predicate is true an exception is thrown, otherwise it returns true (for use inside |
||
Arguments |
Name |
Type |
Description |
|
|
The predicate to be evaluated. |
|
|
|
The error message thrown if the predicate evaluates to |
|
|
|
Parameters to format the message with. |
|
Returns |
|
Usage Examples
The following throws an exception because the predicate is true:
MATCH (a)
WHERE apoc.util.validatePredicate(true,'message %d',[42])
RETURN a
Failed to invoke procedure |
The following returns true because the predicate is false:
RETURN apoc.util.validatePredicate(false,'message %d',[42]) AS result
result |
---|
true |