6.8.2.1 PGQL Features Supported in Property Graph Views

The Java API in oracle.pg.rdbms.pgql package provides support for executing PGQL SELECT queries with a few exceptions. See PGQL Limitations in Property Graph Views for more information.

The execution of recursive queries against property graph views are supported for the following features:

  • Recursive queries are supported for the following variable-length path finding goals:
    • Reachability
    • ANY
    • ANY SHORTEST
    • TOP k SHORTEST
  • Recursive queries are supported for the following horizontal aggregations:
    • LISTAGG
      SELECT LISTAGG(src.first_name || ' ' || src.last_name, ',')
      FROM MATCH TOP 2 SHORTEST ( (n:Person) ((src)-[e:knows]->)* (m:Person) )
      WHERE n.id = 1234
    • SUM
      SELECT SUM(e.weight + 3)
      FROM MATCH TOP 2 SHORTEST ( (n:Person) -[e:knows]->* (m:Person) )
      WHERE n.id = 1234
    • COUNT
      SELECT COUNT(e)
      FROM MATCH TOP 2 SHORTEST ( (n:Person) -[e:knows]->* (m:Person) )
      WHERE n.id = 1234
    • AVG
      SELECT AVG(dst.age)
      FROM MATCH TOP 2 SHORTEST ( (n:Person) (-[e:knows]->(dst))* (m:Person) )
      WHERE n.id = 1234
    • MIN (Only for property value or CAST expressions)
      SELECT MIN(CAST(dst.age + 5 AS INTEGER))
      FROM MATCH TOP 2 SHORTEST ( (n:Person) (-[e:knows]->(dst))* (m:Person) )
      WHERE n.id = 1234
    • MAX (Only for property value or CAST expressions)
      SELECT MAX(dst.birthday)
      FROM MATCH TOP 2 SHORTEST ( (n:Person) (-[e:knows]->(dst))* (m:Person) )
      WHERE n.id = 1234

See Performance Considerations for PGQL Queries for details on recommended practices to enhance query performance for recursive queries.