apoc.meta.cypher.isTypeFunction
Syntax |
|
||
Description |
Returns true if the given value matches the given type. |
||
Arguments |
Name |
Type |
Description |
|
|
An object to check the type of. |
|
|
|
The verification type. |
|
Returns |
|
Check types using Cypher
Cypher can check types without the use of APOC.
Cypher syntax for checking a type
RETURN 1.0 IS :: INTEGER;
For more information, see the Cypher Manual → Type predicate expressions.
Usage Examples
The example below demonstrates how to use Cypher and APOC to test types:
- apoc.meta.cypher.isType
- Type predicate expression
apoc.meta.cypher.isType
RETURN apoc.meta.cypher.isType(1, "NODE") AS output;
Type predicate expression
RETURN 1 IS :: NODE AS output;
output |
---|
false |
- apoc.meta.cypher.isType
- Type predicate expression
apoc.meta.cypher.isType
RETURN apoc.meta.cypher.isType(datetime(), "DATE_TIME") AS output;
Type predicate expression
RETURN datetime() IS :: ZONED DATETIME AS output;
output |
---|
true |