Skip to content

Commit

Permalink
Escape strings in RemoveClause
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
NickTaylor- committed Dec 12, 2019
1 parent 4b649fc commit 26c9844
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/neo4j/core/query_clauses.rb
Original file line number Diff line number Diff line change
Expand Up @@ -643,9 +643,7 @@ def from_key_and_value(key, value)
case value
when /^:/
"#{key}:`#{value[1..-1]}`"
when String
"#{key}.#{value}"
when Symbol
when String, Symbol
"#{key}:`#{value}`"
when Array
value.map do |v|
Expand Down

0 comments on commit 26c9844

Please # to comment.