Neo4J create temp variable within Cypher

后端 未结 2 1221
名媛妹妹
名媛妹妹 2021-01-18 17:23

So my Top-Level problem is I am trying to return whether a MERGE resulted in the creation of a new Node or not.

In order to do this I was thinking I cou

2条回答
  •  醉梦人生
    2021-01-18 18:10

    In simple merging cases like this where maximum one node could be created, a cleaner way to achieve what you are looking for could be checking the result stats. I case of using Bolt API you should check:

    results.consume().counters.nodes_created = 1
    

提交回复
热议问题