Neo4j Cypher - String to Integer

后端 未结 3 552
臣服心动
臣服心动 2021-01-13 12:02

Here the value in property r.weight is a string. i have tried following possibilities to convert it into a integer,

INT(r.weight)
Integer.parseInt(r.weight)
         


        
3条回答
  •  广开言路
    2021-01-13 12:37

    As stated in the comments above there is no easy way to do this with Cypher in 1.9.x. As a workaround you could use the neo4j-shell and use the gsh or jsh or eval command to execute a script that iterates over all relationships and converts the value of weight property from String to numeric.

提交回复
热议问题