Class AggregationQueryFunction
The aggregate function of the expression.
Inherited Members
Namespace: Terrasoft.Core.DB
Assembly: Terrasoft.Core.dll
Syntax
public class AggregationQueryFunction : QueryFunction, IQueryColumnExpressionConvertible, IQueryColumnExpressionsCollector, ICloneable
Constructors
AggregationQueryFunction()
Initializes a new AggregationQueryFunction instance.
Declaration
public AggregationQueryFunction()
AggregationQueryFunction(AggregationTypeStrict, IQueryColumnExpressionConvertible)
Initializes a new AggregationQueryFunction instance with the specified type of the aggregate function for the specified expression.
Declaration
public AggregationQueryFunction(AggregationTypeStrict aggregationType, IQueryColumnExpressionConvertible expression)
Parameters
Type | Name | Description |
---|---|---|
AggregationTypeStrict | aggregationType | Type of aggregating function. |
IQueryColumnExpressionConvertible | expression | The expression to which the aggregate function is applied. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If |
AggregationQueryFunction(AggregationTypeStrict, QueryColumnExpression)
Initializes a new AggregationQueryFunction instance with the specified type of the aggregate function for the specified column expression.
Declaration
public AggregationQueryFunction(AggregationTypeStrict aggregationType, QueryColumnExpression expression)
Parameters
Type | Name | Description |
---|---|---|
AggregationTypeStrict | aggregationType | Type of aggregating function. |
QueryColumnExpression | expression | The column expression to which the aggregate function is applied. |
AggregationQueryFunction(AggregationQueryFunction)
Initializes a new AggregationQueryFunction instance that is a clone of the passed-in aggregate function of the expression.
Declaration
public AggregationQueryFunction(AggregationQueryFunction source)
Parameters
Type | Name | Description |
---|---|---|
AggregationQueryFunction | source | The AggregationQueryFunction aggregate function of the expression whose clone is being created. |
Properties
AggregationEvalType
The scope of the aggregate function.
Declaration
public AggregationEvalType AggregationEvalType { get; set; }
Property Value
Type | Description |
---|---|
AggregationEvalType |
AggregationType
Type of aggregating function.
Declaration
public AggregationTypeStrict AggregationType { get; set; }
Property Value
Type | Description |
---|---|
AggregationTypeStrict |
Expression
The expression of the function argument.
Declaration
public QueryColumnExpression Expression { get; set; }
Property Value
Type | Description |
---|---|
QueryColumnExpression |
Methods
AddQueryColumnExpressions(QueryColumnExpressionCollection)
Declaration
protected override void AddQueryColumnExpressions(QueryColumnExpressionCollection collection)
Parameters
Type | Name | Description |
---|---|---|
QueryColumnExpressionCollection | collection |
Overrides
AddUsingParameters(QueryParameterCollection)
Adds the passed-in collection of parameters in the function arguments.
Declaration
public override void AddUsingParameters(QueryParameterCollection resultParameters)
Parameters
Type | Name | Description |
---|---|---|
QueryParameterCollection | resultParameters | Collection of query parameters that are added in the function arguments. |
Overrides
All()
Sets the [To All Values] scope for the current aggregate function.
Declaration
public AggregationQueryFunction All()
Returns
Type | Description |
---|---|
AggregationQueryFunction | The current AggregationQueryFunction instance. |
BuildSqlText(StringBuilder, DBEngine)
Generates the query text, using the specified System.Text.StringBuilder instance and the DBEngine query builder.
Declaration
public override void BuildSqlText(StringBuilder sb, DBEngine dbEngine)
Parameters
Type | Name | Description |
---|---|---|
System.Text.StringBuilder | sb | The System.Text.StringBuilder instance used to create query text. |
DBEngine | dbEngine | The instance of the builder of the database queries. |
Overrides
Clone()
Creates the clone of the current AggregationQueryFunction instance.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | A new AggregationQueryFunction instance that is a clone of the current instance. |
Overrides
Distinct()
Sets the [To Unique Values] scope for the current aggregate function.
Declaration
public AggregationQueryFunction Distinct()
Returns
Type | Description |
---|---|
AggregationQueryFunction | The current AggregationQueryFunction instance. |