| 183 | * for mutation operations instead of runtime duck-typing checks. |
| 184 | */ |
| 185 | export interface MutableGraphSource<TSchema extends GraphSchema> extends GraphSource<TSchema> { |
| 186 | /** |
| 187 | * Add a vertex to the graph. |
| 188 | */ |
| 189 | addVertex<TVertexLabel extends VertexLabel<TSchema>>( |
| 190 | label: TVertexLabel, |
| 191 | properties: VertexProperties<TSchema, TVertexLabel>, |
| 192 | ): Vertex<TSchema, TVertexLabel>; |
| 193 | |
| 194 | /** |
| 195 | * Add an edge between two vertices. |
| 196 | * @param outV The source vertex (where the edge originates from). |
| 197 | * @param label The label of the edge. |
| 198 | * @param inV The target vertex (where the edge points to). |
| 199 | * @param properties The properties of the edge. |
| 200 | */ |
| 201 | addEdge<TEdgeLabel extends EdgeLabel<TSchema>>( |
| 202 | outV: ElementId | Vertex<TSchema, any>, |
| 203 | label: TEdgeLabel, |
| 204 | inV: ElementId | Vertex<TSchema, any>, |
| 205 | properties: EdgeProperties<TSchema, TEdgeLabel>, |
| 206 | ): Edge<TSchema, TEdgeLabel>; |
| 207 | |
| 208 | /** |
| 209 | * Delete a vertex from the graph. |
| 210 | */ |
| 211 | deleteVertex(id: ElementId | Vertex<TSchema, any>): void; |
| 212 | |
| 213 | /** |
| 214 | * Delete an edge from the graph. |
| 215 | */ |
| 216 | deleteEdge(id: ElementId | Edge<TSchema, any>): void; |
| 217 | } |
| 218 | |
| 219 | export interface EmptyGraphSourceConfig<TSchema extends GraphSchema> { |
| 220 | schema: TSchema; |
no outgoing calls
no test coverage detected