Method: OneApm::Agent::Database::ObfuscationHelpers#obfuscate_single_quote_literals

Defined in:
lib/one_apm/agent/database/obfuscation_helpers.rb

#obfuscate_single_quote_literals(sql) ⇒ Object



44
45
46
47
48
49
# File 'lib/one_apm/agent/database/obfuscation_helpers.rb', line 44

def obfuscate_single_quote_literals(sql)
  obfuscated = sql.reverse
  obfuscated.gsub!(OA_REVERSE_SINGLE_QUOTES_REGEX, OA_PLACEHOLDER)
  obfuscated.reverse!
  obfuscated
end