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

Method doc

pkg/sql/sem/tree/pretty.go:1061–1078  ·  view source on GitHub ↗
(p *PrettyCfg)

Source from the content-addressed store, hash-verified

1059}
1060
1061func (node *Tuple) doc(p *PrettyCfg) pretty.Doc {
1062 exprDoc := p.Doc(&node.Exprs)
1063 if len(node.Exprs) == 1 {
1064 exprDoc = pretty.Concat(exprDoc, pretty.Text(","))
1065 }
1066 d := p.bracket("(", exprDoc, ")")
1067 if len(node.Labels) > 0 {
1068 labels := make([]pretty.Doc, len(node.Labels))
1069 for i, n := range node.Labels {
1070 labels[i] = p.Doc((*Name)(&n))
1071 }
1072 d = p.bracket("(", pretty.Stack(
1073 d,
1074 p.nestUnder(pretty.Keyword("AS"), p.commaSeparated(labels...)),
1075 ), ")")
1076 }
1077 return d
1078}
1079
1080func (node *UpdateExprs) doc(p *PrettyCfg) pretty.Doc {
1081 d := make([]pretty.Doc, len(*node))

Callers

nothing calls this directly

Calls 8

ConcatFunction · 0.92
TextFunction · 0.92
StackFunction · 0.92
KeywordFunction · 0.92
DocMethod · 0.80
bracketMethod · 0.80
nestUnderMethod · 0.80
commaSeparatedMethod · 0.80

Tested by

no test coverage detected