Skip to content

Commit 01452a9

Browse files
authored
DOC-746 | Removing vertices with Gharial deletes its edges (#690)
* Removing vertices with Gharial deletes its edges And removing edges may remove other edges if the former are used as vertices * Only incoming and outgoing edges are removed when deleting a vertex or edge (non-recursive) The internal query is simply: FOR e IN @@collection FILTER e._from == @toDeleteId OR e._to == @toDeleteId REMOVE e IN @@collection
1 parent 4a3942d commit 01452a9

File tree

6 files changed

+24
-30
lines changed

6 files changed

+24
-30
lines changed

site/content/3.11/develop/http-api/graphs/named-graphs.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5218,7 +5218,8 @@ paths:
52185218
delete:
52195219
operationId: deleteVertex
52205220
description: |
5221-
Removes a vertex from the collection.
5221+
Removes a vertex from a collection of the named graph. Additionally removes all
5222+
incoming and outgoing edges of the vertex.
52225223
parameters:
52235224
- name: database-name
52245225
in: path
@@ -7302,7 +7303,8 @@ paths:
73027303
delete:
73037304
operationId: deleteEdge
73047305
description: |
7305-
Removes an edge from the collection.
7306+
Removes an edge from an edge collection of the named graph. Any other edges
7307+
that directly reference this edge like a vertex are removed, too.
73067308
parameters:
73077309
- name: database-name
73087310
in: path

site/content/3.11/graphs/general-graphs/management.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,8 @@ graph.female.update("female/linda", {name: "Linda", _key: "linda"}, { returnOld:
670670

671671
### Remove a Vertex
672672

673-
Removes a vertex in collection `vertexCollectionName`.
673+
Removes a vertex from a collection of the named graph. Additionally removes all
674+
incoming and outgoing edges of the vertex.
674675

675676
`graph.vertexCollectionName.remove(vertexId, options)`
676677

@@ -679,9 +680,6 @@ Removes a vertex in collection `vertexCollectionName`.
679680
- `options` (object, _optional_):
680681
See the [_collection_ object](../../develop/javascript-api/@arangodb/collection-object.md#collectionremoveobject)
681682

682-
Additionally removes all ingoing and outgoing edges of the vertex recursively
683-
(see [edge remove](#remove-an-edge)).
684-
685683
**Examples**
686684

687685
```js
@@ -808,7 +806,8 @@ graph.relation.update("relation/aliceAndDiana",
808806

809807
### Remove an Edge
810808

811-
Removes an edge in collection `edgeCollectionName`.
809+
Removes an edge from an edge collection of the named graph. Any other edges
810+
that directly reference this edge like a vertex are removed, too.
812811

813812
`graph.edgeCollectionName.remove(edgeId, options)`
814813

@@ -817,9 +816,6 @@ Removes an edge in collection `edgeCollectionName`.
817816
- `options` (object, _optional_):
818817
See the [_collection_ object](../../develop/javascript-api/@arangodb/collection-object.md#collectionremoveobject)
819818

820-
If this edge is used as a vertex by another edge, the other edge is removed
821-
(recursively).
822-
823819
**Examples**
824820

825821
```js

site/content/3.12/develop/http-api/graphs/named-graphs.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5218,7 +5218,8 @@ paths:
52185218
delete:
52195219
operationId: deleteVertex
52205220
description: |
5221-
Removes a vertex from the collection.
5221+
Removes a vertex from a collection of the named graph. Additionally removes all
5222+
incoming and outgoing edges of the vertex.
52225223
parameters:
52235224
- name: database-name
52245225
in: path
@@ -7302,7 +7303,8 @@ paths:
73027303
delete:
73037304
operationId: deleteEdge
73047305
description: |
7305-
Removes an edge from the collection.
7306+
Removes an edge from an edge collection of the named graph. Any other edges
7307+
that directly reference this edge like a vertex are removed, too.
73067308
parameters:
73077309
- name: database-name
73087310
in: path

site/content/3.12/graphs/general-graphs/management.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,8 @@ graph.female.update("female/linda", {name: "Linda", _key: "linda"}, { returnOld:
670670

671671
### Remove a Vertex
672672

673-
Removes a vertex in collection `vertexCollectionName`.
673+
Removes a vertex from a collection of the named graph. Additionally removes all
674+
incoming and outgoing edges of the vertex.
674675

675676
`graph.vertexCollectionName.remove(vertexId, options)`
676677

@@ -679,9 +680,6 @@ Removes a vertex in collection `vertexCollectionName`.
679680
- `options` (object, _optional_):
680681
See the [_collection_ object](../../develop/javascript-api/@arangodb/collection-object.md#collectionremoveobject)
681682

682-
Additionally removes all ingoing and outgoing edges of the vertex recursively
683-
(see [edge remove](#remove-an-edge)).
684-
685683
**Examples**
686684

687685
```js
@@ -808,7 +806,8 @@ graph.relation.update("relation/aliceAndDiana",
808806

809807
### Remove an Edge
810808

811-
Removes an edge in collection `edgeCollectionName`.
809+
Removes an edge from an edge collection of the named graph. Any other edges
810+
that directly reference this edge like a vertex are removed, too.
812811

813812
`graph.edgeCollectionName.remove(edgeId, options)`
814813

@@ -817,9 +816,6 @@ Removes an edge in collection `edgeCollectionName`.
817816
- `options` (object, _optional_):
818817
See the [_collection_ object](../../develop/javascript-api/@arangodb/collection-object.md#collectionremoveobject)
819818

820-
If this edge is used as a vertex by another edge, the other edge is removed
821-
(recursively).
822-
823819
**Examples**
824820

825821
```js

site/content/3.13/develop/http-api/graphs/named-graphs.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5218,7 +5218,8 @@ paths:
52185218
delete:
52195219
operationId: deleteVertex
52205220
description: |
5221-
Removes a vertex from the collection.
5221+
Removes a vertex from a collection of the named graph. Additionally removes all
5222+
incoming and outgoing edges of the vertex.
52225223
parameters:
52235224
- name: database-name
52245225
in: path
@@ -7302,7 +7303,8 @@ paths:
73027303
delete:
73037304
operationId: deleteEdge
73047305
description: |
7305-
Removes an edge from the collection.
7306+
Removes an edge from an edge collection of the named graph. Any other edges
7307+
that directly reference this edge like a vertex are removed, too.
73067308
parameters:
73077309
- name: database-name
73087310
in: path

site/content/3.13/graphs/general-graphs/management.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,8 @@ graph.female.update("female/linda", {name: "Linda", _key: "linda"}, { returnOld:
670670

671671
### Remove a Vertex
672672

673-
Removes a vertex in collection `vertexCollectionName`.
673+
Removes a vertex from a collection of the named graph. Additionally removes all
674+
incoming and outgoing edges of the vertex.
674675

675676
`graph.vertexCollectionName.remove(vertexId, options)`
676677

@@ -679,9 +680,6 @@ Removes a vertex in collection `vertexCollectionName`.
679680
- `options` (object, _optional_):
680681
See the [_collection_ object](../../develop/javascript-api/@arangodb/collection-object.md#collectionremoveobject)
681682

682-
Additionally removes all ingoing and outgoing edges of the vertex recursively
683-
(see [edge remove](#remove-an-edge)).
684-
685683
**Examples**
686684

687685
```js
@@ -808,7 +806,8 @@ graph.relation.update("relation/aliceAndDiana",
808806

809807
### Remove an Edge
810808

811-
Removes an edge in collection `edgeCollectionName`.
809+
Removes an edge from an edge collection of the named graph. Any other edges
810+
that directly reference this edge like a vertex are removed, too.
812811

813812
`graph.edgeCollectionName.remove(edgeId, options)`
814813

@@ -817,9 +816,6 @@ Removes an edge in collection `edgeCollectionName`.
817816
- `options` (object, _optional_):
818817
See the [_collection_ object](../../develop/javascript-api/@arangodb/collection-object.md#collectionremoveobject)
819818

820-
If this edge is used as a vertex by another edge, the other edge is removed
821-
(recursively).
822-
823819
**Examples**
824820

825821
```js

0 commit comments

Comments
 (0)