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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -48,3 +48,18 @@ nebula> $var = GO FROM "player100" OVER follow YIELD dst(edge) AS id; \
| "Spurs" | "Manu Ginobili" |
+-----------+-----------------+
```
## Set operations and scope of user-defined variables
When assigning variables within a compound statement involving set operations, it is important to enclose the scope of the variable assignment in parentheses. In the example below, the source of the `$var` assignment is the results of the output of two `INTERSECT` statements.
```ngql
$var = ( \
GO FROM "player100" OVER follow \
YIELD dst(edge) AS id \
INTERSECT \
GO FROM "player100" OVER follow \
YIELD dst(edge) AS id \
); \
GO FROM $var.id OVER follow YIELD follow.degree AS degree