cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Cypher Question and Resource

Hello,

I have a couple of questions:

  • Is the function "EXISTS' is still valid as :help EXISTS says it is not found?

  • Are there any books on the Cypher language covering in particular details of the language and in particular the reading from CSV (more than just simple examples)

Thank you

6 REPLIES 6

ameyasoft
Graph Maven

Check this book:
Practical Neo4j by Gregory Jordan (Apress) Chapter 5

Thank you very much for all you great posts. I have a question. Is the following a Boolean:

((a:ABC)-[r:RELATION]->(b:XYZ))

and if so, can it be used as is with WHERE and under what condition it is True or False?

If it is Boolean and becomes True if the relationship exists, then why do we use EXISTS?

It is still strange that the help command with Neo4j says this is not found but using it does nto return any exceptions, etc.

12kunal34
Graph Fellow

yes
function exists still valid
and for CQL you can refer below link

https://neo4j.com/docs/cypher-manual/current/

but within the browser running :help help provides the top root of the available :help options. Even if you look at :help cypher you will see not :help exists but you also dont see a :help size or a :help any etc.

also check out https://neo4j.com/docs/cypher-manual/3.5/clauses/where/#query-where-patterns which indicates

3.7.5.1. Filter on patterns
Patterns are expressions in Cypher, expressions that return a list of paths. List expressions are also predicates — an empty list represents false, and a non-empty represents true.

Query:
MATCH (timothy { name: 'Timothy' }),(others)
WHERE others.name IN ['Andy', 'Peter'] AND (timothy)<--(others)
RETURN others.name, others.age

It's basically syntactic sugar, the pattern expression is internally rewritten into an exists operation if used in a boolean predicate context.

In another context it results in a list of paths.