Add replacing vertices/edges with other vertices/edges (store id)
Opened this issue · 1 comments
firetto commented
Everything (edges & vertices) should have two new attributes:
- active: a boolean that denotes whether or not this vertex/edge is active in the DB
- a "replacement" pointer, pointing from the old element to whatever replaced it (old --> new). If active, this pointer should be null.
- When replacing a vertex, there are two possible options for handling its relations with other vertices:
- Change what its edges point to (that is, change them so they point to the replacement node)
- Remove all the edges (deactivate, that is), and make clone edges (I feel like this will waste a lot of space in the long run).
I think Adam and I went with 1.
There are two options when disabling a component: a regular "disable" (set active to false), or a "replace", which disables and creates a replacement vertex.
When a vertex/edge is disabled, all DB queries should ignore it and skip over it (unless you are specifically looking for disabled vertices as well).
Dhananjhay commented
- While this feature has been implemented for vertices, it has not been implemented fully for replacing edges. Right now, a replaced edge doesn't point to the edge that replaced it.
- The replacement pointer attribute has a default value of '0' right now, it needs to be changed to a default value of 'null'.
- When replacing a property for a component, the id of the new property vertex is not added in the 'replacement' pointer attribute of the old property vertex.
- 'disable_uid' and 'start_uid' need to be added as attributes for both vertices and edges.