Appearance
Aggregate Method
Definition
- Namespace:
JASE.Database.SqlGenerators - Assembly:
JASE.Database.dll
SelectStatement Aggregate(ISelectable selectable, AggregateType kind, string columnName, bool distinct = null, IPredicateNode query = null, IEnumerable<IJoin> joins = null)
csharp
SelectStatement Aggregate(ISelectable selectable, AggregateType kind, string columnName, bool distinct = null, IPredicateNode query = null, IEnumerable<IJoin> joins = null)Builds a SelectStatement that computes a single aggregate value over the specified column.
Parameters
| Name | Description |
|---|---|
columnName | The target column name for the aggregate operation. |
distinct | When true, applies DISTINCT to the aggregate expression. |
joins | Optional join definitions. |
kind | The aggregate operation to apply (e.g. COUNT, SUM, AVG). |
query | Optional predicate tree used to generate the WHERE clause. |
selectable | The table or selectable source to aggregate over. |
Returns
A SelectStatement representing a scalar aggregate query.