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

Function EscapeSQLIdent

pkg/sql/lexbase/encode.go:92–96  ·  view source on GitHub ↗

EscapeSQLIdent ensures that the potential identifier in s is fully quoted, so that any special character it contains is not at risk of "spilling" in the surrounding syntax.

(s string)

Source from the content-addressed store, hash-verified

90// quoted, so that any special character it contains is not at risk
91// of "spilling" in the surrounding syntax.
92func EscapeSQLIdent(s string) string {
93 var buf bytes.Buffer
94 EncodeEscapedSQLIdent(&buf, s)
95 return buf.String()
96}
97
98// EncodeEscapedSQLIdent writes the identifier in s to buf. The
99// identifier is always quoted. Double quotes inside the identifier

Callers

nothing calls this directly

Calls 2

EncodeEscapedSQLIdentFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…