This is an automated email from the ASF dual-hosted git repository.
dehowef pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/age-website.git
The following commit(s) were added to refs/heads/master by this push:
new 93711a03 Update list_functions.md (#189)
93711a03 is described below
commit 93711a03f2f79025fa5f3818902729e25e3984a3
Author: Matheus Farias de Oliveira Matsumoto
<[email protected]>
AuthorDate: Tue Sep 26 11:42:59 2023 -0300
Update list_functions.md (#189)
---
docs/functions/list_functions.md | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/docs/functions/list_functions.md b/docs/functions/list_functions.md
index cb335ac2..486f58d5 100644
--- a/docs/functions/list_functions.md
+++ b/docs/functions/list_functions.md
@@ -315,3 +315,42 @@ Result:
</td>
</tr>
</table>
+
+## toBooleanList
+toBooleanList() converts a list of values and returns a list of boolean
values. If any values are not convertible to boolean they will be null in the
list returned.
+
+Syntax: `toBooleanList(list)`
+
+Returns:
+```
+An agtype list containing the converted elements; depending on the input value
a converted value is either a boolean value or null.
+```
+
+Considerations:
+* Any null element in list is preserved.
+* Any boolean value in list is preserved.
+* If the list is null, null will be returned.
+* If the list is not a list, an error will be returned.
+
+Query:
+```sql
+SELECT * FROM cypher('expr', $$
+ RETURN toBooleanList(["true", "false", "true"])
+$$) AS (toBooleanList agtype);
+```
+
+Result:
+<table>
+ <tr>
+ <td>tobooleanlist
+ </td>
+ </tr>
+ <tr>
+ <td> [true, false, true]
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3" >1 row
+ </td>
+ </tr>
+</table>