Beispiel #1
0
        protected override Expression VisitSubquery(SubqueryExpression subquery)
        {
            var saveSuppressOrderBy = this.suppressOrderby;

            this.suppressOrderby = true;
            var result = base.VisitSubquery(subquery);

            this.suppressOrderby = saveSuppressOrderBy;
            return(result);
        }
Beispiel #2
0
 protected override Expression VisitSubquery(SubqueryExpression subquery)
 {
     if ((subquery.NodeType == (ExpressionType)DbExpressionType.Scalar ||
          subquery.NodeType == (ExpressionType)DbExpressionType.In) &&
         subquery.Select != null)
     {
         System.Diagnostics.Debug.Assert(subquery.Select.Columns.Count == 1);
         MarkColumnAsUsed(subquery.Select.Alias, subquery.Select.Columns[0].Name);
     }
     return(base.VisitSubquery(subquery));
 }
Beispiel #3
0
        protected virtual Expression VisitSubquery(SubqueryExpression subquery)
        {
            switch ((DbExpressionType)subquery.NodeType)
            {
            case DbExpressionType.Scalar:
                return(this.VisitScalar((ScalarExpression)subquery));

            case DbExpressionType.Exists:
                return(this.VisitExists((ExistsExpression)subquery));

            case DbExpressionType.In:
                return(this.VisitIn((InExpression)subquery));
            }
            return(subquery);
        }
Beispiel #4
0
        protected virtual bool CompareSubquery(SubqueryExpression a, SubqueryExpression b)
        {
            if (a.NodeType != b.NodeType)
            {
                return(false);
            }
            switch ((DbExpressionType)a.NodeType)
            {
            case DbExpressionType.Scalar:
                return(this.CompareScalar((ScalarExpression)a, (ScalarExpression)b));

            case DbExpressionType.Exists:
                return(this.CompareExists((ExistsExpression)a, (ExistsExpression)b));

            case DbExpressionType.In:
                return(this.CompareIn((InExpression)a, (InExpression)b));
            }
            return(false);
        }
Beispiel #5
0
 protected override Expression VisitSubquery(SubqueryExpression subquery)
 {
     // don't count aggregates in subqueries
     return(subquery);
 }
Beispiel #6
0
 protected override Expression VisitSubquery(SubqueryExpression subquery)
 {
     return(subquery);
 }
Beispiel #7
0
 protected override Expression VisitSubquery(SubqueryExpression subquery)
 {
     // don't gather inside scalar & exists
     return(subquery);
 }