formatSummarySelect pretty-prints a summarized select statement. See FmtSummary for supported formats.
(node *Select)
| 719 | // formatSummarySelect pretty-prints a summarized select statement. |
| 720 | // See FmtSummary for supported formats. |
| 721 | func (ctx *FmtCtx) formatSummarySelect(node *Select) { |
| 722 | if node.With == nil { |
| 723 | s := node.Select |
| 724 | if s, ok := s.(*SelectClause); ok { |
| 725 | ctx.WriteString("SELECT ") |
| 726 | ctx.formatLimitLength(&s.Exprs, ColumnLimit) |
| 727 | if len(s.From.Tables) > 0 { |
| 728 | ctx.WriteByte(' ') |
| 729 | ctx.formatLimitLength(&s.From, TableLimit+len("FROM ")) |
| 730 | } |
| 731 | } |
| 732 | } |
| 733 | } |
| 734 | |
| 735 | // formatSummaryInsert pretty-prints a summarized insert/upsert statement. |
| 736 | // See FmtSummary for supported formats. |
no test coverage detected