UPDATE EDGE¶
UPDATE EDGE <src_vid> -> <dest_vid> [@<rank>] OF <edge_type> SET <update_properties> [WHEN <condition>] [YIELD <properties>]
Use UPDATE EDGE to update properties on an edge. The UPDATE EDGE statement only updates one edge at a time.
Nebula Graph supports compare-and-set (CAS).
NOTE:
WHENandYIELDare optional.
update_propertiesis the properties of the edge to be updated. For example,e1.col1 = $^.e1.col2 + 1means to updatee1.col1toe1.col2+1.NOTE:
$^indicates the edge to be updated.
conditionis some constraints. Only when theconditionis met,UPDATEis executed successfully.conditionsupports expression operations.propertiesis the properties to be returned,YIELDreturns the latest updated values.
Consider the following example:
nebula> UPDATE EDGE "player100" -> "team204"@0 \
OF serve \
SET start_year = start_year + 1;
Last update: March 16, 2021