File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -138,12 +138,29 @@ node2 = @neo.create_node("age" => 33, "name" => "Roel")
138
138
@neo .add_node_to_index(" people" , " name" , " max" , node1)
139
139
@neo .get_node_index(" people" , " name" , " max" )
140
140
141
- # Cypher queries:
142
- @neo .execute_query(" start n=node(0) return n" )
143
-
144
141
# Batches:
145
142
@neo .batch [:create_node , {" name" => " Max" }],
146
143
[:create_node , {" name" => " Marc" }]
144
+
145
+ # Cypher queries:
146
+ @neo .execute_query(" start n=node(0) return n" )
147
+
148
+ ```
149
+
150
+ You can also use the [ cypher gem] ( https://github.com/andreasronge/neo4j-cypher ) instead of writing cypher as text.
151
+
152
+
153
+ ```
154
+ node(1).outgoing(rel(:friends).where{|r| r[:since] == 1994})
155
+ ```
156
+
157
+ would become:
158
+
159
+ ```
160
+ START me=node(1)
161
+ MATCH (me)-[friend_rel:`friends`]->(friends)
162
+ WHERE (friend_rel.since = 1994)
163
+ RETURN friends
147
164
```
148
165
149
166
This is just a small sample of the full API, see the [ Wiki documentation] ( https://github.com/maxdemarzi/neography/wiki ) for the full API.
You can’t perform that action at this time.
0 commit comments