apoc.meta.cypher.type
Function APOC Core
apoc.meta.cypher.type(value) - type name of a value (INTEGER,FLOAT,STRING,BOOLEAN,RELATIONSHIP,NODE,PATH,NULL,MAP,LIST OF <TYPE>,POINT,DATE,DATE_TIME,LOCAL_TIME,LOCAL_DATE_TIME,TIME,DURATION)
Usage Examples
RETURN apoc.meta.cypher.type(1) AS output;
output |
---|
"INTEGER" |
RETURN apoc.meta.cypher.type("Michael") AS output;
output |
---|
"STRING" |
RETURN apoc.meta.cypher.type(true) AS output;
output |
---|
"BOOLEAN" |
RETURN apoc.meta.cypher.type(datetime()) AS output;
output |
---|
"DATE_TIME" |
RETURN apoc.meta.cypher.type(["Neo4j", 2020]) AS output;
output |
---|
"LIST OF ANY" |
RETURN apoc.meta.cypher.type(["Neo4j", "Bloom"]) AS output;
output |
---|
"LIST OF STRING" |
CREATE (node1:Person)-[rel:FRIENDS]->(node2:Person)
RETURN apoc.meta.cypher.type(node1) AS node1Type,
apoc.meta.cypher.type(rel) AS relType,
apoc.meta.cypher.type(node2) AS node2Type;
node1Type | relType | node2Type |
---|---|---|
"NODE" |
"RELATIONSHIP" |
"NODE" |