Exemple #1
0
 /// <summary>
 /// A distinct property value count.
 /// </summary>
 public static IProjection CountDistinct(String fieldName)
 {
     return(new CountProjection(Clauses.Field(fieldName))
     {
         Distinct = true
     });
 }
Exemple #2
0
 /// <inheritdoc/>
 public override String ToGroupString(ICriteria criteria)
 {
     if (Grouped)
     {
         return(Clauses.Field(PropertyName).Render(criteria));
     }
     else
     {
         return(base.ToGroupString(criteria));
     }
 }
Exemple #3
0
 /// <summary>
 /// A property minimum value.
 /// </summary>
 public static IProjection Min(String fieldName)
 {
     return(new AggregateProjection("min", Clauses.Field(fieldName)));
 }
Exemple #4
0
 /// <summary>
 /// A property average value.
 /// </summary>
 public static IProjection Avg(String fieldName)
 {
     return(new AggregateProjection("avg", Clauses.Field(fieldName)));
 }
Exemple #5
0
 /// <summary>
 /// A property value count.
 /// </summary>
 public static IProjection Count(String fieldName)
 {
     return(new CountProjection(Clauses.Field(fieldName)));
 }
Exemple #6
0
 /// <summary>
 /// A property value sum.
 /// </summary>
 public static IProjection Sum(String fieldName)
 {
     return(new AggregateProjection("sum", Clauses.Field(fieldName)));
 }
Exemple #7
0
 public String ToSqlString(PropertyProjection propertyProjection)
 {
     return(Alias(Clauses.Field(propertyProjection.PropertyName).Render(this), propertyProjection.Alias));
 }
Exemple #8
0
 /// <summary>
 /// Descending order.
 /// </summary>
 public static Order Desc(String fieldName)
 {
     return(new Order(Clauses.Field(fieldName), false));
 }
Exemple #9
0
 /// <summary>
 /// Ascending order.
 /// </summary>
 public static Order Asc(String fieldName)
 {
     return(new Order(Clauses.Field(fieldName), true));
 }