无法更改 AgensGraph 上边缘的标签。
但是,您可以尝试添加具有相同属性的新边缘并删除旧边缘。
agens=# create (:v1{id:1})-[:e1{id:3}]->(:v1{id:2});
GRAPH WRITE (INSERT VERTEX 2, INSERT EDGE 1)
agens=# match p = ( (n1)-[r1]->(n2) ) return p;
p
---------------------------------------------------------------
[v1[3.1]{"id": 1},e1[4.1][3.1,3.2]{"id": 3},v1[3.2]{"id": 2}]
(1 row)
agens=# match (n1)-[r1:e1{id:3}]->(n2)
create (n1)-[r2:e2]->(n2)
set r2 = properties(r1)
delete r1;
GRAPH WRITE (INSERT VERTEX 0, INSERT EDGE 1, DELETE VERTEX 0, DELETE EDGE 1, UPDATE PROPERTY 1)
agens=# match p = ( (n1)-[r1]->(n2) ) return p;
p
---------------------------------------------------------------
[v1[3.1]{"id": 1},e2[5.1][3.1,3.2]{"id": 3},v1[3.2]{"id": 2}]
(1 row)