neo4jrb / neo4j-core

A simple unified API that can access both the server and embedded Neo4j database. Used by the neo4j gem
MIT License
99 stars 80 forks source link

Escape strings in RemoveClause #334

Open NickTaylor- opened 4 years ago

NickTaylor- commented 4 years ago

Currently in RemoveClause only symbols are escaped with backticks, meaning that using .remove will fail on labels with special characters. This can be encountered with a namespaced label name, such as MyModule::MyThing.

This just makes the switch process strings and symbols in the same block.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-3.8%) to 86.804% when pulling 26c98440b29a4c0330d318d592a76733c8b410aa on NickTaylor-:escape-string-values-in-remove-clause into 4b649fca33a1b1dba8705e6f999764ad9fb4d76e on neo4jrb:master.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-3.8%) to 86.804% when pulling 26c98440b29a4c0330d318d592a76733c8b410aa on NickTaylor-:escape-string-values-in-remove-clause into 4b649fca33a1b1dba8705e6f999764ad9fb4d76e on neo4jrb:master.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-3.8%) to 86.804% when pulling 26c98440b29a4c0330d318d592a76733c8b410aa on NickTaylor-:escape-string-values-in-remove-clause into 4b649fca33a1b1dba8705e6f999764ad9fb4d76e on neo4jrb:master.

NickTaylor- commented 4 years ago

So it seems like this broke a lot of the tests due to it having some expectations that the generated queries not be escaped. I want to make sure that this PR makes sense before I try and fix those, so if I can get a 👍 that this is a reasonable change, I'll go through with it.