Find any (arbitrary) path between a pair of source-destination

47 views Asked by At

We are trying to write PGQL query on PG View(version 21.4) to find any (arbitrary) path between a pair of source-destination.

We had being using the following link as our PGQL guideline. https://pgql-lang.org/spec/1.4/#any-path

Query: SELECT s.ID as s_id, d.ID AS d_id FROM MATCH ANY (s) -[e]->+ (d) on my_graph

Error: java.lang.UnsupportedOperationException: Only zero (0) or more path quantifier is supported

What would had cause the error since it was working on PGS. Any solution or workaround would be appreciated.

1

There are 1 answers

0
Ryota Yamanaka On BEST ANSWER

In version 21.4, only * is supported on PG Views. From 22.1, other quantifiers are also supported.

Added PGQL support for more quantifiers when executing PGQL queries against property graph views.

Syntax  Description
------  -----------
*       zero or more
+       one or more
?       zero or one
{n}     exactly n
{n,}    n or more
{n,m}   between n and m (inclusive)
{,m}    between zero and m (inclusive)