You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by "Nimra-1234 (via GitHub)" <gi...@apache.org> on 2023/08/27 13:51:57 UTC
[GitHub] [age] Nimra-1234 commented on issue #1171: Should toBoolean function convert integer to boolean?
Nimra-1234 commented on issue #1171:
URL: https://github.com/apache/age/issues/1171#issuecomment-1694674357
The **toBoolean()** function in Neo4j already has the ability to convert integers to boolean values. For **non-zero** integer numbers, the function returns true, whereas for zero, it returns false.
As you've demonstrated in the example, toBoolean() correctly returns true when you feed it the integer 1. Passing 0 would also produce a false result.
_Example:_
True is the result of toBoolean(1).
False is returned by toBoolean(0).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org