コード例 #1
0
        protected override Expression VisitIndexedColumn(SqlIndexedColumnExpression indexedColumnExpression)
        {
            if (indexedColumnExpression.LowercaseIndex)
            {
                this.Write("(lower(");
            }

            this.Visit(indexedColumnExpression.Column);

            if (indexedColumnExpression.LowercaseIndex)
            {
                this.Write("))");
            }

            switch (indexedColumnExpression.SortOrder)
            {
            case SortOrder.Descending:
                this.Write(" DESC");
                break;

            case SortOrder.Ascending:
                this.Write(" ASC");
                break;

            case SortOrder.Unspecified:
                break;
            }

            return(indexedColumnExpression);
        }
コード例 #2
0
        protected virtual Expression VisitIndexedColumn(SqlIndexedColumnExpression indexedColumnExpression)
        {
            var newColumn = (SqlColumnExpression)this.Visit(indexedColumnExpression.Column);

            if (newColumn != indexedColumnExpression.Column)
            {
                return(new SqlIndexedColumnExpression(newColumn, indexedColumnExpression.SortOrder, indexedColumnExpression.LowercaseIndex));
            }

            return(indexedColumnExpression);
        }
コード例 #3
0
 protected override Expression VisitIndexedColumn(SqlIndexedColumnExpression indexedColumnExpression)
 {
     return(indexedColumnExpression);
 }