Let say I have a chain/list of nodes :
(:node {uid:333})-->(:node {uid:102})-->(:node {uid:155})-->...
I want to substitute/replace one or several consecutive nodes with another chain of nodes.
(:node {uid:255})-->(:node {uid:107})
it seem to me that the number of operations to achieve this are too many to have them in single query.
1. input [255,107]
2. create the (255)-->(107)
3. find the place where to insert in the original chain
4. connect this node to (255)-->(107)
5. connect the tail-107 to the original chain (if it does not end)
6. delete the part to be replaced..
the problem is that if it is not single query then it become even more complex.
How would you do this ? (have to work like string substitution)
One idea to simplify it is to find the positions in the chain and work with indexes .