Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/content/docs/client-apis/python.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def main() -> None:
RETURN a.name, b.name, f.since;
"""
)
while response.has_next():
print(response.get_next())
for row in response:
print(row)
```

</TabItem>
Expand Down Expand Up @@ -90,8 +90,8 @@ async def copy_data(conn: kuzu.AsyncConnection) -> None:

async def query_1(conn: kuzu.AsyncConnection) -> None:
result = await conn.execute("MATCH (u:User)-[:LivesIn]->(c:City) RETURN u.*")
while result.has_next():
print(result.get_next())
for row in response:
print(row)

async def main():
await create_tables(conn)
Expand Down Expand Up @@ -146,10 +146,10 @@ return a list of `QueryResult` objects.

You can loop through each result of a `QueryResult` object and get its contents.
```python
response = conn.execute("RETURN 1; RETURN 2; RETURN 3")
for row in response:
while row.has_next():
print(row.get_next())
responses = conn.execute("RETURN 1; RETURN 2; RETURN 3")
for response in responses:
for row in response:
print(row)
```
This returns:
```
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/cypher/query-clauses/load-from.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ json_str = '[{"name": "Rebecca", "age": 25}, {"name": "Gregory", "age": 30}, {"n

result = conn.execute("RETURN json_structure($obj) AS json_obj", {"obj": json_str})

while result.has_next():
print(result.get_next())
for row in response:
print(row)
```

```
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/get-started/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def main() -> None:
RETURN a.name, b.name, f.since;
"""
)
while response.has_next():
print(response.get_next())
for row in response:
print(row)
```

Result:
Expand Down