BBQing commented on code in PR #52990:
URL: https://github.com/apache/airflow/pull/52990#discussion_r2192366375
##########
providers/neo4j/src/airflow/providers/neo4j/hooks/neo4j.py:
##########
@@ -113,19 +115,20 @@ def get_uri(self, conn: Connection) -> str:
return f"{scheme}{encryption_scheme}://{conn.host}:{7687 if conn.port
is None else conn.port}"
- def run(self, query) -> list[Any]:
+ def run(self, query, parameters) -> list[Any]:
"""
Create a neo4j session and execute the query in the session.
:param query: Neo4j query
+ :param parameters: Optional parameters for the query
:return: Result
"""
driver = self.get_conn()
if not self.connection.schema:
Review Comment:
Maybe let's change this part to look like this:
```python
session_parameters = {}
if db := self.connection.schema:
session_parameters["database"]=db
with drive.session(**session_parameters) as session:
...
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]