Ejemplo n.º 1
0
        protected internal virtual void AppendOrderBy(Net.Vpc.Upa.Impl.Uql.Compiledexpression.CompiledSelect o, System.Text.StringBuilder sb, Net.Vpc.Upa.Persistence.EntityExecutionContext context, Net.Vpc.Upa.Impl.Persistence.SQLManager sqlManager, Net.Vpc.Upa.Impl.Uql.ExpressionDeclarationList declarations)
        {
            int max = o.CountOrderByItems();

            if (max > 0)
            {
                sb.Append(" ");
                sb.Append("Order By ");
                for (int i = 0; i < max; i++)
                {
                    if (i > 0)
                    {
                        sb.Append(", ");
                    }
                    sb.Append(sqlManager.GetSQL(o.GetOrderBy(i), context, declarations));
                    if (o.IsOrderAscending(i))
                    {
                        sb.Append(" Asc ");
                    }
                    else
                    {
                        sb.Append(" Desc ");
                    }
                }
            }
        }