You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by "WendelLana (via GitHub)" <gi...@apache.org> on 2023/08/22 15:04:56 UTC

[GitHub] [age] WendelLana opened a new issue, #1171: should toBoolean convert integer to boolean?

WendelLana opened a new issue, #1171:
URL: https://github.com/apache/age/issues/1171

   ### Description
   In Neo4j the function `toBoolean()` converts a string, integer or boolean value to a boolean value. Given this, should we also incorporate the ability to convert integers to boolean within our own function?
   
   If so, I'll take the initiative to develop this feature and also implement it into the `toBooleanList()` function.
   
   ### Example
   Query
   ```
   SELECT * FROM cypher('expr', $$
       RETURN toBoolean(1)
   $$) AS (toBoolean agtype);
   ```
   Result
   ```
    toboolean 
   -----------
    true
   ```


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Should toBoolean function convert integer to boolean? [age]

Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on issue #1171:
URL: https://github.com/apache/age/issues/1171#issuecomment-2062484562

   @WendelLana If this is resolved, please close the issue :)


-- 
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


Re: [I] Should toBoolean function convert integer to boolean? [age]

Posted by "WendelLana (via GitHub)" <gi...@apache.org>.
WendelLana closed issue #1171: Should toBoolean function convert integer to boolean?
URL: https://github.com/apache/age/issues/1171


-- 
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


[GitHub] [age] Nimra-1234 commented on issue #1171: Should toBoolean function convert integer to boolean?

Posted by "Nimra-1234 (via GitHub)" <gi...@apache.org>.
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