| 1123 | } |
| 1124 | |
| 1125 | func (p *PrettyCfg) docReturning(node ReturningClause) pretty.TableRow { |
| 1126 | switch r := node.(type) { |
| 1127 | case *NoReturningClause: |
| 1128 | return p.row("", nil) |
| 1129 | case *ReturningNothing: |
| 1130 | return p.row("RETURNING", pretty.Keyword("NOTHING")) |
| 1131 | case *ReturningExprs: |
| 1132 | return p.row("RETURNING", p.Doc((*SelectExprs)(r))) |
| 1133 | default: |
| 1134 | panic(errors.AssertionFailedf("unhandled case: %T", node)) |
| 1135 | } |
| 1136 | } |
| 1137 | |
| 1138 | func (node *Order) doc(p *PrettyCfg) pretty.Doc { |
| 1139 | var d pretty.Doc |