(p *PrettyCfg)
| 617 | } |
| 618 | |
| 619 | func (node *With) docRow(p *PrettyCfg) pretty.TableRow { |
| 620 | if node == nil { |
| 621 | return emptyRow |
| 622 | } |
| 623 | d := make([]pretty.Doc, len(node.CTEList)) |
| 624 | for i, cte := range node.CTEList { |
| 625 | d[i] = p.nestUnder( |
| 626 | p.Doc(&cte.Name), |
| 627 | p.bracketKeyword("AS", " (", p.Doc(cte.Stmt), ")", ""), |
| 628 | ) |
| 629 | } |
| 630 | kw := "WITH" |
| 631 | if node.Recursive { |
| 632 | kw = "WITH RECURSIVE" |
| 633 | } |
| 634 | return p.row(kw, p.commaSeparated(d...)) |
| 635 | } |
| 636 | |
| 637 | func (node *Subquery) doc(p *PrettyCfg) pretty.Doc { |
| 638 | d := pretty.Text("<unknown>") |
no test coverage detected