October 2017
Beginner to intermediate
316 pages
8h
English
Let's use the towers again, should we want to know if they host a restaurant or not. A yes/no field is a perfect fit for a Boolean property. We shall call this query, assuming it is a waste to build a tower and not fit a restaurant in it. We do this as follows:
MATCH (n:Tower) SET n.hasRestaurant = toBoolean("true")RETURN n
Notice the conversion to a Boolean value that then allows shortening of the queries:
MATCH (n:Tower) WHERE n.hasRestaurant RETURN n
Read now
Unlock full access