Class AggregatedColumn
- Namespace
- CMS.DataEngine
- Assembly
- CMS.DataEngine.dll
Aggregated query column e.g. "AVG(XYZ) AS Average"
public class AggregatedColumn : SelectQueryColumnBase<AggregatedColumn>, IQueryParameters<AggregatedColumn>, IQueryColumn, IQueryExpression, IQueryParameters, IQueryObjectWithValue, IQueryObject
- Inheritance
-
objectAggregatedColumn
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
AggregatedColumn()
Constructor
public AggregatedColumn()
AggregatedColumn(AggregationType, string)
Constructor
public AggregatedColumn(AggregationType aggregation, string expression)
Parameters
aggregation
AggregationTypeAggregation type
expression
stringColumn name expression
Properties
AggregationType
Aggregation type
public AggregationType AggregationType { get; set; }
Property Value
IsSingleColumn
Returns true if this column represents a single column
public override bool IsSingleColumn { get; }
Property Value
- bool
Over
Over clause for the aggregation. When null, over clause is not generated at all, otherwise it is generated even when value is an empty string, in such case " OVER ()" is generated
public string Over { get; set; }
Property Value
- string
Methods
ApplyAggregation(string)
Applies the aggregation to the given expression
protected virtual string ApplyAggregation(string expression)
Parameters
expression
stringColumn expression
Returns
- string
ApplyOver(string)
Applies the over clause to the given expression
protected virtual string ApplyOver(string expression)
Parameters
expression
stringColumn expression
Returns
- string
GetValueExpression()
Gets the column expression
protected override string GetValueExpression()
Returns
- string