public override SqlFragment Visit(DbIsNullExpression expression) { IsNullFragment f = new IsNullFragment(); f.Argument = expression.Argument.Accept(this); return(f); }
public override void Visit(DbIsNullExpression expression) { Check.NotNull(expression, "expression"); expression.Argument.Accept(this); _commandText.AppendKeyword(" is null"); }
public override void Visit(DbIsNullExpression expression) { Write(expression); _depth++; Write("Argument", expression.Argument); _depth--; }
public override void Visit(DbIsNullExpression e) { Check.NotNull(e, "e"); BeginUnary(e); End(e); }
public override DbExpression Visit(DbIsNullExpression expression) { DebugCheck.NotNull(expression); var propertyExpression = expression.Argument as DbPropertyExpression; if (propertyExpression != null) { var parameter = GetParameter((EdmProperty)propertyExpression.Property, originalValue: true); if (parameter != null) { if (parameter.Item2) { // Current value, remove condition return(null); } var parameterReferenceExpression = new DbParameterReferenceExpression(parameter.Item1.TypeUsage, parameter.Item1.Name); var equalityPredicate = propertyExpression.Equal(parameterReferenceExpression); var nullPredicate = propertyExpression.IsNull().And(parameterReferenceExpression.IsNull()); return(equalityPredicate.Or(nullPredicate)); } } return(base.Visit(expression)); }
/// <summary> /// Evaluate a null expression. /// </summary> /// <param name="node">Is null expression</param> /// <returns>A boolean expression describing the result of evaluating the Is Null predicate</returns> public override PropagatorResult Visit(DbIsNullExpression node) { Debug.Assert(null != node, "node is not visited when null"); PropagatorResult argumentResult = Visit(node.Argument); bool result = argumentResult.IsNull; return(ConvertBoolToResult(result, argumentResult)); }
/// <summary> /// Implements the visitor pattern for <see cref="T:System.Data.Common.CommandTrees.DbIsNullExpression"/>. /// </summary> /// <param name="expression">The <see cref="T:System.Data.Common.CommandTrees.DbIsNullExpression"/> that is visited.</param> public override void Visit(DbIsNullExpression expression) { if (expression == null) { throw new ArgumentNullException("expression"); } expression.Argument.Accept(this); }
/// <summary> /// Evaluate a null expression. /// </summary> /// <param name="node"> Is null expression </param> /// <returns> A boolean expression describing the result of evaluating the Is Null predicate </returns> public override PropagatorResult Visit(DbIsNullExpression node) { Check.NotNull(node, "node"); var argumentResult = Visit(node.Argument); var result = argumentResult.IsNull; return(ConvertBoolToResult(result, argumentResult)); }
/// <summary> /// <see cref="Visit(DbIsNullExpression)"/> /// </summary> /// <param name="e"></param> /// <param name="negate">Was the parent a DbNotExpression?</param> /// <returns></returns> private SqlBuilder VisitIsNullExpression(DbIsNullExpression e, bool negate) { if (!negate) { return(new SqlBuilder(e.Argument.Accept(this), " is null")); } else { return(new SqlBuilder(e.Argument.Accept(this), " is not null")); } }
public override Expression Visit(DbIsNullExpression expression) { Expression source = this.Visit(expression.Argument); if (source.Type.IsValueType && !TypeHelper.IsNullable(source.Type)) { return(Expression.Constant(false)); } else { return(Expression.Equal(source, Expression.Constant(null))); } }
public override Expression Visit(DbIsNullExpression expression) { Expression source = this.Visit(expression.Argument); if (source.Type.IsValueType && !TypeHelper.IsNullable(source.Type)) { return Expression.Constant(false); } else { return Expression.Equal(source, Expression.Constant(null)); } }
public override DbExpression Visit(DbIsNullExpression expression) { DbPropertyExpression left = expression.Argument as DbPropertyExpression; if (left != null) { Tuple <FunctionParameter, bool> parameter = this.GetParameter((EdmProperty)left.Property, true); if (parameter != null) { if (parameter.Item2) { return((DbExpression)null); } DbParameterReferenceExpression referenceExpression = new DbParameterReferenceExpression(parameter.Item1.TypeUsage, parameter.Item1.Name); return((DbExpression)left.Equal((DbExpression)referenceExpression).Or((DbExpression)left.IsNull().And((DbExpression)referenceExpression.IsNull()))); } } return(base.Visit(expression)); }
/// <summary> /// Visitor pattern method for <see cref="DbIsNullExpression" />. /// </summary> /// <param name="expression"> The DbIsNullExpression that is being visited. </param> /// <exception cref="ArgumentNullException"> /// <paramref name="expression" /> /// is null /// </exception> public override void Visit(DbIsNullExpression expression) { VisitUnaryExpression(expression); }
public override LegacyCommandTrees.DbExpression Visit(DbIsNullExpression expression) { Debug.Assert(expression != null, "expression != null"); return(expression.Argument.Accept(this).IsNull()); }
public override void Visit(DbIsNullExpression expression) { expression.Argument.Accept((DbExpressionVisitor)this); this._commandText.Append(" is null"); }
public override ISqlFragment Visit(DbIsNullExpression e) { return(VisitIsNullExpression(e, false)); }
/// <summary> /// Visitor pattern method for DbIsNullExpression. /// </summary> /// <param name="expression"> The DbIsNullExpression that is being visited. </param> public abstract void Visit(DbIsNullExpression expression);
public override void Visit(DbIsNullExpression e) { Check.NotNull(e, "e"); VisitUnary(e); }
public override void Visit(DbIsNullExpression e) { VisitUnary(e); }
/// <summary> /// Typed visitor pattern method for DbIsNullExpression. /// </summary> /// <param name="expression"> The DbIsNullExpression that is being visited. </param> /// <returns> An instance of TResultType. </returns> public abstract TResultType Visit(DbIsNullExpression expression);
public override TReturn Visit(DbIsNullExpression expression) { Check.NotNull <DbIsNullExpression>(expression, nameof(expression)); throw this.ConstructNotSupportedException((DbExpression)expression); }
public override void Visit(DbIsNullExpression expression) { // no-op }
/// <summary> /// Visitor pattern method for DbIsNullExpression. /// </summary> /// <param name="expression"> The DbIsNullExpression that is being visited. </param> public abstract void Visit(DbIsNullExpression expression);
public override TreeNode Visit(DbIsNullExpression e) { Check.NotNull(e, "e"); return(VisitUnary(e)); }
public override TReturn Visit(DbIsNullExpression expression) { throw ConstructNotSupportedException(expression); }
public override VfpExpression Visit(DbIsNullExpression expression) { return(new VfpIsNullExpression(expression.ResultType, expression.Argument.Accept(this))); }
public override void Visit(DbIsNullExpression expression) { // no-op }
public override void Visit(DbIsNullExpression expression) { expression.Argument.Accept(this); _commandText.Append(" IS NULL"); }
public override DbExpressionEntitySetInfo Visit(DbIsNullExpression expression) { return(null); }
public override void Visit(DbIsNullExpression e) { BeginUnary(e); End(e); }
public override TreeNode Visit(DbIsNullExpression e) { Check.NotNull <DbIsNullExpression>(e, nameof(e)); return(this.VisitUnary((DbUnaryExpression)e)); }
/// <summary> /// Implements the visitor pattern for <see cref="T:System.Data.Common.CommandTrees.DbIsNullExpression"/>. /// </summary> /// <param name="expression">The <see cref="T:System.Data.Common.CommandTrees.DbIsNullExpression"/> that is visited.</param> public override void Visit(DbIsNullExpression expression) { if (expression == null) { throw new ArgumentNullException("expression"); } expression.Argument.Accept(this); }
public override void Visit(DbIsNullExpression e) { VisitUnary(e); }
public override void Visit(DbIsNullExpression e) { Check.NotNull <DbIsNullExpression>(e, nameof(e)); this.VisitUnary((DbUnaryExpression)e); }
/// <summary> /// Visitor pattern method for <see cref="DbIsNullExpression" />. /// </summary> /// <param name="expression"> The DbIsNullExpression that is being visited. </param> /// <exception cref="ArgumentNullException"> /// <paramref name="expression" /> /// is null /// </exception> public override void Visit(DbIsNullExpression expression) { Check.NotNull(expression, "expression"); VisitUnaryExpression(expression); }
public override object Visit(DbIsNullExpression expression) { this.Visit(expression.Argument); return(null); }
public override void Visit(DbIsNullExpression expression) { Contract.Requires(expression != null); }
public override DbExpressionEntitySetInfo Visit(DbIsNullExpression expression) { Check.NotNull(expression, "expression"); return(null); }
public override bool Visit(DbIsNullExpression expression) { return(VisitUnaryExpression(expression)); }
public override void Visit(DbIsNullExpression expression) { Check.NotNull(expression, "expression"); expression.Argument.Accept(this); _commandText.AppendKeyword(" is null"); }
public override void Visit(DbIsNullExpression expression) { expression.Argument.Accept(this); _commandText.Append(" is null"); }
public override bool Visit(DbIsNullExpression expression) { Check.NotNull <DbIsNullExpression>(expression, nameof(expression)); return(this.VisitUnaryExpression((DbUnaryExpression)expression)); }