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

Method Format

pkg/sql/sem/tree/create.go:335–346  ·  view source on GitHub ↗

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

333
334// Format implements the NodeFormatter interface.
335func (n *EnumValue) Format(ctx *FmtCtx) {
336 f := ctx.flags
337 if f.HasFlags(FmtAnonymize) {
338 ctx.WriteByte('_')
339 } else if f.HasFlags(FmtMarkRedactionNode) {
340 ctx.WriteString(string(redact.StartMarker()))
341 lexbase.EncodeSQLString(&ctx.Buffer, string(*n))
342 ctx.WriteString(string(redact.EndMarker()))
343 } else {
344 lexbase.EncodeSQLString(&ctx.Buffer, string(*n))
345 }
346}
347
348// EnumValueList represents a list of enum values.
349type EnumValueList []EnumValue

Callers

nothing calls this directly

Calls 2

EncodeSQLStringFunction · 0.92
HasFlagsMethod · 0.45

Tested by

no test coverage detected