@@ -315,8 +315,8 @@ def query(self, q: str, data_binding=None, single_row=False, single_cell="", sin
315315
316316
317317
318- def query_extended (self , q : str , params = None , flatten = False , fields_to_exclude = None ) -> [dict ]:
319- """ # TODO: rename params to data_binding
318+ def query_extended (self , q : str , data_binding = None , flatten = False , fields_to_exclude = None ) -> [dict ]:
319+ """
320320 Extended version of query(), meant to extract additional info
321321 for queries that return Graph Data Types,
322322 i.e. nodes, relationships or paths,
@@ -336,7 +336,7 @@ def query_extended(self, q: str, params = None, flatten = False, fields_to_exclu
336336 Try running with flatten=True "MATCH (b:boat), (c:car) RETURN b, c" on data like "CREATE (b:boat), (c1:car1), (c2:car2)"
337337
338338 :param q: A Cypher query
339- :param params : An optional Cypher dictionary
339+ :param data_binding : An optional Cypher dictionary
340340 EXAMPLE, assuming that the cypher string contains the substring "$age":
341341 {'age': 20}
342342 :param flatten: Flag indicating whether the Graph Data Types need to remain clustered by record,
@@ -358,9 +358,9 @@ def query_extended(self, q: str, params = None, flatten = False, fields_to_exclu
358358 """
359359 # Start a new session, use it, and then immediately close it
360360 with self .driver .session () as new_session :
361- result = new_session .run (q , params )
361+ result = new_session .run (q , data_binding )
362362 if self .profiling :
363- print ("-- query_extended() PROFILING ----------\n " , q , "\n " , params )
363+ print ("-- query_extended() PROFILING ----------\n " , q , "\n " , data_binding )
364364
365365 # Note: A neo4j.Result iterable object (printing it, shows an object of type "neo4j.work.result.Result")
366366 # See https://neo4j.com/docs/api/python-driver/current/api.html#neo4j.Result
@@ -2213,7 +2213,7 @@ def get_siblings(self, internal_id: int, rel_name: str, rel_dir="OUT") -> [int]:
22132213 raise Exception (f"get_siblings(): unknown value for the `rel_dir` argument ({ rel_dir } ); "
22142214 f"allowed values are 'IN' and 'OUT'" )
22152215
2216- result = self .query_extended (q , params = {"internal_id" : internal_id }, flatten = True )
2216+ result = self .query_extended (q , data_binding = {"internal_id" : internal_id }, flatten = True )
22172217 return result
22182218
22192219
@@ -2258,9 +2258,9 @@ def get_label_properties(self, label:str) -> list:
22582258 RETURN DISTINCT propertyName
22592259 ORDER BY propertyName
22602260 """
2261- params = {'label' : label }
2261+ data_binding = {'label' : label }
22622262
2263- return [res ['propertyName' ] for res in self .query (q , params )]
2263+ return [res ['propertyName' ] for res in self .query (q , data_binding )]
22642264
22652265
22662266
0 commit comments