July 2015
Intermediate to advanced
184 pages
4h 2m
English
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:
StructuredNode.cypher(query,params) functionneomodel.db.cypher_query(query, params) functionIn 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 Male class:
def getAllMaleFriends(self): ...
Read now
Unlock full access