private BoundExpression BindNullIfExpression(NullIfExpressionSyntax node) { // NULLIF(left, right) // // ===> // // CASE WHEN left != right THEN left END var expressions = BindToCommonType(new[] { node.LeftExpression, node.RightExpression }); var boundLeft = expressions[0]; var boundRight = expressions[1]; var boundComparison = BindBinaryExpression(node.Span, BinaryOperatorKind.NotEqual, boundLeft, boundRight); var boundCaseLabel = new BoundCaseLabel(boundComparison, boundLeft); return(new BoundCaseExpression(new[] { boundCaseLabel }, null)); }
public virtual void VisitNullIfExpression(NullIfExpressionSyntax node) { DefaultVisit(node); }
public virtual TResult VisitNullIfExpression(NullIfExpressionSyntax node) { return(DefaultVisit(node)); }