Ejemplo n.º 1
0
 public SelectStatementQueryExpression(
     ProjectionQueryExpression projection, FromQueryExpression from,
     JoinQueryExpression[] joins,
     WhereQueryExpression where, HavingQueryExpression having,
     OrderByQueryExpression[] orderBy, GroupByQueryExpression[] groupBy,
     LimitQueryExpression limit)
 {
     Projection = projection;
     From       = from;
     Joins      = joins;
     Where      = where;
     Having     = having;
     OrderBy    = (orderBy == null || orderBy.Length < 1) ? null : new OrderByCollectionQueryExpression(orderBy);
     GroupBy    = (groupBy == null || groupBy.Length < 1) ? null : new GroupByCollectionQueryExpression(groupBy);
     Limit      = limit;
 }
Ejemplo n.º 2
0
 public static SelectStatementQueryExpression Select(
     QueryExpression[] projection,
     QueryExpression from             = null,
     JoinQueryExpression[] joins      = null,
     QueryExpression where            = null,
     QueryExpression having           = null,
     OrderByQueryExpression[] orderBy = null,
     GroupByQueryExpression[] groupBy = null,
     LimitQueryExpression limit       = null
     )
 {
     return(new SelectStatementQueryExpression(
                new ProjectionQueryExpression(projection),
                from != null ? new FromQueryExpression(from) : null,
                joins,
                where != null ? new WhereQueryExpression(where) : null,
                having != null ? new HavingQueryExpression(having) : null,
                orderBy, groupBy, limit
                ));
 }