Reputation: 1
I've been learning Neo4j CQL and using Neo4j Browser(version 3.0.5)
Neo4j Browser provides the function for expanding the child relationships(double click also works), but not provides the expanding CQL.
When generating just A node in the first
match (n:Person{name:"xx"}) return n
double click works the same with the CQL
match p=((n:Person{name:"xx"})-[]-()) return n
But not the same when generating several nodes (tried the cql like)
match p=(n:Person{name:"xx"})-[]-()-[]-(m:Person) return p
What confuses me is that is there A fixed style for CQL to this function?
Any suggestions?
if not fixed, cql for 2 or 3 nodes ?
Upvotes: 0
Views: 129
Reputation: 30407
I think you may want to read up on variable-length relationships in Cypher patterns, and in general reading through the entire Cypher manual ought to be helpful.
An example of usage for getting paths of length 2-3 from a starting node, regardless of relationship type or direction:
MATCH p = (:Person{name:"xx"})-[*2..3]-()
RETURN p
Upvotes: 1