I create some vertex on AgensGraph.
And, I want to remove some properties of specific vertex.
agens=# create (:v1{v1:1,v2:2,v3:3});
GRAPH WRITE (INSERT VERTEX 1, INSERT EDGE 0)
agens=# match (n:v1) return n;
n
------------------------------------
v1[3.1]{"v1": 1, "v2": 2, "v3": 3}
(1 row)
How to remove property on AgensGraph?
You can use REMOVE or SET clause for removing property.
First, use REMOVE clause with property name.
agens=# match (n:v1) remove n.v3 return n;
n
---------------------------
v1[3.1]{"v1": 1, "v2": 2}
(1 row)
Second option, set null to property name.
agens=# match (n:v1) set n.v2 = null return n;
n
------------------
v1[3.1]{"v1": 1}
(1 row)
Thank you.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.