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

Function formatString

pkg/sql/sem/plpgsqltree/statements.go:1380–1386  ·  view source on GitHub ↗

formatString is a helper function that prints "_" if FmtHideConstants is set, and otherwise prints the given string.

(ctx *tree.FmtCtx, str string)

Source from the content-addressed store, hash-verified

1378// formatString is a helper function that prints "_" if FmtHideConstants is set,
1379// and otherwise prints the given string.
1380func formatString(ctx *tree.FmtCtx, str string) {
1381 if ctx.HasFlags(tree.FmtHideConstants) {
1382 ctx.WriteString("_")
1383 } else {
1384 ctx.WriteString(str)
1385 }
1386}
1387
1388// formatStringQuotes is similar to formatString, but surrounds the output with
1389// single quotes.

Callers 3

FormatMethod · 0.85
formatStringQuotesFunction · 0.85
FormatMethod · 0.85

Calls 1

HasFlagsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…