(p *PrettyCfg)
| 292 | } |
| 293 | |
| 294 | func (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. |
no test coverage detected