* Delete an edge from the graph. * @param id The id of the edge to delete, or the edge itself.
(id: ElementId | Edge<TSchema, any>)
| 647 | * @param id The id of the edge to delete, or the edge itself. |
| 648 | */ |
| 649 | public deleteEdge(id: ElementId | Edge<TSchema, any>): void { |
| 650 | if (typeof id === "object") { |
| 651 | id = id.id; |
| 652 | } |
| 653 | const edge = this.#config.storage.getEdgeById(id); |
| 654 | if (edge) { |
| 655 | this.#indexManager.onElementRemove(edge); |
| 656 | } |
| 657 | this.#config.storage.deleteEdge(id); |
| 658 | } |
| 659 | |
| 660 | /** |
| 661 | * Update a property of a vertex or edge. |
nothing calls this directly
no test coverage detected