If I have a set of nodes with the same attributes in Neo4j, is there a way to convert the type of a certain attribute from string to int (or vice versa) for all of those nodes?
The function coalesce() returns the first non- null value in the given list of expressions. Syntax: coalesce(expression [, expression]*) Returns: The type of the value returned will be that of the first non- null expression.
You can change the nodes associated with a label but you can't change the type of a relationship. Conceptually, if you take your chicken out of one coop and put it in another you haven't altered the substance of the chicken.
UNWIND expands a list into a sequence of rows.
In Neo4j to create relationship between nodes you have to use the CREATE statement like we used to create nodes. lets create relation between two already created nodes.
How about
MATCH (n:Type)
WHERE <filter if required>
SET n.strProp = toInt(n.strProp)
and
MATCH (n:Type)
WHERE <filter if required>
SET n.intProp = toString(n.intProp)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With