neo4j/cypher-plugin — Issue #5: Escaping double quote character in a Cypher query
Author: ducky427
Created: 2012-02-17 16:19:41+00:00
State: open

I am using Neo4j server v1.6 and when I do a query of the sort through the Neo4j shell,

START n=node(3) MATCH (n)-[:KNOWS]->(a) WHERE (a.name = "Adam "S"") RETURN a

I get a `SyntaxException: Unclosed parenthesis`. There is a double quotes around A. I am using the same datamodel as in the Neo4j docs [section 15.6](http://docs.neo4j.org/chunked/milestone/query-where.html).

I've tried the following and they haven't worked as well.

START n=node(3) MATCH (n)-[:KNOWS]->(a) WHERE (a.name = "Adam \"S\"") RETURN a
START n=node(3) MATCH (n)-[:KNOWS]->(a) WHERE (a.name = "Adam \\"S\ \"") RETURN a

I know I could try the following and it would work:

START n=node(3) MATCH (n)-[:KNOWS]->(a) WHERE (a.name = 'Adam "S"') RETURN a

So I replaced the outer double quotes with a single quotes. By what if the content had both types of quotes in it? Then I am back at the original problem.

Cheers