MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / Doc

Method Doc

pkg/sql/sem/tree/pretty.go:148–154  ·  view source on GitHub ↗

Doc converts f (generally a Statement) to a pretty.Doc. If f does not have a native conversion, its .Format representation is used as a simple Text Doc.

(f NodeFormatter)

Source from the content-addressed store, hash-verified

146// Doc converts f (generally a Statement) to a pretty.Doc. If f does not have a
147// native conversion, its .Format representation is used as a simple Text Doc.
148func (p *PrettyCfg) Doc(f NodeFormatter) pretty.Doc {
149 if f, ok := f.(docer); ok {
150 doc := f.doc(p)
151 return doc
152 }
153 return p.docAsString(f)
154}
155
156func (p *PrettyCfg) docAsString(f NodeFormatter) pretty.Doc {
157 const prettyFlags = FmtShowPasswords | FmtParsable

Callers 15

PrettyMethod · 0.95
exprDocWithParenMethod · 0.95
docReturningMethod · 0.95
docMethod · 0.80
docMethod · 0.80
docRowMethod · 0.80
docRowMethod · 0.80
docMethod · 0.80
docMethod · 0.80
docMethod · 0.80
docMethod · 0.80

Calls 2

docAsStringMethod · 0.95
docMethod · 0.65

Tested by

no test coverage detected