Skip to content

Commit df75a2a

Browse files
committed
Clarify positional parameters
1 parent de70f9a commit df75a2a

File tree

5 files changed

+13
-15
lines changed

5 files changed

+13
-15
lines changed

graphdatascience/graph/graph_cypher_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def project(
4646
GraphCypherRunner._verify_query_ends_with_return_clause(self._namespace, query)
4747

4848
result: Optional[dict[str, Any]] = self._query_runner.run_retryable_cypher(
49-
query, params, database, False
49+
query, params, database, custom_error=False
5050
).squeeze()
5151

5252
if not result:

graphdatascience/graph/graph_entity_ops_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def _process_result(
164164
unique_node_ids = result["nodeId"].drop_duplicates().tolist()
165165

166166
db_properties_df = query_runner.run_retryable_cypher(
167-
GraphNodePropertiesRunner._build_query(db_node_properties), {"ids": unique_node_ids}
167+
GraphNodePropertiesRunner._build_query(db_node_properties), params={"ids": unique_node_ids}
168168
)
169169

170170
if "propertyValue" not in result.keys():

graphdatascience/query_runner/cypher_graph_constructor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ def graph_construct_error_multidf(element: str) -> str:
104104

105105
def _should_warn_about_arrow_missing(self) -> bool:
106106
try:
107-
# TOOD use execute_query
108-
license: str = self._query_runner.run_cypher(
107+
license: str = self._query_runner.run_retryable_cypher(
109108
"CALL gds.debug.sysInfo() YIELD key, value WHERE key = 'gdsEdition' RETURN value", custom_error=False
110109
).squeeze()
111110
should_warn = license == "Licensed"

graphdatascience/query_runner/neo4j_query_runner.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def __init__(
150150
def __run_cypher_simplified_for_query_progress_logger(self, query: str, database: Optional[str]) -> DataFrame:
151151
# progress logging should not retry a lot as it perodically fetches the latest progress anyway
152152
connectivity_retry_config = Neo4jQueryRunner.ConnectivityRetriesConfig(max_retries=2)
153-
# not using execute_query as failing is okay
153+
# not using retryable cypher as failing is okay
154154
return self.run_cypher(query=query, database=database, connectivity_retry_config=connectivity_retry_config)
155155

156156
# only use for user defined queries
@@ -355,15 +355,15 @@ def clone(self, host: str, port: int) -> QueryRunner:
355355
driver = neo4j.GraphDatabase.driver(endpoint, auth=self._auth, **self.driver_config())
356356

357357
return Neo4jQueryRunner(
358-
driver,
359-
self._protocol,
360-
self._auth,
361-
self._config,
362-
self._database,
363-
self._auto_close,
364-
self._bookmarks,
365-
self._show_progress,
366-
self._instance_description,
358+
driver=driver,
359+
protocol=self._protocol,
360+
auth=self._auth,
361+
config=self._config,
362+
database=self._database,
363+
auto_close=self._auto_close,
364+
bookmarks=self._bookmarks,
365+
show_progress=self._show_progress,
366+
instance_description=self._instance_description,
367367
)
368368

369369
@staticmethod

graphdatascience/query_runner/protocol/write_protocols.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ def write_fn() -> DataFrame:
160160
parameters,
161161
yields,
162162
retryable=True,
163-
database=None,
164163
logging=False,
165164
custom_error=False,
166165
)

0 commit comments

Comments
 (0)