상속: SqlBaseExpression
예제 #1
0
        protected virtual Expression VisitOrderBy(SqlOrderByExpression orderByExpression)
        {
            var newExpression = this.Visit(orderByExpression.Expression);

            if (newExpression != orderByExpression.Expression)
            {
                return(new SqlOrderByExpression(orderByExpression.OrderType, newExpression));
            }

            return(orderByExpression);
        }
예제 #2
0
        protected override Expression VisitOrderBy(SqlOrderByExpression orderByExpression)
        {
            if (orderByExpression == null)
            {
                return(null);
            }

            this.hashCode ^= (int)orderByExpression.OrderType;

            this.Visit(orderByExpression.Expression);

            return(base.VisitOrderBy(orderByExpression));
        }
		protected override Expression VisitOrderBy(SqlOrderByExpression orderByExpression)
		{
			base.VisitOrderBy(orderByExpression);

			switch (orderByExpression.OrderType)
			{
			case OrderType.Ascending:
				this.Write(" NULLS FIRST");
				break;
			default:
				this.Write(" NULLS LAST");
				break;
			}

			return orderByExpression;
		}
예제 #4
0
        protected override Expression VisitOrderBy(SqlOrderByExpression orderByExpression)
        {
            SqlOrderByExpression current;

            if (!TryGetCurrent(orderByExpression, out current))
            {
                return(orderByExpression);
            }

            result = result && (current.OrderType == orderByExpression.OrderType);

            if (result)
            {
                currentObject = current.Expression;
                Visit(orderByExpression.Expression);
                currentObject = current;
            }

            return(orderByExpression);
        }
예제 #5
0
        protected override Expression VisitOrderBy(SqlOrderByExpression orderByExpression)
        {
            SqlOrderByExpression current;

            if (!this.TryGetCurrent(orderByExpression, out current))
            {
                return(orderByExpression);
            }

            this.result = this.result && (current.OrderType == orderByExpression.OrderType);

            if (this.result)
            {
                this.currentObject = current.Expression;
                this.Visit(orderByExpression.Expression);
                this.currentObject = current;
            }

            return(orderByExpression);
        }
예제 #6
0
 protected override Expression VisitOrderBy(SqlOrderByExpression expression)
 {
     this.hashCode ^= expression.OrderType.GetHashCode();
     return(base.VisitOrderBy(expression));
 }
 protected override Expression VisitOrderBy(SqlOrderByExpression expression)
 {
     this.hashCode ^= expression.OrderType.GetHashCode();
     return base.VisitOrderBy(expression);
 }
        protected override Expression VisitOrderBy(SqlOrderByExpression expression)
        {
            SqlOrderByExpression current;
            if (!TryGetCurrent(expression, out current))
            {
                return expression;
            }

            if (!(this.result &= current.OrderType == expression.OrderType))
            {
                return expression;
            }

            if (!(this.result &= current.NodeType == expression.NodeType))
            {
                return expression;
            }

            if (!(this.result &= current.Type == expression.Type))
            {
                return expression;
            }

            this.currentObject = current.Expression;
            this.Visit(expression.Expression);
            if (!this.result)
            {
                return expression;
            }

            this.currentObject = current;
            return expression;
        }
예제 #9
0
		protected virtual Expression VisitOrderBy(SqlOrderByExpression orderByExpression)
		{
			var newExpression = this.Visit(orderByExpression.Expression);

			if (newExpression != orderByExpression.Expression)
			{
				return new SqlOrderByExpression(orderByExpression.OrderType, newExpression);
			}

			return orderByExpression;
		}
예제 #10
0
		protected override Expression VisitOrderBy(SqlOrderByExpression orderByExpression)
		{
			base.VisitOrderBy(orderByExpression);

			if (((SqlOrderByExpression)orderByExpression).OrderType == OrderType.Descending)
			{
				this.Write(" DESC");
			}

			return orderByExpression;
		}