修改

修改点数据

根据主键修改

UpdateNodeRequest request = new UpdateNodeRequest();
request.setId(5L);
request.setValue(Value.newBuilder().add("name", "XuSheng").build());
client.updateNode(request);

Filter匹配修改

UpdateNodeRequest request = new UpdateNodeRequest();
request.setFilter(Filter.newEqBuilder("name").eq("XuSheng").build());
request.setValue(Value.newBuilder().add("age", "30").build());
client.updateNode(request);

修改边数据

根据主键修改

UpdateEdgeRequest request = new UpdateEdgeRequest();
request.setId(5L);
request.setValue(Value.newBuilder().add("rank", 20).build());
client.updateEdge(request);

Filter匹配修改

UpdateEdgeRequest request = new UpdateEdgeRequest();
request.setFilter(Filter.newEqBuilder("rank").eq("20").build());
request.setValue(Value.newBuilder().add("_from_id", "2").build());
client.updateEdge(request);