Skip to content

Commit 67b4907

Browse files
authored
Merge pull request #131 from FalkorDB/gkorland-delete-python
Update graph.delete.md add python examples
2 parents 1714f25 + d74a499 commit 67b4907

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

.wordlist.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,4 +355,6 @@ html
355355
body
356356
table
357357
Explainer
358+
propname
359+
propvalue
358360
ro

commands/graph.delete.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,27 @@ Arguments: `Graph name`
1414

1515
Returns: `String indicating if operation succeeded or failed.`
1616

17-
```sh
17+
{% capture shell_0 %}
1818
GRAPH.DELETE us_government
19-
```
19+
{% endcapture %}
20+
21+
{% capture python_0 %}
22+
graph.delete()
23+
{% endcapture %}
24+
25+
{% include code_tabs.html id="tabs_0" shell=shell_0 python=python_0 %}
2026

2127
Note: To delete a node from the graph (not the entire graph), execute a `MATCH` query and pass the alias to the `DELETE` clause:
2228

23-
```
29+
{% capture shell_1 %}
2430
GRAPH.QUERY DEMO_GRAPH "MATCH (x:Y {propname: propvalue}) DELETE x"
25-
```
31+
{% endcapture %}
32+
33+
{% capture python_1 %}
34+
graph.query("MATCH (x:Y {propname: propvalue}) DELETE x")
35+
{% endcapture %}
36+
37+
{% include code_tabs.html id="tabs_1" shell=shell_1 python=python_1 %}
2638

2739
WARNING: When you delete a node, all of the node's incoming/outgoing relationships are also removed.
2840

0 commit comments

Comments
 (0)