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

Function AsStringWithFlags

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

AsStringWithFlags pretty prints a node to a string given specific flags; only flags that don't require Annotations can be used.

(n NodeFormatter, fl FmtFlags, opts ...FmtCtxOption)

Source from the content-addressed store, hash-verified

788// AsStringWithFlags pretty prints a node to a string given specific flags; only
789// flags that don't require Annotations can be used.
790func AsStringWithFlags(n NodeFormatter, fl FmtFlags, opts ...FmtCtxOption) string {
791 ctx := NewFmtCtx(fl, opts...)
792 if fl.HasFlags(FmtSummary) {
793 ctx.formatNodeSummary(n)
794 } else {
795 ctx.FormatNode(n)
796 }
797 return ctx.CloseAndGetString()
798}
799
800// AsStringWithFQNames pretty prints a node to a string with the
801// FmtAlwaysQualifyTableNames flag (which requires annotations).

Callers 15

RunShowSyntaxFunction · 0.92
SQLStringMethod · 0.85
SQLStringMethod · 0.85
SQLStringMethod · 0.85
docAsStringMethod · 0.85
docRowMethod · 0.85
pgwireFormatMethod · 0.85
pgwireFormatMethod · 0.85
AsJSONFunction · 0.85
MemoizeComparisonExprOpFunction · 0.85
memoizeOpMethod · 0.85
AsStringFunction · 0.85

Calls 5

formatNodeSummaryMethod · 0.95
FormatNodeMethod · 0.95
CloseAndGetStringMethod · 0.95
NewFmtCtxFunction · 0.85
HasFlagsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…