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

Method joinNestedOuter

pkg/sql/sem/tree/pretty.go:205–224  ·  view source on GitHub ↗
(lbl string, d ...pretty.Doc)

Source from the content-addressed store, hash-verified

203}
204
205func (p *PrettyCfg) joinNestedOuter(lbl string, d ...pretty.Doc) pretty.Doc {
206 if len(d) == 0 {
207 return pretty.Nil
208 }
209 switch p.Align {
210 case PrettyAlignAndDeindent:
211 return pretty.JoinNestedOuter(lbl, pretty.Keyword, d...)
212 case PrettyAlignAndExtraIndent:
213 items := make([]pretty.TableRow, len(d))
214 for i, dd := range d {
215 if i > 0 {
216 items[i].Label = lbl
217 }
218 items[i].Doc = dd
219 }
220 return pretty.Table(pretty.TableRightAlignFirstColumn, pretty.Keyword, items...)
221 default:
222 return pretty.JoinNestedRight(pretty.Keyword(lbl), d...)
223 }
224}
225
226// docer is implemented by nodes that can convert themselves into
227// pretty.Docs. If nodes cannot, node.Format is used instead as a Text Doc.

Callers 3

docMethod · 0.80
docMethod · 0.80
docMethod · 0.80

Calls 4

JoinNestedOuterFunction · 0.92
TableFunction · 0.92
JoinNestedRightFunction · 0.92
KeywordFunction · 0.92

Tested by

no test coverage detected