MCPcopy Create free account
hub / github.com/DataDog/datadog-agent / ObfuscateSQLString

Method ObfuscateSQLString

pkg/obfuscate/sql.go:293–295  ·  view source on GitHub ↗

ObfuscateSQLString quantizes and obfuscates the given input SQL query string. Quantization removes some elements such as comments and aliases and obfuscation attempts to hide sensitive information in strings and numbers by redacting them.

(in string)

Source from the content-addressed store, hash-verified

291// some elements such as comments and aliases and obfuscation attempts to hide sensitive information
292// in strings and numbers by redacting them.
293func (o *Obfuscator) ObfuscateSQLString(in string) (*ObfuscatedQuery, error) {
294 return o.ObfuscateSQLStringWithOptions(in, &o.opts.SQL)
295}
296
297// ObfuscateSQLStringWithOptions accepts an optional SQLOptions to change the behavior of the obfuscator
298// to quantize and obfuscate the given input SQL query string. Quantization removes some elements such as comments

Callers 15

TestKeepSQLAliasFunction · 0.95
TestSQLQuantizerFunction · 0.95
TestCassQuantizerFunction · 0.95
TestUnicodeDigitFunction · 0.95
TestParseNumberFunction · 0.95
TestObfuscatorFunction · 0.95
TestDollarQuotedFuncFunction · 0.80

Calls 1

Tested by 15

TestKeepSQLAliasFunction · 0.76
TestSQLQuantizerFunction · 0.76
TestCassQuantizerFunction · 0.76
TestUnicodeDigitFunction · 0.76
TestParseNumberFunction · 0.76
TestObfuscatorFunction · 0.76
TestDollarQuotedFuncFunction · 0.64