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

Method formatSummaryUpdate

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

formatSummaryUpdate pretty-prints a summarized update statement. See FmtSummary for supported formats.

(node *Update)

Source from the content-addressed store, hash-verified

757// formatSummaryUpdate pretty-prints a summarized update statement.
758// See FmtSummary for supported formats.
759func (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.
773func (ctx *FmtCtx) formatNodeSummary(n NodeFormatter) {

Callers 1

formatNodeSummaryMethod · 0.95

Calls 1

formatLimitLengthMethod · 0.95

Tested by

no test coverage detected