| 1111 | } |
| 1112 | |
| 1113 | func (node *Delete) doc(p *PrettyCfg) pretty.Doc { |
| 1114 | items := make([]pretty.TableRow, 6) |
| 1115 | items = append(items, |
| 1116 | node.With.docRow(p), |
| 1117 | p.row("DELETE FROM", p.Doc(node.Table)), |
| 1118 | node.Where.docRow(p), |
| 1119 | node.OrderBy.docRow(p)) |
| 1120 | items = append(items, node.Limit.docTable(p)...) |
| 1121 | items = append(items, p.docReturning(node.Returning)) |
| 1122 | return p.rlTable(items...) |
| 1123 | } |
| 1124 | |
| 1125 | func (p *PrettyCfg) docReturning(node ReturningClause) pretty.TableRow { |
| 1126 | switch r := node.(type) { |