5.2 Variable Length Path Patterns
Variable length graph patterns provide advanced querying support for SQL property graphs.
Variable length graph patterns require recursion such that there is a variable number of joins when translated into a relational query.
Bounded recursive path patterns that include one or more of the following quantifiers are supported:
Table 5-3 Quantifier Support for Variable Length Graph Patterns
Quantifier | Description |
---|---|
{n} |
Exactly n |
{n, m} |
Between n and m (inclusive)
|
{, m}
|
Between 0 and m (inclusive)
|
Note that the lower bound should be 0 or greater, while the upper bound should be 1 or greater and should also be greater than or equal to the lower bound.
See Example 5-14 for example queries using recursive path patterns with bounded quantifiers.
Parent topic: SQL Graph Queries