Closed ekkis closed 8 years ago
Not dumb, just not right. =) Labels can't be parameterized, as they determine the query plan.
Hope that helps! If you still have questions here, I'd recommend asking on the Neo4j Slack #help-cypher
channel:
https://neo4j-users.slack.com/messages/help-cypher
Sign up here:
ah. makes sense but it would be helpful if the documentation stated so
It's in the Neo4j manual / Cypher docs:
http://neo4j.com/docs/stable/cypher-parameters.html
Parameters can not be used as for property names, relationship types and labels, since these patterns are part of the query structure that is compiled into a query plan.
Would it be helpful if the node-neo4j docs linked to this?
oh I see. it's an issue with neo4j, not with the npm module. the documentation I was referring to is actually on the npm site (https://www.npmjs.com/package/neo4j) and it differs from that shows in the github project. when I saw MATCH (u:User {email: {email}}) RETURN u
I had no reason to think I couldn't replace User
with a parameter too. so perhaps a small note there would make sense. thanks.
Indeed! Okay, thanks for the feedback. =) Cheers.
I'm getting an error on a simple statement and it appears the query's not using the parameters:
here's the error:
$ node ../tst
am I doing something really dumb here?