bitnine-oss / agensgraph

AgensGraph, a transactional graph database based on PostgreSQL
http://www.agensgraph.org
Other
1.33k stars 148 forks source link

OpenCypher support #519

Open j616 opened 3 years ago

j616 commented 3 years ago

Is there any documentation for what parts of openCypher Agensgraph does/doesn't support? The README and other docs state it supports openCypher but as far as I can see, it doesn't support the following (possibly incomplete) list of features:

Agensgraph seems to implement neither a superset nor a subset of openCypher but more a derivative of it. Is that correct?

j616 commented 3 years ago

As mentioned in #514, in clauses seem to expect the postgres jsonb type. This breaks queries of the form

WHERE ALL(
  r in relationships(p) WHERE ((type(r) = 'Contributes') OR (type(r) = 'Produces'))
)

You can cast the result of relationships() function with the postgres function to_jsonb but this then means the wrong type argument is being passed to type(). The required query also requires a mix of postgres SQL and cypher rather than pure cypher.

For context, this was discovered in an attempt to work around the lack of support for (a)-[r:TYPE1|TYPE2]->(b).

I'm becoming increasingly frustrated at the lack of support for even basic opencypher syntax. I'd appreciate a reply to this issue.