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

Method Eval

pkg/sql/sem/tree/eval.go:4186–4199  ·  view source on GitHub ↗

Eval implements the TypedExpr interface.

(ctx *EvalContext)

Source from the content-addressed store, hash-verified

4184
4185// Eval implements the TypedExpr interface.
4186func (expr *NotExpr) Eval(ctx *EvalContext) (Datum, error) {
4187 d, err := expr.Expr.(TypedExpr).Eval(ctx)
4188 if err != nil {
4189 return nil, err
4190 }
4191 if d == DNull {
4192 return DNull, nil
4193 }
4194 v, err := GetBool(d)
4195 if err != nil {
4196 return nil, err
4197 }
4198 return MakeDBool(!v), nil
4199}
4200
4201// Eval implements the TypedExpr interface.
4202func (expr *NullIfExpr) Eval(ctx *EvalContext) (Datum, error) {

Callers

nothing calls this directly

Calls 3

GetBoolFunction · 0.85
MakeDBoolFunction · 0.85
EvalMethod · 0.65

Tested by

no test coverage detected