Skip to content

Commit 74b9586

Browse files
authored
Adding getting started example in Shell (#135)
Adding getting started example in Shell
1 parent 1ce7847 commit 74b9586

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

index.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,31 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
206206
}
207207
{% endcapture %}
208208

209-
{% include code_tabs.html id="code_tabs_0" python=python_code javascript=javascript_code java=java_code rust=rust_code %}
209+
{% capture shell_code %}
210+
$ redis-cli -h localhost -p 6379
211+
212+
127.0.0.1:6379> GRAPH.QUERY MotoGP "CREATE (:Rider {name:'Valentino Rossi'})-[:rides]->(:Team {name:'Yamaha'}), (:Rider {name:'Dani Pedrosa'})-[:rides]->(:Team {name:'Honda'}), (:Rider {name:'Andrea Dovizioso'})-[:rides]->(:Team {name:'Ducati'})"
213+
1) 1) "Labels added: 2"
214+
2) "Nodes created: 6"
215+
3) "Properties set: 6"
216+
4) "Relationships created: 3"
217+
5) "Cached execution: 0"
218+
6) "Query internal execution time: 9.155705 milliseconds"
219+
220+
127.0.0.1:6379> GRAPH.QUERY MotoGP "MATCH (r:Rider)-[:rides]->(t:Team) WHERE t.name = 'Yamaha' RETURN r.name"
221+
1) 1) "r.name"
222+
2) 1) 1) "Valentino Rossi"
223+
3) 1) "Cached execution: 0"
224+
2) "Query internal execution time: 5.389149 milliseconds"
225+
226+
127.0.0.1:6379> GRAPH.QUERY MotoGP "MATCH (r:Rider)-[:rides]->(t:Team {name:'Ducati'}) RETURN count(r)"
227+
1) 1) "count(r)"
228+
2) 1) 1) (integer) 1
229+
3) 1) "Cached execution: 0"
230+
2) "Query internal execution time: 1.153678 milliseconds"
231+
{% endcapture %}
232+
233+
{% include code_tabs.html id="code_tabs_0" python=python_code javascript=javascript_code java=java_code rust=rust_code shell=shell_code %}
210234

211235
For additional demos please see visit [Demos](https://github.com/FalkorDB/demos).
212236

0 commit comments

Comments
 (0)