Method: Sequel::SqlAnywhere::DatasetMethods#escape_like

Defined in:
lib/sequel/adapters/shared/sqlanywhere.rb

#escape_like(string) ⇒ Object

SqlAnywhere uses \ to escape metacharacters, but a ‘]’ should not be escaped

[View source]

354
355
356
# File 'lib/sequel/adapters/shared/sqlanywhere.rb', line 354

def escape_like(string)
  string.gsub(/[\\%_\[]/){|m| "\\#{m}"}
end