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

Method docTable

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

Source from the content-addressed store, hash-verified

2105}
2106
2107func (node *Prepare) docTable(p *PrettyCfg) []pretty.TableRow {
2108 name := p.Doc(&node.Name)
2109 if len(node.Types) > 0 {
2110 typs := make([]pretty.Doc, len(node.Types))
2111 for i, t := range node.Types {
2112 typs[i] = pretty.Text(t.SQLString())
2113 }
2114 name = pretty.ConcatSpace(name,
2115 p.bracket("(", p.commaSeparated(typs...), ")"),
2116 )
2117 }
2118 return []pretty.TableRow{
2119 p.row("PREPARE", name),
2120 p.row("AS", p.Doc(node.Statement)),
2121 }
2122}
2123
2124func (node *Execute) doc(p *PrettyCfg) pretty.Doc {
2125 return p.rlTable(node.docTable(p)...)

Callers 1

docMethod · 0.95

Calls 7

TextFunction · 0.92
ConcatSpaceFunction · 0.92
DocMethod · 0.80
SQLStringMethod · 0.80
bracketMethod · 0.80
commaSeparatedMethod · 0.80
rowMethod · 0.80

Tested by

no test coverage detected