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

Function StripParens

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

StripParens strips any parentheses surrounding an expression and returns the inner expression. For instance: 1 -> 1 (1) -> 1 ((1)) -> 1

(expr Expr)

Source from the content-addressed store, hash-verified

287// (1) -> 1
288// ((1)) -> 1
289func StripParens(expr Expr) Expr {
290 if p, ok := expr.(*ParenExpr); ok {
291 return StripParens(p.Expr)
292 }
293 return expr
294}
295
296// ComparisonOperator represents a binary operator.
297type ComparisonOperator int

Callers 12

docMethod · 0.85
docRowMethod · 0.85
peelAndOrOperandMethod · 0.85
docMethod · 0.85
peelBinaryOperandMethod · 0.85
docTableMethod · 0.85
peelCompOperandMethod · 0.85
docMethod · 0.85
docMethod · 0.85
defaultTypeCheckFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…