Method: Sequel::SqlAnywhere::DatasetMethods#escape_like
- Defined in:
- lib/sequel/adapters/shared/sqlanywhere.rb
permalink #escape_like(string) ⇒ Object
SqlAnywhere uses \ to escape metacharacters, but a ‘]’ should not be escaped
354 355 356 |
# File 'lib/sequel/adapters/shared/sqlanywhere.rb', line 354 def escape_like(string) string.gsub(/[\\%_\[]/){|m| "\\#{m}"} end |