MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / EscapeSQLString

Function EscapeSQLString

pkg/sql/lex/encode.go:79–83  ·  view source on GitHub ↗

EscapeSQLString returns an escaped SQL representation of the given string. This is suitable for safely producing a SQL string valid for input to the parser.

(in string)

Source from the content-addressed store, hash-verified

77// string. This is suitable for safely producing a SQL string valid
78// for input to the parser.
79func EscapeSQLString(in string) string {
80 var buf bytes.Buffer
81 EncodeSQLString(&buf, in)
82 return buf.String()
83}
84
85// EncodeSQLStringWithFlags writes a string literal to buf. All
86// unicode and non-printable characters are escaped. flags controls

Callers 2

FormatMethod · 0.92
FormatMethod · 0.92

Calls 2

EncodeSQLStringFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…