Can you please explain the syntax and logic on this line from the query below?
“vSet = @@vSet;”
vSet is not declared anywhere.
And if vSet is the same as (equal to) @@vSet, then why dont we just use @@vSet?
Thank you.
CREATE QUERY aFindPath(String startingWord, String endWord) FOR GRAPH MyGraph {
SetAccum<edge> @@edgeSet;
SetAccum<vertex> @@vSet;
Start (ANY) = {word.*};
Start = select s from Start:s where s.Text == startingWord;
while Start.size() > 0 limit 20 do
Start = select t from Start:s-(newtWord:e)-word:t
accum @@edgeSet += e,
@@vSet += t
having t.test != endWord;
end;
vSet = @@vSet;
print @@edgeSet, vSet;
}