In Apache AGE, the data type of a Cypher query outcome can be determined using the RETURN TYPE
clause in the Cypher query. The RETURN TYPE
clause can be used to specify the expected data type of a particular query output column. For example, to specify that the output of a particular column is expected to be of type string
, we can use the following Cypher query:
MATCH (n:Person)
RETURN n.name AS name:STRING
In this query, we are matching all nodes labeled Person
and returning the name
property of these nodes, which we have explicitly specified as being of type STRING
. This allows us to ensure that the data type of the query outcome is consistent with our expectations, which can be particularly important when performing data analysis or integrating with external systems.
Asked: 2021-05-03 11:00:00 +0000
Seen: 2 times
Last updated: Mar 09 '23