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

Method Format

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

Format implements the NodeFormatter interface.

(ctx *FmtCtx)

Source from the content-addressed store, hash-verified

523
524// Format implements the NodeFormatter interface.
525func (node *RangeCond) Format(ctx *FmtCtx) {
526 notStr := " BETWEEN "
527 if node.Not {
528 notStr = " NOT BETWEEN "
529 }
530 exprFmtWithParen(ctx, node.Left)
531 ctx.WriteString(notStr)
532 if node.Symmetric {
533 ctx.WriteString("SYMMETRIC ")
534 }
535 binExprFmtWithParen(ctx, node.From, "AND", node.To, true)
536}
537
538// TypedLeftFrom returns the RangeCond's left expression as a TypedExpr, in the
539// 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