MCPcopy Create free account
hub / github.com/dolthub/doltgresql / Format

Method Format

postgres/parser/sem/tree/expr.go:699–713  ·  view source on GitHub ↗

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

697
698// Format implements the NodeFormatter interface.
699func (node *IsOfTypeExpr) Format(ctx *FmtCtx) {
700 exprFmtWithParen(ctx, node.Expr)
701 ctx.WriteString(" IS")
702 if node.Not {
703 ctx.WriteString(" NOT")
704 }
705 ctx.WriteString(" OF (")
706 for i, t := range node.Types {
707 if i > 0 {
708 ctx.WriteString(", ")
709 }
710 ctx.FormatTypeReference(t)
711 }
712 ctx.WriteByte(')')
713}
714
715// IfErrExpr represents an IFERROR expression.
716type IfErrExpr struct {

Callers

nothing calls this directly

Calls 3

exprFmtWithParenFunction · 0.85
WriteStringMethod · 0.80
FormatTypeReferenceMethod · 0.80

Tested by

no test coverage detected