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

Method docRow

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

Source from the content-addressed store, hash-verified

292}
293
294func (node *GroupBy) docRow(p *PrettyCfg) pretty.TableRow {
295 if len(*node) == 0 {
296 return emptyRow
297 }
298 d := make([]pretty.Doc, len(*node))
299 for i, e := range *node {
300 // Beware! The GROUP BY items should never be simplified by
301 // stripping parentheses, because parentheses there are
302 // semantically important.
303 d[i] = p.Doc(e)
304 }
305 return p.row("GROUP BY", p.commaSeparated(d...))
306}
307
308// flattenOp populates a slice with all the leaves operands of an expression
309// tree where all the nodes satisfy the given predicate.

Callers 1

docMethod · 0.95

Calls 3

DocMethod · 0.80
rowMethod · 0.80
commaSeparatedMethod · 0.80

Tested by

no test coverage detected