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

Method doc

pkg/sql/sem/tree/pretty.go:358–373  ·  view source on GitHub ↗
(p *PrettyCfg)

Source from the content-addressed store, hash-verified

356}
357
358func (node *OrExpr) doc(p *PrettyCfg) pretty.Doc {
359 pred := func(e Expr, recurse func(e Expr)) bool {
360 if a, ok := e.(*OrExpr); ok {
361 recurse(a.Left)
362 recurse(a.Right)
363 return true
364 }
365 return false
366 }
367 formatOperand := func(e Expr) pretty.Doc {
368 return p.Doc(p.peelAndOrOperand(e))
369 }
370 operands := p.flattenOp(node.Left, pred, formatOperand, nil)
371 operands = p.flattenOp(node.Right, pred, formatOperand, operands)
372 return p.joinNestedOuter("OR", operands...)
373}
374
375func (node *Exprs) doc(p *PrettyCfg) pretty.Doc {
376 if node == nil || len(*node) == 0 {

Callers

nothing calls this directly

Calls 4

DocMethod · 0.80
peelAndOrOperandMethod · 0.80
flattenOpMethod · 0.80
joinNestedOuterMethod · 0.80

Tested by

no test coverage detected