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

Method Format

pkg/sql/sem/tree/name_part.go:83–90  ·  view source on GitHub ↗

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

81
82// Format implements the NodeFormatter interface.
83func (u *UnrestrictedName) Format(ctx *FmtCtx) {
84 f := ctx.flags
85 if f.HasFlags(FmtAnonymize) {
86 ctx.WriteByte('_')
87 } else {
88 lexbase.EncodeUnrestrictedSQLIdent(&ctx.Buffer, string(*u), f.EncodeFlags())
89 }
90}
91
92// ToStrings converts the name list to an array of regular strings.
93func (l NameList) ToStrings() []string {

Callers

nothing calls this directly

Calls 3

EncodeFlagsMethod · 0.80
HasFlagsMethod · 0.45

Tested by

no test coverage detected