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

Function EncodeUnrestrictedSQLIdent

pkg/sql/lex/encode.go:140–146  ·  view source on GitHub ↗

EncodeUnrestrictedSQLIdent writes the identifier in s to buf. The identifier is only quoted if the flags don't tell otherwise and the identifier contains special characters.

(buf *bytes.Buffer, s string, flags EncodeFlags)

Source from the content-addressed store, hash-verified

138// The identifier is only quoted if the flags don't tell otherwise and
139// the identifier contains special characters.
140func EncodeUnrestrictedSQLIdent(buf *bytes.Buffer, s string, flags EncodeFlags) {
141 if flags.HasFlags(EncBareIdentifiers) || isBareIdentifier(s) {
142 buf.WriteString(s)
143 return
144 }
145 EncodeEscapedSQLIdent(buf, s)
146}
147
148// EncodeRestrictedSQLIdent writes the identifier in s to buf. The
149// identifier is quoted if either the flags ask for it, the identifier

Callers 1

FormatMethod · 0.92

Calls 3

isBareIdentifierFunction · 0.85
EncodeEscapedSQLIdentFunction · 0.85
HasFlagsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…