Ejemplo n.º 1
0
        internal static void AppendQuery <T>(StringBuilder sb, ISqlDialect d, string table, string schema,
                                             IList <string> columns, IList <Filter> filters, IList <Projection> projections,
                                             Expression <Func <T, object> >[] orderByColumns)
        {
            ProjectionBuilder.AppendSelect(sb, d, table, schema, columns, projections, filters);

            if (filters?.Count > 0)
            {
                sb.Append(' ');
                FilterBuilder.AppendWhere(sb, d, filters);
            }

            if (orderByColumns?.Length > 0)
            {
                OrderByBuilder.AppendOrderBy(sb, d, orderByColumns);
            }
        }
Ejemplo n.º 2
0
        internal static void AppendQuery(StringBuilder sb, ISqlDialect d, string table, string schema,
                                         IList <string> columns, IList <Filter> filters, IList <Projection> projections, IList <Sort> orderByColumns)
        {
            ProjectionBuilder.AppendSelect(sb, d, table, schema, columns, projections, filters);

            if (filters?.Count > 0)
            {
                sb.Append(' ');
                FilterBuilder.AppendWhere(sb, d, filters);
            }

            if (orderByColumns?.Count > 0)
            {
                sb.Append(' ');
                OrderByBuilder.AppendOrderBy(sb, d, orderByColumns);
            }
        }