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

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

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

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

https://neo4j.com/docs/cypher-refcard/current/ is the 3.5 Cypher Ref Card and under Predicates does list Exists. Further this is described at https://neo4j.com/docs/cypher-manual/3.5/clauses/where/#property-existence-checking

1 Like

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.

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.