Just discovered Graph and Neo4j a couple of days ago and I must say I really like what it has to offer. I'm still tinkering around still, and now I wonder how I would proceed with conditions inside queries.
In the below code, how would I delete the relationship in the same query if the quantity is set to 0?
I have a hard time understanding the syntax of the conditionals inside Cypher.
result = session.run(
f'MATCH (order:Order {{ ref: "SomeOrder" }})<-[rel:IN_ORDER]-(product:Product {{ name: "SomeProduct" }}) '
f'SET rel += {{ quantity: 0 }} '
f'WITH order '
f'MATCH (order)<-[r:IN_ORDER]-(p:Product) '
f'RETURN order, p.name, p.price * r.quantity AS total_unit_price '
)