File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 66 27 AS person2Id
77}
88*/
9- // Check whether a path exists -- if there is no path, the query will return an empty result
10- MATCH
11- (person1 :Person { id : $person1Id } ),
12- (person2 :Person { id : $person2Id } ),
13- path = shortestPath ((person1 )- [ : KNOWS * ] - (person2 ))
9+ CALL gds .graph .drop ('q14graph' , false )
10+ YIELD graphName
1411
1512// ----------------------------------------------------------------------------------------------------
16- WITH person1 , person2
13+ WITH count ( * ) AS dummy
1714// ----------------------------------------------------------------------------------------------------
1815
19- CALL gds .graph .drop ('q14graph' , false )
20- YIELD graphName
16+ // Check whether a path exists -- if there is no path, the query will return an empty result
17+ MATCH
18+ path = shortestPath ((person1 { id : $person1Id } )- [ : KNOWS * ] - (person2 { id : $person2Id } ))
2119
2220// ----------------------------------------------------------------------------------------------------
23- WITH person1 , person2
21+ // the actual values are not important,
22+ // we are only interested in whether there is a row or not
23+ WITH 42 AS dummy
2424// ----------------------------------------------------------------------------------------------------
2525
26+ MATCH (person1 :Person { id : $person1Id } ), (person2 :Person { id : $person2Id } )
2627CALL gds .graph .project .cypher (
2728 'q14graph' ,
2829 'MATCH (p:Person) RETURN id(p) AS id' ,
You can’t perform that action at this time.
0 commit comments