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

Method FormatStringConstant

pkg/sql/sem/tree/format.go:527–535  ·  view source on GitHub ↗

FormatStringConstant formats a constant string value, redacting it if FmtHideConstants is set.

(s string)

Source from the content-addressed store, hash-verified

525// FormatStringConstant formats a constant string value, redacting it if
526// FmtHideConstants is set.
527func (ctx *FmtCtx) FormatStringConstant(s string) {
528 ctx.WriteString("'")
529 if ctx.HasFlags(FmtHideConstants) {
530 ctx.WriteString("_")
531 } else {
532 ctx.WriteString(s)
533 }
534 ctx.WriteString("'")
535}
536
537// FormatStringDollarQuotes formats a string constant with dollar quotes.
538func (ctx *FmtCtx) FormatStringDollarQuotes(s string) {

Callers 2

StringWithFlagsMethod · 0.95
FormatMethod · 0.80

Calls 1

HasFlagsMethod · 0.95

Tested by

no test coverage detected