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

Method Format

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

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

561
562// Format implements the NodeFormatter interface.
563func (node *RangeCond) Format(ctx *FmtCtx) {
564 notStr := " BETWEEN "
565 if node.Not {
566 notStr = " NOT BETWEEN "
567 }
568 exprFmtWithParen(ctx, node.Left)
569 ctx.WriteString(notStr)
570 if node.Symmetric {
571 ctx.WriteString("SYMMETRIC ")
572 }
573 binExprFmtWithParen(ctx, node.From, "AND", node.To, true)
574}
575
576// TypedLeftFrom returns the RangeCond's left expression as a TypedExpr, in the
577// context of a comparison with TypedFrom().

Callers

nothing calls this directly

Calls 2

exprFmtWithParenFunction · 0.85
binExprFmtWithParenFunction · 0.85

Tested by

no test coverage detected