Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit 07d6a6f

Browse files
committed
fix default for read_nodes, oddly this works
1 parent b6bdc54 commit 07d6a6f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

neo4j_arrow/_client.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,13 +365,16 @@ def read_edges(self, *, properties: Optional[List[str]] = None,
365365
except Exception as e:
366366
raise error.interpret(e)
367367

368-
def read_nodes(self, properties: List[str], *,
368+
def read_nodes(self, properties: List[str] = [], *,
369369
labels: List[str] = ["*"],
370370
concurrency: int = 4) -> Generator[Arrow, None, None]:
371371
"""
372-
Stream node properties for nodes of a given label.
372+
Stream node properties for nodes of a given label. Oddly, this supports
373+
streaming back just the node ids if given an empty list, unlike the
374+
behavior of the corresponding stored procedure.
373375
374-
N.b. Unlike read_edges, there's no analog to just requesting topology.
376+
N.b. Unlike read_edges, there's no analog to just requesting topology,
377+
i.e. we can't say "give me all the node ids and their labels".
375378
"""
376379
# todo: runtime validation of args so we don't send garbage
377380
if concurrency < 1:

0 commit comments

Comments
 (0)