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

Function EscapeSQLString

pkg/sql/lexbase/encode.go:143–147  ·  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

141// string. This is suitable for safely producing a SQL string valid
142// for input to the parser.
143func EscapeSQLString(in string) string {
144 var buf bytes.Buffer
145 EncodeSQLString(&buf, in)
146 return buf.String()
147}
148
149// EncodeSQLStringWithFlags writes a string literal to buf. All
150// 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…