Example #1
0
 internal static WhereOrChainer OrWhere(this ConditionChainer prev, Expression condition, bool sign, PredicateGroup predicateGroup = null)
 {
     if (sign)
     {
         return(new WhereOrChainer((Chainer)prev, condition, predicateGroup));
     }
     else
     {
         return(new WhereOrChainer((Chainer)prev, condition.Not(), predicateGroup));
     }
 }
Example #2
0
 internal static ConditionChainer WhereExists(this ConditionChainer prev, INonSelectView nonSelectView, bool sign, Predicate predicate)
 {
     if (predicate.LogicalOperator == LogicalOperator.And)
     {
         return(new WhereAndChainer((Chainer)prev, nonSelectView, sign, predicate.PredicateGroup));
     }
     else
     {
         return(new WhereOrChainer((Chainer)prev, nonSelectView, sign, predicate.PredicateGroup));
     }
 }
Example #3
0
        internal static ConditionChainer WhereQuantified(this ConditionChainer prev, INonSelectView nonSelectView, bool sign, Predicate predicate)
        {
            var expression = predicate.Quantifier
                             .CreateExpression(((ISelect)nonSelectView).SelectCountBig().EndView());

            if (predicate.LogicalOperator == LogicalOperator.And)
            {
                return(AndWhere(prev, expression, sign, predicate.PredicateGroup));
            }
            else
            {
                return(OrWhere(prev, expression, sign, predicate.PredicateGroup));
            }
        }