MCPcopy Create free account
hub / github.com/dolthub/doltgresql / TypeCheck

Method TypeCheck

postgres/parser/sem/tree/type_check.go:1095–1105  ·  view source on GitHub ↗

TypeCheck implements the Expr interface.

(
	ctx context.Context, semaCtx *SemaContext, desired *types.T,
)

Source from the content-addressed store, hash-verified

1093
1094// TypeCheck implements the Expr interface.
1095func (expr *NotExpr) TypeCheck(
1096 ctx context.Context, semaCtx *SemaContext, desired *types.T,
1097) (TypedExpr, error) {
1098 exprTyped, err := typeCheckAndRequireBoolean(ctx, semaCtx, expr.Expr, "NOT argument")
1099 if err != nil {
1100 return nil, err
1101 }
1102 expr.Expr = exprTyped
1103 expr.typ = types.Bool
1104 return expr, nil
1105}
1106
1107// TypeCheck implements the Expr interface.
1108func (expr *IsNullExpr) TypeCheck(

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected