You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initial question: to update edge w/o knowing its rank.
insert edge follow(degree) values "player126"->"player116"@1:(13);
insert edge follow(degree) values "player126"->"player116"@2:(13);
UPDATE EDGE ON follow "player126"->"player116" SET degree = 1000 WHEN degree < 1000;
(root@nebula) [basketballplayer]> UPDATE EDGE ON follow "player126"->"player116" SET degree = 1000 WHEN degree < 1000;
[ERROR (-1005)]: Storage Error: Vertex or edge not found.
Wed, 09 Feb 2022 14:52:30 UTC
Options I could think of are as follows:
Use variable or pipeline to fetch ranks and specify to update edge
This is not yet supported:
go from "player126" over follow WHERE dst(edge) == "player116" yield rank(edge) as r | UPDATE EDGE ON follow "player126"->"player116"@$-.r SET degree = 1000 WHEN degree < 1000
[ERROR (-1004)]: SyntaxError: syntax error near `UPDATE'
update_edge_sentence
// ======== Begin: Compatible with 1.0 =========
: KW_UPDATE KW_EDGE vid R_ARROW vid KW_OF name_label
KW_SET update_list when_clause yield_clause {
auto sentence = new UpdateEdgeSentence($3, $5, 0, $7, $9, $10, $11);
$$ = sentence;
}
| KW_UPSERT KW_EDGE vid R_ARROW vid KW_OF name_label
KW_SET update_list when_clause yield_clause {
auto sentence = new UpdateEdgeSentence($3, $5, 0, $7, $9, $10, $11, true);
$$ = sentence;
}
| KW_UPDATE KW_EDGE vid R_ARROW vid AT rank KW_OF name_label
KW_SET update_list when_clause yield_clause {
auto sentence = new UpdateEdgeSentence($3, $5, $7, $9, $11, $12, $13);
$$ = sentence;
}
| KW_UPSERT KW_EDGE vid R_ARROW vid AT rank KW_OF name_label
KW_SET update_list when_clause yield_clause {
auto sentence = new UpdateEdgeSentence($3, $5, $7, $9, $11, $12, $13, true);
$$ = sentence;
...
rank: unary_integer { $$ = $1; };
Introduce wildcard rank i.e. @*
UPDATE EDGE ON follow "player126"->"player116"@* SET degree = 1000 WHEN degree < 1000;
Question
Could we support 1 or 2 or other options?
The text was updated successfully, but these errors were encountered:
Maybe support rank comparison in where clause is better. Suppose an edge schema named test_edge, then rank(test_edge) indicates the rank of edge test_edge.
In this case, update specified edges can be written as UPDATE EDGE ON "player126"->"player116" SET degree = 1000 WHEN degree < 1000 and rank(test_edge) >""
Futhermore, the following issue will be resolved toghther. #3155
Initial question: to update edge w/o knowing its rank.
Options I could think of are as follows:
@*
Question
Could we support 1 or 2 or other options?
The text was updated successfully, but these errors were encountered: