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

Function IsConst

pkg/sql/sem/tree/normalize.go:846–849  ·  view source on GitHub ↗

IsConst returns whether the expression is constant. A constant expression does not contain variables, as defined by ContainsVars, nor impure functions.

(evalCtx *EvalContext, expr Expr)

Source from the content-addressed store, hash-verified

844// IsConst returns whether the expression is constant. A constant expression
845// does not contain variables, as defined by ContainsVars, nor impure functions.
846func IsConst(evalCtx *EvalContext, expr Expr) bool {
847 v := isConstVisitor{ctx: evalCtx}
848 return v.run(expr)
849}
850
851// fastIsConstVisitor is similar to isConstVisitor, but it only visits
852// at most two levels of the tree (with one exception, see below).

Callers 1

EvalAsOfTimestampFunction · 0.85

Calls 1

runMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…