formatSummaryUpdate pretty-prints a summarized update statement. See FmtSummary for supported formats.
(node *Update)
| 757 | // formatSummaryUpdate pretty-prints a summarized update statement. |
| 758 | // See FmtSummary for supported formats. |
| 759 | func (ctx *FmtCtx) formatSummaryUpdate(node *Update) { |
| 760 | if node.With == nil { |
| 761 | ctx.WriteString("UPDATE ") |
| 762 | ctx.formatLimitLength(node.Table, TableLimit) |
| 763 | ctx.WriteString(" SET ") |
| 764 | ctx.formatLimitLength(&node.Exprs, ColumnLimit) |
| 765 | if node.Where != nil { |
| 766 | ctx.WriteByte(' ') |
| 767 | ctx.formatLimitLength(node.Where, ColumnLimit+len("WHERE ")) |
| 768 | } |
| 769 | } |
| 770 | } |
| 771 | |
| 772 | // formatNodeSummary recurses into a node for pretty-printing a summarized version. |
| 773 | func (ctx *FmtCtx) formatNodeSummary(n NodeFormatter) { |
no test coverage detected