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

Method Format

pkg/sql/sem/tree/expr.go:584–598  ·  view source on GitHub ↗

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

582
583// Format implements the NodeFormatter interface.
584func (node *IsOfTypeExpr) Format(ctx *FmtCtx) {
585 exprFmtWithParen(ctx, node.Expr)
586 ctx.WriteString(" IS")
587 if node.Not {
588 ctx.WriteString(" NOT")
589 }
590 ctx.WriteString(" OF (")
591 for i, t := range node.Types {
592 if i > 0 {
593 ctx.WriteString(", ")
594 }
595 ctx.FormatTypeReference(t)
596 }
597 ctx.WriteByte(')')
598}
599
600// IfErrExpr represents an IFERROR expression.
601type IfErrExpr struct {

Callers

nothing calls this directly

Calls 2

exprFmtWithParenFunction · 0.85
FormatTypeReferenceMethod · 0.80

Tested by

no test coverage detected