Eval implements the TypedExpr interface.
(ctx *EvalContext)
| 4168 | |
| 4169 | // Eval implements the TypedExpr interface. |
| 4170 | func (expr *IsOfTypeExpr) Eval(ctx *EvalContext) (Datum, error) { |
| 4171 | d, err := expr.Expr.(TypedExpr).Eval(ctx) |
| 4172 | if err != nil { |
| 4173 | return nil, err |
| 4174 | } |
| 4175 | datumTyp := d.ResolvedType() |
| 4176 | |
| 4177 | for _, t := range expr.Types { |
| 4178 | if datumTyp.Equivalent(t) { |
| 4179 | return MakeDBool(DBool(!expr.Not)), nil |
| 4180 | } |
| 4181 | } |
| 4182 | return MakeDBool(DBool(expr.Not)), nil |
| 4183 | } |
| 4184 | |
| 4185 | // Eval implements the TypedExpr interface. |
| 4186 | func (expr *NotExpr) Eval(ctx *EvalContext) (Datum, error) { |
nothing calls this directly
no test coverage detected