Ensure character translation for valid node/property names/etc
Closed this issue · 4 comments
ryguyrg commented
Looks like dashes are valid for mongo document collection names, but invalid for Neo4j?
InvalidSyntax: Invalid input '-': expected an identifier character, whitespace or ')' (line 1, column 33 (offset: 32))
"CREATE CONSTRAINT ON (d:employee-territories) ASSERT d._id IS UNIQUE"
Source: tried running mongo-import.sh from:
https://github.com/tmcnab/northwind-mongo
jexp commented
We have to use backticks around all identifiers that we don't control
like
CREATE CONSTRAINT ON (d:`employee-territories`) ASSERT d._id IS UNIQUE
same goes for property names etc.
ryguyrg commented
Right now, she's doing parameter substitution. Shouldn't py2neo and/or the Neo4j protocol automatically handle this?
jexp commented
No parametrization for identifiers in neither.