In this section, we will talk about executing the raw Cypher queries to handle complex requirements and then further converting them into a model and presenting it to the end user.
Cypher queries can be executed by the following two ways:
In the first option, the query definition needs to be defined within the domain class itself and then it uses
StructuredNode.inflate() for creating domain objects from the raw Cypher results.
For example, let's assume that we need to retrieve and print all the male friends of a given node. So we will modify our
Model.py and add the following method in the
def getAllMaleFriends(self): ...