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

Method Format

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

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

638
639// Format implements the NodeFormatter interface.
640func (node *RangeCond) Format(ctx *FmtCtx) {
641 notStr := " BETWEEN "
642 if node.Not {
643 notStr = " NOT BETWEEN "
644 }
645 exprFmtWithParen(ctx, node.Left)
646 ctx.WriteString(notStr)
647 if node.Symmetric {
648 ctx.WriteString("SYMMETRIC ")
649 }
650 binExprFmtWithParen(ctx, node.From, "AND", node.To, true)
651}
652
653// TypedLeftFrom returns the RangeCond's left expression as a TypedExpr, in the
654// context of a comparison with TypedFrom().

Callers

nothing calls this directly

Calls 3

exprFmtWithParenFunction · 0.85
binExprFmtWithParenFunction · 0.85
WriteStringMethod · 0.80

Tested by

no test coverage detected