Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
07-06-2020 04:42 PM
MATCH (h: team{ID: '0d9f723aa13d3a4b6da1a82d9c983a62'})
MATCH (t: team {ID: '077a5594f0b980e874cef0938e431263'})
MERGE (h) - [:sameAs{_类型: 'sameAs'}] -> (t);
For example, when this query didn't insert anything into the graph, it doesn't give any message. In the case above, it fails because the MATCH fails. Can it give a message to remind that this statement didn't successfully merge?
Solved! Go to Solution.
07-06-2020 08:07 PM
Result result = tx.execute( "MATCH (h:team {ID: '0d9f723aa13d3a4b6da1a82d9c983a62'})..." ) )
You can find these message in first line of result.
07-06-2020 06:09 PM
If MERGE fails, (no changes, no records) comes display.
If you succeed, you get the ’Set 1 property,...’.
Does this answer your question?
MATCH (h: team{ID: '0d9f723aa13d3a4b6da1a82d9c983a62'})
MATCH (t: team {ID: '077a5594f0b980e874cef0938e431263'})
MERGE (h) - [:sameAs{_类型: 'sameAs'}] -> (t);
MATCH (h:team {ID: '0d9f723aa13d3a4b6da1a82d9c983a62'})
MATCH (t:team {ID: '077a5594f0b980e874cef0938e431263'})
MERGE (h)-[:sameAs {_类型:'sameAs'}]->(t);
07-06-2020 07:26 PM
Yes. In the browser, it works that way. But I am executing these statements in my API code. In that case, is there a way to display any message?
07-06-2020 08:07 PM
Result result = tx.execute( "MATCH (h:team {ID: '0d9f723aa13d3a4b6da1a82d9c983a62'})..." ) )
You can find these message in first line of result.
All the sessions of the conference are now available online