On Fri, Nov 4, 2011 at 8:58 PM, KanTube <[email protected]> wrote: > At first glance i like the new syntax. I am a bit confused on Andres > comment > that PATTERN is a new construct and is not replacing WHERE.
I'll use old-school Cypher to illustrate my the difference here. Cypher's MATCH clause is PQL's PATTERN. Semantically, START, MATCH and WHERE in Cypher represent the same concept. START a = node:idx(key = "value") MATCH a-[r]->b WHERE r.foo = "bar" RETURN b This could just as well be expressed like this: WHERE a = node:idx(key = "value") AND a-[r]->b AND r.foo = "bar" RETURN b The reason I separated them is for a pedagogical reason - I think the structure that Cypher forces on you helps you think and reason about the query better than the shorter all predicate version. I hope that makes sense, and that I haven't messed up my assumptions. Btw - I'd love feedback on this idea - it's a core part in my mental model designing this language. Andrés _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

