MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / formatSummarySelect

Method formatSummarySelect

pkg/sql/sem/tree/format.go:721–733  ·  view source on GitHub ↗

formatSummarySelect pretty-prints a summarized select statement. See FmtSummary for supported formats.

(node *Select)

Source from the content-addressed store, hash-verified

719// formatSummarySelect pretty-prints a summarized select statement.
720// See FmtSummary for supported formats.
721func (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.

Callers 1

formatNodeSummaryMethod · 0.95

Calls 1

formatLimitLengthMethod · 0.95

Tested by

no test coverage detected