Method: Aws::SdbInterface#escape

Defined in:
lib/sdb/sdb_interface.rb

#escape(value) ⇒ Object

Use this helper to manually escape the fields in the query expressions. To escape the single quotes and backslashes and to wrap the string into the single quotes.

see: docs.amazonwebservices.com/AmazonSimpleDB/2007-11-07/DeveloperGuide/SDB_API.html



143
144
145
146
# File 'lib/sdb/sdb_interface.rb', line 143

def escape(value)
#       %Q{'#{value.to_s.gsub(/(['\\])/) { "\\#{$1}" }}'} if value
 %{'#{value.to_s.gsub(/(['\\])/){"#{$1}#{$1}"}}'} if value
end