You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -115,32 +115,31 @@ print("Graph created successfully!")
115
115
```python
116
116
# Find all friends of Alice
117
117
query ="""
118
-
119
-
date and time as they are right now can be confusing, either use Python to create timestamps from actual dates or consider changing the attribute to something else which doesn't require time / date datatype
120
-
121
-
MATCH (alice:User {name: "Alice"})-[:FRIENDS_WITH]->(friend)
118
+
MATCH (alice:User {name: 'Alice'})-[:FRIENDS_WITH]->(friend)
122
119
RETURN friend.name AS Friend
123
120
"""
124
-
result = graph.ro_query(query)
121
+
122
+
result = graph.ro_query(query).result_set
125
123
126
124
print("Alice's friends:")
127
125
for record in result:
128
-
print(record["Friend"])
126
+
print(record[0])
129
127
```
130
128
131
129
#### Query Relationships
132
130
133
131
```python
134
132
# Find posts created by Bob
135
133
query ="""
136
-
MATCH (bob:User {name: "Bob"})-[:CREATED]->(post:Post)
134
+
MATCH (bob:User {name: 'Bob'})-[:CREATED]->(post:Post)
0 commit comments